<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On 23 Nov 2019, at 12:57 pm, Steven Smith <steve.t.smith@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><blockquote type="cite">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.</blockquote><div dir="ltr"><span><br></span></div><div dir="ltr"><span>That’s what I’m asking for help to do.</span></div><div dir="ltr"><br></div><div dir="ltr">How are these flags and environment variables set within a Portfile?<br><span></span><br><span>I don’t know enough about the MacPorts build design or clang options enough to go through all the combinatoric flag settings, or to divide-and-conquer the problem.</span><br><span></span><br><div class="" style="-webkit-text-size-adjust: auto;">Here are the flags set by Google’s upstream repo, <<a href="https://github.com/google/jsonnet/blob/master/Makefile" class="">https://github.com/google/jsonnet/blob/master/Makefile</a>>:</div><div class="" style="-webkit-text-size-adjust: auto;"><blockquote type="cite" class=""><div class="x-apple-transform-wrapper" style="height: 67.85603895887304px;"><table class="js-file-line-container highlight 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; transform-origin: 0px 0px; transform: scale(0.4241002434929565); width: 1399.328125px !important; height: 160px !important;"><tbody class="" style="box-sizing: border-box;"><tr class="" style="box-sizing: border-box;"></tr><tr class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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 class="" style="box-sizing: border-box;"><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></div></blockquote></div><span></span><div dir="ltr"><br></div><div dir="ltr">How are these variables and flags unset/reset within a Portfile?</div></div></div></blockquote><div><br></div>See <div><br></div><div><a href="https://guide.macports.org/">https://guide.macports.org/</a></div><div><br></div><div>There is a section in there explaining how CFLAGS etc. are set.<br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><br></div></div></blockquote></div></body></html>