Open 14061137 opened 4 years ago
It looks like cerebro was split in 2 libraries and the configure check doesn't know that yet. Try adding -lcerebro_error to that command.
zzh notifications@github.com schrieb am Fr., 15. Nov. 2019, 06:24:
I installed cerebro-1.18.1 and when I make lmt, it reported:
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -o ltop ltop.o sample.o ../liblmt/liblmt.la ../libproc/libproc.la ../liblsd/ liblsd.la -lcurses -lm -ldl libtool: link: gcc -Wall -Werror -g -O2 -o ltop ltop.o sample.o ../liblmt/.libs/liblmt.a -lcerebro ../libproc/.libs/libproc.a ../liblsd/.libs/liblsd.a -lcurses -lm -ldl /bin/ld: //usr/local/lib/libcerebro.so: undefined reference to symbol 'cerebro_err_output' //usr/local/lib/libcerebro_error.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [ltop] Error 1 make[1]: Leaving directory `/home/zz/lmt-3.2.6/utils'
I want to know if this is because I forgot something or the version of cerebro is wrong.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LLNL/lmt/issues/47?email_source=notifications&email_token=AASC2EALOEYFR5XFVGC6SUDQT2PJ7A5CNFSM4JN2YEC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZTPVNA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASC2EB5USVI7UVKNYTSLOTQT2PJ7ANCNFSM4JN2YECQ .
@14061137 was this build performed from a clean slate? That is, you ran from a clean directory (e.g. git clean -dfx or similar) and then ran sh autogen.sh, ./configure, and make?
I build against a cerebro derived from that one, and do not encounter this issue. On my builds, libtool doesn't need the Makefile to include -lcerebro_error ; libtool figures out that is required for liblmt and adds it on its own.
I looked further into how the build process works.
As you see in your make output snippet, make calls libtool to link the object files and create the ltop executable. It specifies on the command line that ../liblmt/liblmt.la is one of the arguments indicating a required dependency. If you look at ../liblmt/liblmt.la, it is a libtool-generated script which specifies what liblmt depends on. It include a line that says:
dependency_libs=' /lib64/libcerebro.la /usr/lib64/libcerebro_error.la -llua -lm -ldl'
libtool created this file as part of processing the Makefile in liblmt/.
When the file was created, that dependency_libs variable's contents were determined by reading /lib64/libcerebro.la which in turn is also a libtool-generated script which specifies that it depends on cerebro_error:
$grep ^dependency /lib64/libcerebro.la
dependency_libs=' /usr/lib64/libcerebro_error.la -ldl'
That libcerebro.la file is provided by the cerebro rpm:
$rpm -qf /lib64/libcerebro.la
cerebro-1.21-8.ch6.x86_64
So it may be that either you've not started with a clean build, and so the contents of liblmt are stale and do not match the system you're building on; or your cerebro packages don't provide libtool support.
I installed cerebro-1.18.1 and when I make lmt, it reported:
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -o ltop ltop.o sample.o ../liblmt/liblmt.la ../libproc/libproc.la ../liblsd/liblsd.la -lcurses -lm -ldl libtool: link: gcc -Wall -Werror -g -O2 -o ltop ltop.o sample.o ../liblmt/.libs/liblmt.a -lcerebro ../libproc/.libs/libproc.a ../liblsd/.libs/liblsd.a -lcurses -lm -ldl /bin/ld: //usr/local/lib/libcerebro.so: undefined reference to symbol 'cerebro_err_output' //usr/local/lib/libcerebro_error.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [ltop] Error 1 make[1]: Leaving directory `/home/zz/lmt-3.2.6/utils'
I want to know if this is because I forgot something or the version of cerebro is wrong.