<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=""><blockquote type="cite" class=""><h1 style="background-color: rgb(255, 255, 255);" class="">libffi</h1><b style="background-color: rgb(255, 255, 255);" class="">Curtis Matz</b><span style="background-color: rgb(255, 255, 255);" class=""> </span><a href="mailto:macports-users%40lists.macports.org?Subject=Re%3A%20libffi&In-Reply-To=%3C1208744A-74A3-4691-8E53-22A6FD2FC52A%40matzzone.com%3E" title="libffi" style="background-color: rgb(255, 255, 255);" class="">curtis at matzzone.com </a><br style="background-color: rgb(255, 255, 255);" class=""><i style="background-color: rgb(255, 255, 255);" class="">Sun Jun 28 19:37:49 UTC 2020</i><span style="background-color: rgb(255, 255, 255);" class=""></span><div style="background-color: rgb(255, 255, 255);" class=""><br class="webkit-block-placeholder"></div><ul style="background-color: rgb(255, 255, 255);" class=""><li class="">Previous message (by thread): <a href="https://lists.macports.org/pipermail/macports-users/2020-June/048542.html" class="">faust-devel</a></li><li class="">Next message (by thread): <a href="https://lists.macports.org/pipermail/macports-users/2020-June/048545.html" class="">Noah port (and alternatives?)</a></li><li class=""><b class="">Messages sorted by:</b> <a href="https://lists.macports.org/pipermail/macports-users/2020-June/date.html#48544" class="">[ date ]</a> <a href="https://lists.macports.org/pipermail/macports-users/2020-June/thread.html#48544" class="">[ thread ]</a> <a href="https://lists.macports.org/pipermail/macports-users/2020-June/subject.html#48544" class="">[ subject ]</a> <a href="https://lists.macports.org/pipermail/macports-users/2020-June/author.html#48544" class="">[ author ]</a></li></ul><hr style="background-color: rgb(255, 255, 255);" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">I’ve installed libffi but I’m trying to compile and it says it can’t find ffi.h.  How do I tell my compiler which happens to be gcc9 to look in /opt/local for the header file?

><i class=""> port installed | grep libffi
</i>  libffi @3.2.1_0 (active)

src/rtlib/thread_call.c:33:10: fatal error: ffi.h: No such file or directory
   33 | #include <ffi.h>
      |          ^~~~~~~
compilation terminated.
make: *** [src/rtlib/obj/darwin-x86_64/thread_call.o] Error 1

</pre></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I take it you are trying to build your own software using stuff from MacPorts and it doesn’t work.</div><div class=""><br class=""></div><div class="">Homebrew always “just worked” but MacPorts does not. Sadly, you are the second person so far in as many weeks to ask how the heck to actually use macports :></div><div class=""><br class=""></div><div class="">For better or worse, richer or poorer, MacPorts has tucked all it’s software away in a hidden directly that no software ever looks in without being told to. That is __better__. That is __harder__. Sometimes __much_harder__. That’s because MacPorts was designed 20 years ago by software engineers who knew what they were doing, and knew how to do it right. It is safer/more secure/just better to do it this way.</div><div class=""><br class=""></div><div class="">It’s also 1000x harder for users, which is why the competition has done so frighteningly well with an mostly vastly inferior product (that everyone can use).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">You need to set up your bulld to use MacPorts. The easiest way to see how is to try to configure any good port using “sudo port -d configure XYZ”, and see what MacPorts does for you behind the scenes</div><div class=""><br class=""></div><div class="">=================</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">DEBUG: Environment: </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CC='/usr/bin/clang'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CC_PRINT_OPTIONS='YES'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_wget/wget/work/.CC_PRINT_OPTIONS'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CPATH='/opt/local/include'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CPPFLAGS='-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CXX='/usr/bin/clang++'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">DEVELOPER_DIR='/Library/Developer/CommandLineTools'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">F90FLAGS='-pipe -Os -m64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">FCFLAGS='-pipe -Os -m64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">FFLAGS='-pipe -Os -m64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">INSTALL='/usr/bin/install -c'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">LIBRARY_PATH='/opt/local/lib'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MACOSX_DEPLOYMENT_TARGET='10.15'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">OBJC='/usr/bin/clang'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">OBJCFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">OBJCXX='/usr/bin/clang++'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">OBJCXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">PERL='/opt/local/bin/perl5.28'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">POD2MAN='/opt/local/bin/pod2man-5.28'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">============</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Most of that, except the PERL and POD2MAN probably, is what you need to put into your environment with individual commands, a shell script, etc.</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">And if you’re trying to do that with Xcode — well please tell us all how. That’s really hard.</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">But better!</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Ken</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></body></html>