Compile error

Asked by Anton Gladky

Hi, all!

I have got a problem with installing ESyS on one of machines. When I run 'make' at the end of the process I get:

/bin/bash ../libtool --tag=CXX --mode=link mpic++ -g -O2 -release 2.0 -L/usr/lib -o ESySParticleBEWorker Worker.o ../Parallel/libParallel.la ../ntable/src/libntable.la ../tml/message/libTmlMessage.la ../tml/type/libTmlType.la ../ppa/src/libppa.la ../Fields/libFields.la ../Geometry/libGgGeometry.la -lboost_filesystem-mt -lpython2.6
libtool: link: warning: `-release' is ignored for programs
libtool: link: mpic++ -g -O2 -o .libs/ESySParticleBEWorker Worker.o -L/usr/lib ../Parallel/.libs/libParallel.so ../ntable/src/.libs/libntable.so ../tml/message/.libs/libTmlMessage.so ../tml/type/.libs/libTmlType.so ../ppa/src/.libs/libppa.so ../Fields/.libs/libFields.so ../Geometry/.libs/libGgGeometry.so -lboost_filesystem-mt -lpython2.6 -Wl,-rpath -Wl,/home/gladk/dem/esys/install/bin/lib
/usr/bin/ld: Worker.o: in function main:../Foundation/console.h:57: error: undefined reference to 'BasicCon::quiet'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:39: error: undefined reference to 'BasicCon::SetVerbose(int)'
/usr/bin/ld: Worker.o: in function main:../Foundation/console.h:58: error: undefined reference to 'BasicCon::timing'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:56: error: undefined reference to 'console'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:56: error: undefined reference to 'BasicCon::Debug(bool)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:56: error: undefined reference to 'BasicCon::operator<<(char const*)'
/usr/bin/ld: Worker.o: in function main:../Foundation/console.h:57: error: undefined reference to 'BasicCon::quiet'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:52: error: undefined reference to 'BasicCon::SetVerbose(int)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:77: error: undefined reference to 'console'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:77: error: undefined reference to 'BasicCon::Error(bool)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:77: error: undefined reference to 'BasicCon::operator<<(char const*)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:77: error: undefined reference to 'BasicCon::operator<<(char const*)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:71: error: undefined reference to 'console'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:71: error: undefined reference to 'BasicCon::Error(bool)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:71: error: undefined reference to 'BasicCon::operator<<(char const*)'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:65: error: undefined reference to 'console'
/usr/bin/ld: Worker.o: in function main:Worker.cpp:65: error: undefined reference to 'BasicCon::Error(bool)'
collect2: ld returned 1 exit status
make[2]: *** [ESySParticleBEWorker] Fehler 1
make[2]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk/MainBE'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk'
make: *** [all] Fehler 2

I did everything as described in FAQ and previously I had not such problems.

What can be a problem?

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Anton Gladky
Solved:
Last query:
Last reply:
Revision history for this message
Dion Weatherley (d-weatherley) said :
#1

Hi Anton,

I've not seen this error before either. Are you building from a clean checkout of the source tree (from svn) or did you 'svn update' an existing source tree?

I just noticed that libFoundation is not being linked in when ESySParticleBEWorker is linked. For a start, 'cd MainBE' then run the following linker command:

mpic++ -g -O2 -o .libs/ESySParticleBEWorker Worker.o -L/usr/lib ../Foundation/.libs/libFoundation.so ./Parallel/.libs/libParallel.so ../ntable/src/.libs/libntable.so ../tml/message/.libs/libTmlMessage.so ../tml/type/.libs/libTmlType.so ../ppa/src/.libs/libppa.so ../Fields/.libs/libFields.so ../Geometry/.libs/libGgGeometry.so -lboost_filesystem-mt -lpython2.6 -Wl,-rpath -Wl,/home/gladk/dem/esys/install/bin/lib

If you get no error messages (let me know!) then continue with 'make' in the top-level source directory and see how far you get. The problem may be simply because we need to add libFoundation to the MakeBE/Makefile.am file.

If you still get error messages after trying the command above, you could try removing MainBE from the SUBDIRS variable in the top-level Makefile then re-run 'make'. The code residing in MainBE is no longer used in ESyS-Particle and I intend to remove it altogether from v2.1.

After removing MainBE from the Makefile, I suspect you will see the errors appear again when you compile Python/MpiPython/MpiPythonMain.cpp. If so, please let me know this as well. This could be symptomatic of a more serious build problem.

Good luck.

Dion.

Revision history for this message
Anton Gladky (gladky-anton) said :
#2

Hi, Dion!
Thank you for your suggestions. But I still have a problem:

mpic++ -g -O2 -o .libs/ESySParticleBEWorker Worker.o -L/usr/lib
../Foundation/.libs/libFoundation.so ../Parallel/ .libs/libParallel.so
../ntable/src/.libs/libntable.so ../tml/message/.libs/libTmlMessage.so
../tml/type/.libs/libTmlType.so ../ppa/src/.libs/libppa.so
../Fields/.libs/libFields.so ../Geometry/.libs/libGgGeometry.so
-lboost_filesystem-mt -lpython2.6 -Wl,-rpath
-Wl,/home/gladk/dem/esys/install/bin/lib

g++: .libs/libParallel.so: No such file or directory

directory .libs is completely empty.

I deleted MainBE directory and then started 'make':

make[2]: Betrete Verzeichnis '/home/gladk/dem/esys/install/trunk/Parallel'
/bin/bash ../libtool --tag=CXX --mode=compile mpic++ -DHAVE_CONFIG_H -I.
-I.. "-I.." -I/usr/include -I.. -I../Foundation -I../Model -I../Fields
-I../Interface -I../MainBE -I../Socket -g -O2 -MT CheckPointInfo.lo -MD
-MP -MF .deps/CheckPointInfo.Tpo -c -o CheckPointInfo.lo CheckPointInfo.cpp
libtool: compile: mpic++ -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/include -I..
-I../Foundation -I../Model -I../Fields -I../Interface -I../MainBE
-I../Socket -g -O2 -MT CheckPointInfo.lo -MD -MP -MF
.deps/CheckPointInfo.Tpo -c CheckPointInfo.cpp -fPIC -DPIC -o
.libs/CheckPointInfo.o
CheckPointInfo.cpp:17:28: error: MainBE/version.h: No such file or directory
CheckPointInfo.cpp: In member function ‘void
esys::lsm::CheckPointInfo::Impl::write(std::ostream&) const’:
CheckPointInfo.cpp:81: error: ‘lsm_version_info’ has not been declared
make[2]: *** [CheckPointInfo.lo] Fehler 1
make[2]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk/Parallel'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk'
make: *** [all] Fehler 2

Thanks for the help.

______________________________
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy

2010/1/13 Dion Weatherley <email address hidden>

> Your question #97265 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> Status: Open => Answered
>
> Dion Weatherley proposed the following answer:
> Hi Anton,
>
> I've not seen this error before either. Are you building from a clean
> checkout of the source tree (from svn) or did you 'svn update' an
> existing source tree?
>
> I just noticed that libFoundation is not being linked in when
> ESySParticleBEWorker is linked. For a start, 'cd MainBE' then run the
> following linker command:
>
> mpic++ -g -O2 -o .libs/ESySParticleBEWorker Worker.o -L/usr/lib
> ../Foundation/.libs/libFoundation.so ./Parallel/.libs/libParallel.so
> ../ntable/src/.libs/libntable.so ../tml/message/.libs/libTmlMessage.so
> ../tml/type/.libs/libTmlType.so ../ppa/src/.libs/libppa.so
> ../Fields/.libs/libFields.so ../Geometry/.libs/libGgGeometry.so
> -lboost_filesystem-mt -lpython2.6 -Wl,-rpath
> -Wl,/home/gladk/dem/esys/install/bin/lib
>
> If you get no error messages (let me know!) then continue with 'make' in
> the top-level source directory and see how far you get. The problem may
> be simply because we need to add libFoundation to the MakeBE/Makefile.am
> file.
>
> If you still get error messages after trying the command above, you
> could try removing MainBE from the SUBDIRS variable in the top-level
> Makefile then re-run 'make'. The code residing in MainBE is no longer
> used in ESyS-Particle and I intend to remove it altogether from v2.1.
>
> After removing MainBE from the Makefile, I suspect you will see the
> errors appear again when you compile Python/MpiPython/MpiPythonMain.cpp.
> If so, please let me know this as well. This could be symptomatic of a
> more serious build problem.
>
> Good luck.
>
> Dion.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/esys-particle/+question/97265/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Dion Weatherley (d-weatherley) said :
#3

Hi Anton,

I think your first error message: "g++: .libs/libParallel.so: No such file or directory" is because of a typo in the linking command. There appears to be an extra blank space between ../Parallel/ and .libs/libParallel.so. This should have been "../Parallel/.libs/libParallel.so".

Deleting the 'MainBE' directory is not going to be sufficient to stop ESyS-Particle attempting to build or link against it. You will need to:

1) make distclean
2) remove 'MainBE' from the top-level Makefile.am
3) re-run your './configure' command
4) re-commence compilation with 'make'

It might be better to start from a fresh checkout of the ESyS-Particle source-code at this stage.

I hope this helps.

Cheers,

Dion.

Revision history for this message
Anton Gladky (gladky-anton) said :
#4

Thanks, Dion, for the answer, but I still have a problem:

_________________________________
~/dem/esys/install/trunk/MainBE$ mpic++ -g -O2 -o .libs/ESySParticleBEWorker
Worker.o -L/usr/lib ../Foundation/.libs/libFoundation.so
../Parallel/.libs/libParallel.so ../ntable/src/.libs/libntable.so
../tml/message/.libs/libTmlMessage.so ../tml/type/.libs/libTmlType.so
../ppa/src/.libs/libppa.so ../Fields/.libs/libFields.so
../Geometry/.libs/libGgGeometry.so -lboost_filesystem-mt -lpython2.6
-Wl,-rpath -Wl,/home/gladk/dem/esys/install/bin/lib

/usr/bin/ld: ../Foundation/.libs/libFoundation.so: error: undefined
reference to 'boost::system::get_system_category()'
/usr/bin/ld: ../Foundation/.libs/libFoundation.so: error: undefined
reference to 'boost::system::get_generic_category()'
collect2: ld returned 1 exit status
_________________________________

Then I deleted MainBE from the trunk, from Makefile.am and configure.ac, and
after 'make', I get:

_________________________________
libtool: compile: mpic++ -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/include -I..
-I../Foundation -I../Model -I../Fields -I../Interface -I../MainBE
-I../Socket -g -O2 -MT SubLatticeControler.lo -MD -MP -MF
.deps/SubLatticeControler.Tpo -c SubLatticeControler.cpp -o
SubLatticeControler.o >/dev/null 2>&1
mv -f .deps/SubLatticeControler.Tpo .deps/SubLatticeControler.Plo
make[2]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk/Parallel'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk'
make: *** [all] Fehler 2
_________________________________

But another machine with the same system works good (Ubuntu 9.10).

Thanks again

Anton Gladkyy

2010/1/14 Dion Weatherley <email address hidden>

> Your question #97265 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> Status: Open => Answered
>
> Dion Weatherley proposed the following answer:
> Hi Anton,
>
> I think your first error message: "g++: .libs/libParallel.so: No such
> file or directory" is because of a typo in the linking command. There
> appears to be an extra blank space between ../Parallel/ and
> .libs/libParallel.so. This should have been
> "../Parallel/.libs/libParallel.so".
>
> Deleting the 'MainBE' directory is not going to be sufficient to stop
> ESyS-Particle attempting to build or link against it. You will need to:
>
> 1) make distclean
> 2) remove 'MainBE' from the top-level Makefile.am
> 3) re-run your './configure' command
> 4) re-commence compilation with 'make'
>
> It might be better to start from a fresh checkout of the ESyS-Particle
> source-code at this stage.
>
> I hope this helps.
>
> Cheers,
>
> Dion.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/esys-particle/+question/97265/+confirm?answer_id=2
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Dion Weatherley (d-weatherley) said :
#5

Hi Anton,

I'm really surprised you are having so many problems with Ubuntu-9.10 as I've installed ESyS many times on that distro lately without any hassles. In any case, let's keep trying:

Firstly, deleting the MainBE/ directory itself is not a good idea because Parallel/CheckPointInfo.cpp uses MainBE/version.h. Until I remove this dependency, all we can do is prevent ESyS building ESySParticleBEWorker by removing MainBE from the top-level Makefile.am and configure.ac. When you do this though, you must 'make distclean' then re-run 'configure'.

The error message related to "boost::system::get_system_category()" might be related to this bug:
https://bugs.launchpad.net/esys-particle/+bug/413943

Try adding LIBS="-lboost_system-mt" to your ./configure arguments.

Cheers,

Dion.

Revision history for this message
Anton Gladky (gladky-anton) said :
#6

Thanks, Dion,

sorry for being annoying, but I still have a problem. I have done all steps,
what you recommended, but:

libtool: link: warning: `-release' is ignored for programs
libtool: link: mpic++ -g -O2 -o .libs/raw2tostress Main.o -L/usr/lib
./.libs/libStressCalculator.so -lboost_filesystem-mt -lpython2.6
-lboost_system-mt
/usr/bin/ld: Main.o: in function getBBox(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&):../../Foundation/vec3.hpp:49: error: undefined reference to
'Vec3::ZERO'
/usr/bin/ld: Main.o: in function getBBox(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&):../../Foundation/vec3.hpp:50: error: undefined reference to
'Vec3::ZERO'
/usr/bin/ld: Main.o: in function getBBox(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&):../../Foundation/vec3.hpp:51: error: undefined reference to
'Vec3::ZERO'
/usr/bin/ld: Main.o: in function getBBox(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
const&):../../Foundation/vec3.hpp:49: error: undefined reference to
'Vec3::ZERO'
collect2: ld returned 1 exit status
make[3]: *** [raw2tostress] Fehler 1
make[3]: Verlasse Verzeichnis
'/home/gladk/dem/esys/install/trunk/Tools/StressCalculator'
make[2]: *** [all-recursive] Fehler 1
make[2]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk/Tools'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/gladk/dem/esys/install/trunk'
make: *** [all] Fehler 2

