<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 23 Nov 2019, at 12:29 pm, Steven Smith <<a href="mailto:steve.t.smith@gmail.com" class="">steve.t.smith@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This is a 100% MacPorts default flags or env issue, and nothing to do with Google’s upstream repo or code.<div class=""><br class=""></div><div class="">First, the repo’s make command works on macOS <<a href="https://github.com/google/jsonnet" class="">https://github.com/google/jsonnet</a>>:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 16px; word-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; caret-color: rgb(36, 41, 46); color: rgb(36, 41, 46);" class=""><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; padding: 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal; border: 0px; display: inline; overflow: visible; line-height: inherit; word-wrap: normal;" class="">make CC=clang CXX=clang++</code></pre></blockquote><div class=""><br class=""></div></div><div class="">Second, Homebrew uses this formula for their own macOS distribution. See <<a href="https://github.com/Homebrew/homebrew-core/blob/master/Formula/jsonnet.rb" class="">https://github.com/Homebrew/homebrew-core/blob/master/Formula/jsonnet.rb</a>>, which btw is Google’s recommended install approach.</div><div class=""><br class=""></div><div class="">Third, I’ve tried using this Portfile configuration (without the cmake portgroup), but run into the same issue:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">compiler.cxx_standard 2011</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">use_configure       no</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">build.target</span></div></blockquote><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><br class=""></div></div><div class="">The only thing left is the environment and flags that MacPorts sets during the call to make.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Is turning off all MacPorts build flags the recommended approach here?</div></div></div></div></blockquote><div><br class=""></div><div>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.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><br class=""></div><div class="">Here are the flags set by Google’s upstream repo:</div><div class=""><br class=""></div><div class=""><<a href="https://github.com/google/jsonnet/blob/master/Makefile" class="">https://github.com/google/jsonnet/blob/master/Makefile</a>></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><table class="highlight js-file-line-container tab-size" data-tab-size="8" style="box-sizing: border-box; border-spacing: 0px; border-collapse: collapse; tab-size: 8; caret-color: rgb(36, 41, 46); color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px;"><tbody style="box-sizing: border-box;" class=""><tr style="box-sizing: border-box;" class=""></tr><tr style="box-sizing: border-box;" class=""><td id="LC32" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"></td></tr><tr style="box-sizing: border-box;" class=""><td id="L34" class="blob-num js-line-number" data-line-number="34" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC34" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">CXXFLAGS</span> ?= -g <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">$(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">OPT</span>)</span> -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC</td></tr><tr style="box-sizing: border-box;" class=""><td id="L35" class="blob-num js-line-number" data-line-number="35" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC35" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">CXXFLAGS</span> += -Iinclude -Ithird_party/md5 -Ithird_party/json</td></tr><tr style="box-sizing: border-box;" class=""><td id="L36" class="blob-num js-line-number" data-line-number="36" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC36" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">CFLAGS</span> ?= -g <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">$(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">OPT</span>)</span> -Wall -Wextra -pedantic -std=c99 -fPIC</td></tr><tr style="box-sizing: border-box;" class=""><td id="L37" class="blob-num js-line-number" data-line-number="37" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC37" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">CFLAGS</span> += -Iinclude</td></tr><tr style="box-sizing: border-box;" class=""><td id="L38" class="blob-num js-line-number" data-line-number="38" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC38" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">MAKEDEPENDFLAGS</span> += -Iinclude -Ithird_party/md5 -Ithird_party/json</td></tr><tr style="box-sizing: border-box;" class=""><td id="L39" class="blob-num js-line-number" data-line-number="39" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC39" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">EMCXXFLAGS</span> = <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">$(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">CXXFLAGS</span>)</span> -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</td></tr><tr style="box-sizing: border-box;" class=""><td id="L40" class="blob-num js-line-number" data-line-number="40" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC40" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">EMCFLAGS</span> = <span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98);">$(<span class="pl-smi" style="box-sizing: border-box; color: rgb(36, 41, 46);">CFLAGS</span>)</span> --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1</td></tr><tr style="box-sizing: border-box;" class=""><td id="L41" class="blob-num js-line-number" data-line-number="41" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.298039); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none;"></td><td id="LC41" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; overflow: visible; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"><span class="pl-smi" style="box-sizing: border-box;">LDFLAGS</span> ?=</td></tr></tbody></table></blockquote></div><div class=""><div class=""><br class=""></div><br class=""></div></div></div></div></blockquote></div><br class=""></body></html>