> libffi
> 
> Curtis Matz curtis at matzzone.com  
> <mailto:macports-users%40lists.macports.org?Subject=Re%3A%20libffi&In-Reply-To=%3C1208744A-74A3-4691-8E53-22A6FD2FC52A%40matzzone.com%3E>
> Sun Jun 28 19:37:49 UTC 2020
> 
> Previous message (by thread): faust-devel 
> <https://lists.macports.org/pipermail/macports-users/2020-June/048542.html>
> Next message (by thread): Noah port (and alternatives?) 
> <https://lists.macports.org/pipermail/macports-users/2020-June/048545.html>
> Messages sorted by: [ date ] 
> <https://lists.macports.org/pipermail/macports-users/2020-June/date.html#48544>
>  [ thread ] 
> <https://lists.macports.org/pipermail/macports-users/2020-June/thread.html#48544>
>  [ subject ] 
> <https://lists.macports.org/pipermail/macports-users/2020-June/subject.html#48544>
>  [ author ] 
> <https://lists.macports.org/pipermail/macports-users/2020-June/author.html#48544>
> 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?
> 
> > port installed | grep libffi
>   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
> 


I take it you are trying to build your own software using stuff from MacPorts 
and it doesn’t work.

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 :>

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.

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).


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

=================

DEBUG: Environment: 
CC='/usr/bin/clang'
CC_PRINT_OPTIONS='YES'
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'
CFLAGS='-pipe -Os 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
CXX='/usr/bin/clang++'
CXXFLAGS='-pipe -Os -stdlib=libc++ 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
F90FLAGS='-pipe -Os -m64'
FCFLAGS='-pipe -Os -m64'
FFLAGS='-pipe -Os -m64'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names 
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch 
x86_64'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.15'
OBJC='/usr/bin/clang'
OBJCFLAGS='-pipe -Os 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'
OBJCXX='/usr/bin/clang++'
OBJCXXFLAGS='-pipe -Os -stdlib=libc++ 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64'
PERL='/opt/local/bin/perl5.28'
POD2MAN='/opt/local/bin/pod2man-5.28'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'

============

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.

And if you’re trying to do that with Xcode — well please tell us all how. 
That’s really hard.

But better!


Ken


Reply via email to