Maybe it is a time to reinstall the OS :) ?

PS I always do "fresh install". And I do not have anything from the previous
installation.

Thanks for the patience and for the help.
______________________________

Anton Gladkyy

2010/1/14 Dion Weatherley <email address hidden>

> Your question #97265 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> Status: Open => Answered
>
> Dion Weatherley proposed the following answer:
> Hi Anton,
>
> I'm really surprised you are having so many problems with Ubuntu-9.10 as
> I've installed ESyS many times on that distro lately without any
> hassles. In any case, let's keep trying:
>
> Firstly, deleting the MainBE/ directory itself is not a good idea
> because Parallel/CheckPointInfo.cpp uses MainBE/version.h. Until I
> remove this dependency, all we can do is prevent ESyS building
> ESySParticleBEWorker by removing MainBE from the top-level Makefile.am
> and configure.ac. When you do this though, you must 'make distclean'
> then re-run 'configure'.
>
> The error message related to "boost::system::get_system_category()" might
> be related to this bug:
> https://bugs.launchpad.net/esys-particle/+bug/413943
>
> Try adding LIBS="-lboost_system-mt" to your ./configure arguments.
>
> Cheers,
>
> Dion.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/esys-particle/+question/97265/+confirm?answer_id=4
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Dion Weatherley (d-weatherley) said :
#7

