Yade On CentOs

Asked by mohsen

In the name of God
Dear All

We tried to install Yade on CentOs. We were successful to install Yade2016 and run it.

We also tried to install Yade 2017 with this options during compiling:
cmake -DCMAKE_INSTALL_PREFIX=~/YADE-git/master/install ~/YADE-git/master/trunk -DENABLE_PFVFLOW=0 -DENABLE_LBMFLOW=0 -DENABLE_LINSOLV=0 -DUSE_QT5=0 -DENABLE_GUI=0 -DENABLE_CGAL=0

The installation process finished with no error, but when starting Yade 2017 there was an error:
Welcome to Yade 2017.01a
Traceback (most recent call last):
  File "./yade-2017.01a", line 129, in <module>
    import yade
  File "/share/Application/yade/yade17/install/lib64/yade-2017.01a/py/yade/__init__.py", line 65, in <module>
    import boot
ImportError: /share/Application/yade/yade17/install/lib64/yade-2017.01a/libyade.so: undefined symbol: _ZN5boost7archive17archive_exceptionC1ERKS1_

Any idea?

Thanks Everyone
Mohsen

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Janek Kozicki (cosurgi) said :
#1

On first look at "_ZN5boost7archive17archive_exceptionC1ERKS1_" it seems that the symbol boost::archive::archive_exception cannot be found. The library names to link with might be different on centOS, I don't know that. But something similar to this one

-lboost_serialization

might be missing from $LIBS during compilation. The file name in question you should find by command:

find /usr/lib -iname "*boost_ser*"

On debian I find file "/usr/lib/x86_64-linux-gnu/libboost_serialization.so" and after cutting out the beginning "lib" and ending ".so" I get "boost_serialization" which is then supplied with "-l" to the $LIBS for the linker.

Revision history for this message
Janek Kozicki (cosurgi) said :
#2

Maybe I should clarify few things:

1. from boost::archive::archive_exception to boost_serialization you can get by doing a quick google search for boost archive archive_exception and seeing that it is a part of boost serialization library

2. In case if in centOS the library is not called boost_serialization, you could try to find it without '_ser' part, like this:

find /usr/lib -iname "*boost*"

and looking at the names of files found then guessing which one to link with.

3. the $LIBS which I am talking about should be in fact automatically detected by CMakeFile.txt which is not the case. The solution seems to be specific to centOS, so I cannot advise in general. You can try looking for help for cmake on centOS forums, or try to add this -lboost_serialization (or whatever name you will find) by hand by looking at how other libraries are added.

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Mohsen,
see threads [1,2], where a similar error was discussed
cheers
Jan

[1] https://answers.launchpad.net/yade/+question/269654
[2] https://answers.launchpad.net/yade/+question/628116

Revision history for this message
Robert Caulk (rcaulk) said :
#4

I will add that I have encountered this same cryptic error before. I think I cleared the build directory, re-built and installed Yade. I also may have had to roll my Yade version back to a stable version.

Revision history for this message
mohsen (agha-mohsena) said :
#5

Hi every one

@ Jan.
In the [1] the answer was to reinstall OS that can not be our case
In the [2] there was no final solution and reaction from the one who asked the question.

@Robert
the Yade 2017.01a is a stable version. am i right?

@ Janek
We are going to try that

Till now we tried to compile it with different versions of Boost( 1.41، 1.47، 1.6) but no achievement.

Regards

Revision history for this message
Janek Kozicki (cosurgi) said :
#6

Hi, I just remembered something. I think now that I probably had encountered this error. I can't dig now where it was, because those sources are long gone by now.

The problem was going like that: some release of boost, or some build system used for boost (you tried various boost versions, but perhaps those boost versions were compiled with the same build system?) had a bug that resulted in following thing: the linker (inside boost libs, while they were being compiled) did not pull some required dependencies. Or something like that. I don't remember the details ;) I remember the solution:

Try linking with other boost libraries. I vaguely remember that I got rid of this error after I added

-lboost_system

or maybe -lboost_system-mt ?

But while going down this path you could try to link with everything that boost has to offer which you will “find /usr/lib -iname "*boost*.so”

best regards
Janek

On 31 Oct 2017, 13:28 +0100, mohsen <email address hidden>, wrote:
> Question #660136 on Yade changed:
> https://answers.launchpad.net/yade/+question/660136
>
> mohsen posted a new comment:
> Hi every one
>
> @ Jan.
> In the [1] the answer was to reinstall OS that can not be our case
> In the [2] there was no final solution and reaction from the one who asked the question.
>
> @Robert
> the Yade 2017.01a is a stable version. am i right?
>
> @ Janek
> We are going to try that
>
> Till now we tried to compile it with different versions of Boost( 1.41،
> 1.47، 1.6) but no achievement.
>
> Regards
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp

Revision history for this message
Robert Caulk (rcaulk) said :
#7

I should add that this may also be caused by permissions problems. If you compiled and installed Yade using sudo, you would also need to run the executable using sudo. Otherwise you might get this error.

Can you help with this problem?

Provide an answer of your own, or ask mohsen for more information if necessary.

To post a message you must log in.