Created attachment 191258 [details] scons->cmake patch for head/devel/jsoncpp/Makefile 462353 2018-02-19 22:25:14Z yuri == Issue == 1. From README.md: "The SCons-based build system is deprecated. Please use CMake" 2. From SConstruct: "shared library support is buggy: it assumes that a static and dynamic library can be build from the same object files. This is not true on many platforms" 3. With python 3.* claimed system default it doesn't build because of several syntax errors in SConstruct and undefined functions called == Solution (all three issues) == Follow README.md and use CMake instead of scons. It require simple change in Makefile only, see attachment. Moreover, devel/jsoncpp/files/patch-SConstruct and devel/jsoncpp/files/patch-src_lib__json_sconscript become obsolete and can be removed. Brief summary of Makefile changes: 1: scons replaced by cmake:noninja in USES 2: scons related args PLATFORM and MAKE_ARGS replaced by CMAKE_ARGS 3: paths in "do_install" modified to follow CMAKE flavor of build tree 4: "do-test" modified to follow CMAKE flavor of test
(In reply to Dan Lukes from comment #0) This causes a dependency loop because cmake requires jsoncpp. One way to avoid the loop might be to create a port for cmake without jsoncpp support and use that to build jsoncpp. Then the regular cmake port can depend on jsoncpp.
(In reply to Steve Wills from comment #1) They also support meson build. This is another possible solution.
(In reply to Steve Wills from comment #1) Or use --no-system-jsoncpp option during configuration phase of devel/cmake. It's the solution I'm using now. I will take whatever solution that will work. As mentioned already, SCons doesn't compile on system with python 3.* claimed default and even worse, it seems it create broken binaries on some platforms (i didn't verified it by self).
(In reply to Dan Lukes from comment #3) Ok, I will update within a few days.
Created attachment 191711 [details] patch This patch uses meson.
It'll take me a while to make sure all dependencies work with this new version. Chromium is a dependency.
math/pdal fails: https://github.com/PDAL/PDAL/issues/1866
(In reply to Yuri Victorovich from comment #7) math/pdal (current version, e.g. 1.6_2) doesn't compile even now, if PYTHON option is unset during config phase. It seems PYNUMPY is required to compile PDAL all the times, just RUN dependency to Python can be avoided by -DBUILD_PLUGIN_PYTHON:BOOL=FALSE But bug #226401 (this bug) is not dedicated to math/pdal bugs, of course - I would just like to note that PDAL port is broken regardless JSONCPP version ================= according https://github.com/PDAL/PDAL/issues/1866 you may consider not to wait for next PDAL release. The issue has been patched by very simple patch - all five occurrences of Json::Value name = dim.removeMember("....."); has been replaced by Json::Value name = dim.get(".....", empty); dim.removeMember("....."); You may consider to use 1.8.4 even with current PDAL if following patch will placed in math/pdal/files/ : https://github.com/PDAL/PDAL/commit/f717a4ceabf2c23fcb03838945865cd54a4698c7
PDAL python bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226838
Created attachment 196322 [details] Fixed SConstruct to support Python3 This is patch for SConstruct build file to match python support as do SCons itself (current version supports Python2.7 and Python 3.5+)
Please also refer the issuse https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230734 on SCons itself
Is it possible to install cmake config files for jsoncpp when building with scons/meson somehow?
(In reply to Eir Nym from comment #11) the attached patch to SConstruct is no different to what we have in svn now (and doesn't allow to build with python3), maybe you have attached a wrong file?
(In reply to Daniel Gerzo from comment #13) Indeed. The jsoncpp was updated to drop scons as build system (update was requested in another issue) BTW, The jsoncpp 1.8.4 works fine for me with all my apps without additional patches.
It is not true that SCons builds shared library from the same object files as static library. Unless they have really heavily hacked SCons build system standard version: libshared = env.SharedLibrary(target = 'libname', source = Split("a.c b.c")) will do the right thing. Python 2/3 compatibility for scons_site scripts needs just minor adjustments, I did it for my two projects yesterday.
Created attachment 207161 [details] Fix jsoncpp build with python 3 I needed to test a port that depends of jsoncpp and it was broken on my poudriere session so I did the changes contained in this attachment to SConstruct to make it build and be able to finish my tests.
Can be closed as of r522975?
The port update has been committed.