Hi Anton,

I don't know about you, but I'm really starting to get frustrated with this problem! ;)

It would appear that the same problem has occurred again when trying to compile the raw2stress executable in Tools/StressCalculator. For some reason, your compiler is complaining because libFoundation is not being linked into the executable. Instead of the linking command above, add "../../Foundation/.libs/libFoundation.so" after Main.o. In other words, run this command from the Tools/StressCalculator directory:

mpic++ -g -O2 -o .libs/raw2tostress Main.o ../../Foundation/.libs/libFoundation.so -L/usr/lib
./.libs/libStressCalculator.so -lboost_filesystem-mt -lpython2.6
-lboost_system-mt

I'm highly suspicious that there is something very wrong with the build system on your PC. Perhaps you are trying to compile using mpich but the openmpi headers are being used during compilation? Or perhaps you already have LSMGenGeo installed somewhere on that PC and it's causing conflicts? I really don't know the exact cause. If it were my PC, I'd seriously consider re-installing the OS instead of all these bug-fixes upon bug-fixes.

In any case, good luck and let me know how you go.

Cheers,

Dion.

Revision history for this message
Anton Gladky (gladky-anton) said :
#8

Thank you very much, Dion!

Sorry for this long story with installation, but I solved the problem with reinstalling the OS.

Revision history for this message
Dion Weatherley (d-weatherley) said :
#9

Hi Anton,

Glad you managed to get past this problem...even if the solution was rather drastic! Hopefully this problem won't occur too often and perhaps next time we can get to the bottom of it without resorting to a reinstall.

Have fun mate.

Dion.

Revision history for this message
Anton Gladky (gladky-anton) said :
#10

It seems, I have found the problem solution!

I had binutils-gold installed, which is faster than "simple ld". But it does
not compile ESyS.

Hope, this information will be useful.
______________________________

Anton Gladkyy

2010/1/15 Dion Weatherley <email address hidden>

> Your question #97265 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/97265
>
> Dion Weatherley posted a new comment:
> Hi Anton,
>
> Glad you managed to get past this problem...even if the solution was
> rather drastic! Hopefully this problem won't occur too often and perhaps
> next time we can get to the bottom of it without resorting to a
> reinstall.
>
> Have fun mate.
>
> Dion.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>