yabasic icon indicating copy to clipboard operation
yabasic copied to clipboard

Find ffi.h outside of /usr/include

Open flwyd opened this issue 4 years ago • 4 comments

The MacPorts distribution of yabasic fails in the configure step because configure can't find libffi. MacPorts installs everything in /opt/local and ffi.h in particular is in /opt/local/lib/libffi-3.2.1/include.

I can get yabasic to install by configuring the Portfile to pass --disable-use-ffi to configure. However, it would be nice if configure could locate the libffi installation and pass it as a -I parameter to the compiler. Two standard ways to handle this:

  1. Accept a --with-libffi=/path/to/ffi argument to configure. (Some packages have --with-ffi-include and --with-ffi-lib for separate -I and -L paths.)
  2. If pkg-config is present, call pkg-config --cflags libffi and pkg-config --libs libffi and pass the results through to the Makefile.

flwyd avatar Mar 29 '20 04:03 flwyd

Hi Trevor,  thanx I will look into this ! Generally speaking, I am interested in a standard way to support yabasic on a Mac (without having a Mac myself ...). So your mail is very welcome and I will try to add those switches. Please stand by :-) On 29.03.2020 06:17:31, Trevor Stone [email protected] wrote: The MacPorts [https://macports.org] distribution of yabasic fails in the configure step because configure can't find libffi. MacPorts installs everything in /opt/local and ffi.h in particular is in /opt/local/lib/libffi-3.2.1/include. I can get yabasic to install by configuring the Portfile to pass --disable-use-ffi to configure. However, it would be nice if configure could locate the libffi installation and pass it as a -I parameter to the compiler. Two standard ways to handle this:

  • Accept a --with-libffi=/path/to/ffi argument to configure. (Some packages have --with-ffi-include and --with-ffi-lib for separate -I and -L paths.)
  • If pkg-config [https://en.wikipedia.org/wiki/Pkg-config] is present, call pkg-config --cflags libffi and pkg-config --libs libffi and pass the results through to the Makefile. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [https://github.com/marcIhm/yabasic/issues/41], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC5EZHSJATCHGG34HGSG4N3RJ3DVRANCNFSM4LV2NUYQ].

marcIhm avatar Mar 29 '20 16:03 marcIhm

Hi Trevor, thanx for suggesting pkg-config ! Version 2.86.7 uses it and its configure now has a switch --with-ffi . Could you please give it a try (tar-file attached) ? regards Marc

On 29.03.2020 06:17:31, Trevor Stone [email protected] wrote: The MacPorts [https://macports.org] distribution of yabasic fails in the configure step because configure can't find libffi. MacPorts installs everything in /opt/local and ffi.h in particular is in /opt/local/lib/libffi-3.2.1/include. I can get yabasic to install by configuring the Portfile to pass --disable-use-ffi to configure. However, it would be nice if configure could locate the libffi installation and pass it as a -I parameter to the compiler. Two standard ways to handle this:

  • Accept a --with-libffi=/path/to/ffi argument to configure. (Some packages have --with-ffi-include and --with-ffi-lib for separate -I and -L paths.)
  • If pkg-config [https://en.wikipedia.org/wiki/Pkg-config] is present, call pkg-config --cflags libffi and pkg-config --libs libffi and pass the results through to the Makefile. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [https://github.com/marcIhm/yabasic/issues/41], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC5EZHSJATCHGG34HGSG4N3RJ3DVRANCNFSM4LV2NUYQ].

marcIhm avatar Apr 04 '20 13:04 marcIhm

If I understand Trevor correctly (private communication), this is fixed with a small mod he suggested and which I included in configure.ac.

marcIhm avatar Apr 26 '20 15:04 marcIhm

yabasic 2.86.8 has another small change in this area, so I am leaving this open for another while ...

marcIhm avatar May 09 '20 12:05 marcIhm