MediaArea / MediaConch_SourceCode

Media conformance checker
https://MediaArea.net/MediaConch
BSD 2-Clause "Simplified" License
29 stars 18 forks source link

Error while building MediaConch_SourceCode #650

Closed XMegamanX closed 6 years ago

XMegamanX commented 6 years ago

Hello !

I have a problem while buidling MediaConch via GNU CLI source code. Here a snapshot of my terminal :

MediaInfoLib compiled
 rm -f mediaconch
rm -rf .libs _libs
rm -f *.o
rm -f ../../../Source/CLI/*.o
rm -f ../../../Source/Common/*.o
test -z "test/simple.sh.log test/filename.sh.log test/test_mk.sh.log test/test_ffv1.sh.log" || rm -f test/simple.sh.log test/filename.sh.log test/test_mk.sh.log test/test_ffv1.sh.log
test -z "test/simple.sh.trs test/filename.sh.trs test/test_mk.sh.trs test/test_ffv1.sh.trs" || rm -f test/simple.sh.trs test/filename.sh.trs test/test_mk.sh.trs test/test_ffv1.sh.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
libtool: link: g++ -O2 -DUNICODE -DUNICODE -DSIZE_T_IS_LONG -I../../../../libxml2/include -I../../../../libxslt/libxslt -DHAVE_SQLITE -I../../../../sqlite -DHAVE_JANSSON -I../../../../jansson/src -DHAVE_LIBEVENT -I../../../../libevent/include -o mediaconch ../../../Source/CLI/mediaconch-CLI_Main.o ../../../Source/CLI/mediaconch-CLI.o ../../../Source/CLI/mediaconch-CommandLine_Parser.o ../../../Source/CLI/mediaconch-Help.o ../../../Source/Common/mediaconch-MediaConchLib.o ../../../Source/Common/mediaconch-Core.o ../../../Source/Common/mediaconch-Reports.o ../../../Source/Common/mediaconch-DaemonClient.o ../../../Source/Common/mediaconch-Schema.o ../../../Source/Common/mediaconch-Xslt.o ../../../Source/Common/mediaconch-JS_Tree.o ../../../Source/Common/mediaconch-Policies.o ../../../Source/Common/mediaconch-Policy.o ../../../Source/Common/mediaconch-XsltPolicy.o ../../../Source/Common/mediaconch-UnknownPolicy.o ../../../Source/Common/mediaconch-Database.o ../../../Source/Common/mediaconch-DatabaseReport.o ../../../Source/Common/mediaconch-NoDatabaseReport.o ../../../Source/Common/mediaconch-SQLLite.o ../../../Source/Common/mediaconch-SQLLiteReport.o ../../../Source/Common/mediaconch-Json.o ../../../Source/Common/mediaconch-Configuration.o ../../../Source/Common/mediaconch-REST_API.o ../../../Source/Common/mediaconch-Httpd.o ../../../Source/Common/mediaconch-LibEventHttpd.o ../../../Source/Common/mediaconch-Http.o ../../../Source/Common/mediaconch-LibEventHttp.o ../../../Source/Common/mediaconch-Queue.o ../../../Source/Common/mediaconch-Scheduler.o ../../../Source/Common/mediaconch-PluginsConfig.o ../../../Source/Common/mediaconch-PluginsManager.o ../../../Source/Common/mediaconch-Plugin.o ../../../Source/Common/mediaconch-VeraPDF.o ../../../Source/Common/mediaconch-DpfManager.o ../../../Source/Common/mediaconch-PluginPreHook.o ../../../Source/Common/mediaconch-PluginFileLog.o ../../../Source/Common/mediaconch-WatchFoldersManager.o ../../../Source/Common/mediaconch-WatchFolder.o  /home/ubuntu/mediainfo/MediaConch_CLI_GNU_FromSource/MediaInfoLib/Project/GNU/Library/.libs/libmediainfo.a -L/usr/local/lib /usr/local/lib/libcurl.so /usr/local/lib/libssh2.so -lssl -lcrypto -lz /home/ubuntu/mediainfo/MediaConch_CLI_GNU_FromSource/ZenLib/Project/GNU/Library/.libs/libzen.a -lpthread -lstdc++ ../../../../libxml2/.libs/libxml2.a ../../../../libxslt/libxslt/.libs/libxslt.a ../../../../libxslt/libexslt/.libs/libexslt.a ../../../../sqlite/.libs/libsqlite3.a ../../../../jansson/src/.libs/libjansson.a ../../../../libevent/.libs/libevent.a -pthread
/usr/bin/ld: ../../../../sqlite/.libs/libsqlite3.a(sqlite3.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:818: recipe for target 'mediaconch' failed
make: *** [mediaconch] Error 1
Problem while compiling MediaConch (CLI)

I have tried to add -ldl to the Makefile of MediaConch but I have the same error. I already have libdl.so in /usr/mib/x86_64-linux-gnu/

Thank you for the help :)

Megaman

g-maxime commented 6 years ago

On which OS/Version ?

Try to add these LDFLAGS to the command line: LDFLAGS="-Wl,--no-as-needed -ldl" ./CLI_Compile.sh

XMegamanX commented 6 years ago

Oups sorry. The building is done on a Ubuntu 16.04 Thank you. I will try your solution :).

XMegamanX commented 6 years ago

Thank you, your tip made it ! What --no-as-needed stands for ?

g-maxime commented 6 years ago

@XMegamanX "--as-needed" was enabled by default on Ubuntu 14.04, causing problem with some libraries (like -ldl, -lssl)

"--as-needed" check if the symbol is really used before do the linking, for avoid unneeded runtime dependencies.

If the bug isn't fixed in Ubuntu 18.04, I will look for a workaround.