Re: List of FTBFS in Ubuntu
Stefano Rivera <stefano@rivera.za.net> writes:
> gcc argument order:
> g++ -o conftest -pthread -g -O2 -Wall -O2 -DNDEBUG -pthread -g -O2 -g -Wall -O2 -O2 -DNDEBUG -L/usr/lib -llog4cpp -lnsl -Wl,-Bsymbolic-functions conftest.cpp -lz >&5
> /tmp/ccnWkLI6.o: In function `main':
> /tmp/buildd/opensaml2-2.3/conftest.cpp:35: undefined reference to `log4cpp::Category::getInstance(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
> /tmp/buildd/opensaml2-2.3/conftest.cpp:36: undefined reference to `log4cpp::eol(log4cpp::CategoryStream&)'
> /tmp/buildd/opensaml2-2.3/conftest.cpp:36: undefined reference to `log4cpp::CategoryStream::operator<<(log4cpp::CategoryStream& (*)(log4cpp::CategoryStream&))'
> /tmp/buildd/opensaml2-2.3/conftest.cpp:35: undefined reference to `log4cpp::CategoryStream::~CategoryStream()'
> /tmp/buildd/opensaml2-2.3/conftest.cpp:35: undefined reference to `log4cpp::CategoryStream::~CategoryStream()'
> collect2: ld returned 1 exit status
> This will work:
> g++ -o conftest -pthread -g -O2 -Wall -O2 -DNDEBUG -pthread -g -O2 -g -Wall -O2 -O2 -DNDEBUG conftest.cpp -L/usr/lib -llog4cpp -lnsl -Wl,-Bsymbolic-functions -lz
> Looks like autoconf's fault.
Hm, yeah, the code in the package is just:
AC_TRY_LINK(
[#include <log4cpp/Category.hh>
#include <log4cpp/CategoryStream.hh>],
[log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol],
[AC_DEFINE(SHIBSP_LOG4CPP,1,[Define if log4cpp library is used.])],
[AC_MSG_ERROR([unable to link with log4cpp, need version 1.0 or later])])
so I don't see anything obvious that I can do to fix this in the package.
Autoconf doesn't seem to like the way that Ubuntu is adding the additional
linker flag.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: