#593 Poco 1.5.0 on FreeBSD: cannot find -ldl

Platform_Specific
accepted
nobody
None
1
2014-09-08
2012-10-17
No

Hello,

I get the following with Poco 1.5.0 on FreeBSD 9.1-PRERELEASE:
...
Compiling src/SQLExecutor.cpp (debug, shared)
g++ -Iinclude -I/sequoia/Poco/poco-1.5.0-all/CppUnit/include -I/sequoia/Poco/poco-1.5.0-all/Foundation/include -I/sequoia/Poco/poco-1.5.0-all/XML/include -I/sequoia/Poco/poco-1.5.0-all/JSON/include -I/sequoia/Poco/poco-1.5.0-all/Util/include -I/sequoia/Poco/poco-1.5.0-all/Net/include -I/sequoia/Poco/poco-1.5.0-all/Crypto/include -I/sequoia/Poco/poco-1.5.0-all/NetSSL_OpenSSL/include -I/sequoia/Poco/poco-1.5.0-all/Data/include -I/sequoia/Poco/poco-1.5.0-all/Data/SQLite/include -I/sequoia/Poco/poco-1.5.0-all/Data/ODBC/include -I/sequoia/Poco/poco-1.5.0-all/Data/MySQL/include -I/sequoia/Poco/poco-1.5.0-all/Zip/include -I/sequoia/Poco/poco-1.5.0-all/PageCompiler/include -I/sequoia/Poco/poco-1.5.0-all/PageCompiler/File2Page/include -I./../include -I/usr/local/include/mysql -I/usr/include/mysql/ -I/usr/mysql/include/mysql -I/usr/local/mysql/include -DPOCO_BUILD_HOST=sequoia.mondomaineamoi.megalo -D_REENTRANT -D_THREAD_SAFE -g -D_DEBUG -fPIC -c src/SQLExecutor.cpp -o /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/obj/FreeBSD/amd64/debug_shared/SQLExecutor.o
Building shared executable (debug) /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/bin/FreeBSD/amd64/testrunnerd
g++ -DPOCO_BUILD_HOST=sequoia.mondomaineamoi.megalo -D_REENTRANT -D_THREAD_SAFE -g -Wl,-rpath,/sequoia/Poco/poco-1.5.0-all/lib/FreeBSD/amd64 -o /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/bin/FreeBSD/amd64/testrunnerd /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/obj/FreeBSD/amd64/debug_shared/MySQLTestSuite.o /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/obj/FreeBSD/amd64/debug_shared/Driver.o /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/obj/FreeBSD/amd64/debug_shared/MySQLTest.o /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/obj/FreeBSD/amd64/debug_shared/SQLExecutor.o -L/sequoia/Poco/poco-1.5.0-all/lib/FreeBSD/amd64 -lPocoDataMySQLd -lPocoDatad -lPocoFoundationd -lCppUnitd -lpthread -L/usr/local/lib/mysql -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/mysql/lib/mysql -L/usr/local/mysql/lib -lmysqlclient -lz -lpthread -ldl
/usr/bin/ld: cannot find -ldl
gmake[1]: [/sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite/bin/FreeBSD/amd64/testrunnerd] Erreur 1
gmake[1] : on quitte le répertoire « /sequoia/Poco/poco-1.5.0-all/Data/MySQL/testsuite »
gmake:
[Data/MySQL-tests] Erreur 2

Indeed, the "-ldl" is not applicable on FreeBSD, it must be removed. Without this option, the build is fine.

Regards,
Stéphane.

Discussion

  • Alex Fabijanic
    Alex Fabijanic
    2012-10-18

    Will be fixed for next bugfix release. If you want to patch it for port packaging, this is how we do it:

    ifeq ($(POCO_CONFIG),FreeBSD)
    SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient -lz -lpthread
    else
    SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient -lz -lpthread -ldl
    endif

     
    Last edit: Alex Fabijanic 2012-10-18
  • Alex Fabijanic
    Alex Fabijanic
    2012-12-13

    • status: open --> accepted