Hello all, does anyone know what may be causing th...
# general
h
Hello all, does anyone know what may be causing the following error when trying to bootstrap pants?
Copy code
c/_cffi_backend.c:15:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
         ^
1 error generated.
It has occurred on a coworkers machine after upgrading to Mac Mojave (which we are not currently on). We have attempted to install
libffi
through homebrew on the machine
a
have you installed the
cffi
package?
h
Ah, will check and run on the laptop when he is back from a meeting. That makes a lot of sense
w
also, make sure that you don't have
echo "$GCC"
set to anything
a
well, it shouldn't be happening imo and i've been meaning to fix having to have these requirements preinstalled for a while
w
have seen system headers go missing when that was misconfigured.
a
but there are known packages you have to have installed to have this bootstrap and i think
cffi
will affect the one you have there (noting stu's comment)
w
@aloof-angle-91616:
cffi
is a python package, right?
a
yes, i was going to make that clear and didn't.
pip install cffi
should work
w
that's a c header
a
yes
h
I have seen some recommendations about symlinking gcc so’s, but that seems like pushing back problems for a later time
a
i'm thinking of how to repro this effectively
w
afaik, there should not be any setup required with regard to ffi, so i would suspect the compiler environment.
a
well
cffi
definitely needs to be installed so if that's not installed it needs to be done anyway
h
I have
cffi
on my machine and do not have this problem:
Copy code
$ pip freeze | ag cffi
cffi==1.10.0
👍 1
a
ah! then listen to stu
h
Well, I believe I will need it on my co-workers laptop and will be able to try that some time this afternoon 🙂
a
oh! i think it's the xcode tools
h
ah!
a
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi/ffi.h
on my machine
have you done
xcode-select --install
yet?
this won't install xcode just the cli tools
w
(re cffi: i'm pretty certain it does not need to be installed. it's in the venv that we create during bootstrap)
Copy code
$ pip list
Package    Version
---------- -------
coverage   3.7.1
pip        18.0
psutil     2.1.1
setuptools 40.0.0
virtualenv 16.0.0
wheel      0.31.1
h
I see that and will check on his computer
Copy code
$ ls /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi/
ffi.h           ffi_common.h    fficonfig.h     ffitarget.h     ppc-darwin.h    ppc-ffitarget.h x86-ffitarget.h
We tried
xcode-select --install
, but it instructed us to update/upgrade from XCode. I will try that before installing
cffi
through pip
a
ok, i would recommend that
in the c++ support we have a good error message for this but it looks like we should probably extend that check to the bootstrap phase
thanks for your patience
and yes @witty-crayon-22786
cffi
is in the
3rdparty/python/requirements.txt
but i have had to install it several times on several machines in order for it to work (this may be a linux only issue -- therefore it wouldn't be relevant here)
w
guessing that that would be due to a transitive dep on
ffi-devel
or something
👍 2
a
now that's a protip
h
Thanks guys! I will let you all know how far we get this afternoon. I think this is the most likely problem
🤞 2
a
i am using mojave and we have had to make several changes to support it since then, we are absolutely supporting mojave to build pants so please raise any further issues you see bootstrapping
👍 1