daducci / COMMIT

Linear framework to combine tractography and tissue micro-structure estimation with diffusion MRI
Other
43 stars 33 forks source link

/usr/include/stdio.h issue #58

Closed mdesco closed 3 years ago

mdesco commented 5 years ago

Hi all.

This is not an issue because I solved it but it might be helpful for other Mac Users when installing commit. With new Mac, you might get this error when running pip install .

/Users/desm2239/anaconda2/bin/../include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file not found

include_next

              ^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1

This is because your stdio.h is not in your /usr/include when Xcode installs stuff.

Now, on top of this, you cannot create a symlink or a directory in /usr/include. New MacOSX, after El Capitan block you.

So, you must disable SIP: https://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-macos-os-x

Next, you can create a symlink /usr/include using something like this. find /Applications/Xcode.app -name stdio.h sudo ln -sf /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ /usr/include

pip install . should now work!

Hope this helps others...

daducci commented 3 years ago

I've never seen this problem happening anymore, so I will close this issue now.