Undefined symbols for architecture x86_64 on jsonnet submission

Christopher Jones jonesc at hep.phy.cam.ac.uk
Sat Nov 23 12:48:12 UTC 2019



> On 23 Nov 2019, at 12:29 pm, Steven Smith <steve.t.smith at gmail.com> wrote:
> 
> This is a 100% MacPorts default flags or env issue, and nothing to do with Google’s upstream repo or code.
> 
> First, the repo’s make command works on macOS <https://github.com/google/jsonnet <https://github.com/google/jsonnet>>:
> 
>> make CC=clang CXX=clang++
> 
> Second, Homebrew uses this formula for their own macOS distribution. See <https://github.com/Homebrew/homebrew-core/blob/master/Formula/jsonnet.rb <https://github.com/Homebrew/homebrew-core/blob/master/Formula/jsonnet.rb>>, which btw is Google’s recommended install approach.
> 
> Third, I’ve tried using this Portfile configuration (without the cmake portgroup), but run into the same issue:
> 
>> compiler.cxx_standard 2011
>> use_configure       no
>> build.target
> 
> The only thing left is the environment and flags that MacPorts sets during the call to make.
> 
> This tells me it will be possible to turns off all MacPorts build flags so that the Portfile essentially just runs “make CC=clang CXX=clang++” and get a successful build and install.
> 
> Is turning off all MacPorts build flags the recommended approach here?

No. You need to try and isolate the one causing the issue, if you believe it is something MacPorts is appending to the env, and then address that specifically.

> 
> Here are the flags set by Google’s upstream repo:
> 
> <https://github.com/google/jsonnet/blob/master/Makefile <https://github.com/google/jsonnet/blob/master/Makefile>>
> 
>> CXXFLAGS ?= -g $(OPT) -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC
>> CXXFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json
>> CFLAGS ?= -g $(OPT) -Wall -Wextra -pedantic -std=c99 -fPIC
>> CFLAGS += -Iinclude
>> MAKEDEPENDFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json
>> EMCXXFLAGS = $(CXXFLAGS) -g0 -Os --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0 -s OUTLINING_LIMIT=10000 -s RESERVED_FUNCTION_POINTERS=20 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1
>> EMCFLAGS = $(CFLAGS) --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1
>> LDFLAGS ?=
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20191123/b1dab707/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20191123/b1dab707/attachment-0001.bin>


More information about the macports-dev mailing list