Summary: | devel/cmake: missing library /usr/local/lib/libjsoncpp.so | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | pvoigt |
Component: | Individual Port(s) | Assignee: | freebsd-kde (group) <kde> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | chrysalis, mail, simonandric5, sunpoet |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
Bug Depends on: | 201057 | ||
Bug Blocks: |
Description
pvoigt
2015-06-19 11:52:29 UTC
The problem is in devel/jsoncpp. Its (deprecated) SCons build system does not generate versioned shared libraries, so libjsoncpp.so does not have a proper SONAME ELF header. Consequently, binaries linking against it get confused with what to mention as a dependency in their own ELF headers. I've filed bug 201057 to fix devel/jsoncpp. Same issue when using pkg2ng. # pkg2ng Converting packages from /var/db/pkg Analysing shared libraries, this will take a while... Checking all packages: 2% (cmake-3.2.3) /usr/local/bin/ccmake - required shared library /usr/local/lib/libjsoncpp.so not found (cmake-3.2.3) /usr/local/bin/cmake - required shared library /usr/local/lib/libjsoncpp.so not found (cmake-3.2.3) /usr/local/bin/cpack - required shared library /usr/local/lib/libjsoncpp.so not found (cmake-3.2.3) /usr/local/bin/ctest - required shared library /usr/local/lib/libjsoncpp.so not found Checking all packages: 100% A commit references this bug: Author: rakuco Date: Tue Jun 30 21:43:06 UTC 2015 New revision: 391009 URL: https://svnweb.freebsd.org/changeset/ports/391009 Log: Properly version libjsoncpp.so. Fix the problem described in bug 200969: currently, libjsoncpp.so is not properly versioned by SCons; in other words, there's no SONAME in the library's ELF header, which confuses the linker when creating binaries that link against it. Solve it by using InstallVersionedLib(), available since SCons 2.3.0: this call is able to properly version the shared library the way we need it. Since there is no support for actually installing the files outside the build directory, we have to recreate the required symlinks ourselves in the Makefile. Another related change is that we now create the libraries with the proper names instead of doing that in the Makefile. I'm (ab)using the maintainer's approval given to bug 200939, as swills's latest patch includes this change as well. PR: 200969 PR: 201057 Approved by: johan@stromnet.se (maintainer) Changes: head/devel/jsoncpp/Makefile head/devel/jsoncpp/files/patch-SConstruct head/devel/jsoncpp/files/patch-src_lib__json_sconscript head/devel/jsoncpp/pkg-plist A commit references this bug: Author: rakuco Date: Tue Jun 30 21:49:30 UTC 2015 New revision: 391011 URL: https://svnweb.freebsd.org/changeset/ports/391011 Log: Bump PORTREVISION in cmake and cmake-gui after r391009. Make sure the generated binaries have the right entry for libjsoncpp.so in the ELF headers. PR: 200969 Changes: head/devel/cmake/Makefile head/devel/cmake-gui/Makefile Everything should be fine after the two commits above, so closing. I have just checked: jsoncpp-0.6.0.r2_2 fixes the issue. Isnt fixed, the build still fails on gcc48 from ports. In file included from /usr/ports/devel/cmake/work/cmake-3.2.3/Source/cmGlobalNinjaGenerator.cxx:14:0: /usr/ports/devel/cmake/work/cmake-3.2.3/Source/cmGeneratorExpressionEvaluationFile.h:39:64: error: 'mode_t' has not been declared std::map<std::string, std::string> &outputFiles, mode_t perm); ^ *** [cmGlobalNinjaGenerator.o] Error code 1 1 error --------------------------------------------- Error when bootstrapping CMake: Problem while running make --------------------------------------------- Log of errors: /usr/ports/devel/cmake/work/cmake-3.2.3/Bootstrap.cmk/cmake_bootstrap.log builds using gcc 4.2.1 which of course is a very old gcc that is removed from FreeBSD 10+. The error you have reported is completely unrelated to the jsoncpp issue. I've backported a fix for it in r395637. is the fix in the ports tree yet? as it still fails. seems a different issue now, the port has turned into a big mess lately, it used to be fine. Please let me know if more info is required. [ 2%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/MD5.c.o [ 3%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.c.o In file included from /usr/include/_ctype.h:94:0, from /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd9.3/4.8.5/include-fixed/wchar.h:76, from /usr/ports/devel/cmake/work/cmake-3.3.1/Source/cmsys/Encoding.h:16, from /usr/ports/devel/cmake/work/cmake-3.3.1/Source/kwsys/EncodingC.c:13: /usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const' extern _Thread_local const _RuneLocale *_ThreadRuneLocale; ^ /usr/include/runetype.h: In function '__getCurrentRuneLocale': /usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclared (first use in this function) if (_ThreadRuneLocale) ^ /usr/include/runetype.h:96:6: note: each undeclared identifier is reported only once for each function it appears in *** [Source/kwsys/CMakeFiles/cmsys_c.dir/EncodingC.c.o] Error code 1 [ 3%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Base64.c.o [ 4%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/EncodingC.c.o In file included from /usr/include/_ctype.h:94:0, from /usr/include/ctype.h:46, from /usr/ports/devel/cmake/work/cmake-3.3.1/Source/kwsys/ProcessUNIX.c:70: /usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const' extern _Thread_local const _RuneLocale *_ThreadRuneLocale; ^ /usr/include/runetype.h: In function '__getCurrentRuneLocale': /usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclared (first use in this function) if (_ThreadRuneLocale) ^ /usr/include/runetype.h:96:6: note: each undeclared identifier is reported only once for each function it appears in *** [Source/kwsys/CMakeFiles/cmsys_c.dir/ProcessUNIX.c.o] Error code 1 [ 4%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/MD5.c.o In file included from /usr/include/_ctype.h:94:0, from /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd9.3/4.8.5/include-fixed/wchar.h:76, from /usr/ports/devel/cmake/work/cmake-3.3.1/Source/cmsys/Encoding.h:16, from /usr/ports/devel/cmake/work/cmake-3.3.1/Source/kwsys/EncodingC.c:13: /usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const' extern _Thread_local const _RuneLocale *_ThreadRuneLocale; ^ /usr/include/runetype.h: In function '__getCurrentRuneLocale': /usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclared (first use in this function) if (_ThreadRuneLocale) ^ /usr/include/runetype.h:96:6: note: each undeclared identifier is reported only once for each function it appears in *** [Source/kwsys/CMakeFiles/cmsys.dir/EncodingC.c.o] Error code 1 In file included from /usr/include/_ctype.h:94:0, from /usr/include/ctype.h:46, from /usr/ports/devel/cmake/work/cmake-3.3.1/Source/kwsys/ProcessUNIX.c:70: /usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const' extern _Thread_local const _RuneLocale *_ThreadRuneLocale; ^ /usr/include/runetype.h: In function '__getCurrentRuneLocale': /usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclared (first use in this function) if (_ThreadRuneLocale) ^ /usr/include/runetype.h:96:6: note: each undeclared identifier is reported only once for each function it appears in *** [Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.c.o] Error code 1 2 errors *** [Source/kwsys/CMakeFiles/cmsys_c.dir/all] Error code 2 2 errors *** [Source/kwsys/CMakeFiles/cmsys.dir/all] Error code 2 2 errors *** [all] Error code 2 1 error ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** [do-build] Error code 1 Stop in /usr/ports/devel/cmake. *** [stage] Error code 1 Stop in /usr/ports/devel/cmake. (In reply to chrysalis from comment #11) > seems a different issue now, the port has turned into a big mess lately, it > used to be fine. Please let me know if more info is required. Can you please submit a new PR? It doesn't seem to be related to jsoncpp, and it's about a different CMake version, so it's better to track it separately. yeah no worries, it does compile on gcc49 tho, I tried 49 as I found a web page with the exact same problem on a different port and that solution was to use 4.9 also. So it might be easier to maybe just add a warning ti is broken on gcc48. I will do the new PR later. gcc48 issue fixed in https://svnweb.freebsd.org/ports?view=revision&revision=397068 |