Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fedora 31] pyconfig.h no such file or directory #863

Open
svelle opened this issue Oct 13, 2020 · 2 comments
Open

[Fedora 31] pyconfig.h no such file or directory #863

svelle opened this issue Oct 13, 2020 · 2 comments

Comments

@svelle
Copy link

svelle commented Oct 13, 2020

When building current master on Fedora 31 with all dependencies installed ./autogen.sh seems to have issues finding the proper dependencies since Fedora seems to work with a different include directory /usr/include/python3.7m instead of /usr/include/python3.7 after a little bit of searching around I decided to just symlink the m directory to where the expected directory would be and now everything seems to be working.
I still feel like this is a rather bad workaround and am now wondering if a) there's a way to manually set the include directory or b) fix whatever is causing the ./autogen.sh to look in the wrong directory in the first place which in my case didn't even exist.

I'm not really familiar with the project but would be happy to contribute a fix for this, probably would need a little guidance though.

Cheers!

Edit: changed autoconfigure to autogen

@kmancini
Copy link
Contributor

kmancini commented Oct 14, 2020

Hi Sven, Thanks for reaching out!

couple of questions to help understand what is going on here:

  1. You mention an ./autoconfigure.sh script, but I am unfamiliar with one of these for watchman. Do you mean autogen.sh? Could you share all of the commands that you ran in addition to their full output (maybe linked in a file here)?

  2. What does which -a python3 give you?

  3. What is your current $PATH set up as?

@svelle
Copy link
Author

svelle commented Oct 14, 2020

Hey @kmancini thanks for the prompt reply. I actually meant ./autgen.sh (I'm going to edit my opening post after this one to make it clear to everyone reading)

I only installed dependencies (openssl-devel, redhat-rpm-config, python3-devel and python-devel for good measure)

[11:40:45] svelle:~ $ which -a python3
/usr/bin/python3
[11:42:17] svelle:~ $ echo $PATH                                                   
/home/svelle/.nvm/versions/node/v14.6.0/bin:/home/svelle/Android/Sdk/tools:/home/svelle/Android/Sdk/platform-tools:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/svelle/bin:/home/svelle/.dotnet/tools:/home/svelle/.dotnet/tools:/home/svelle/.bin

output of locate clearly shows that the pyconfig.h is available on the system

[11:57:50] svelle:watchman git:(master*) $ locate pyconfig.h
/home/svelle/.local/lib/python3.7/site-packages/numpy/core/include/numpy/_numpyconfig.h
/home/svelle/.local/lib/python3.7/site-packages/numpy/core/include/numpy/numpyconfig.h
/usr/include/python2.7/pyconfig.h
/usr/include/python3.7m/pyconfig.h

Here's the complete output of autogen after I removed the symlink.

autogen.log

Inside the log you can see that g++ is being called with /usr/include/python3.7 as an argument. Which doesn't exist on the system.

Line 61918 and following:

    "g++"   -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -g -fvisibility=default  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -I"." -I"/usr/include/python3.7" -c -o "bin.v2/libs/python/build/gcc-9.3.1/release/debug-symbols-on/link-static/python-3.7/threading-multi/visibility-global/list.o" "libs/python/src/list.cpp"

Which then results in the following error:

In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/list.hpp:8,
                 from libs/python/src/list.cpp:5:
./boost/python/detail/wrap_python.hpp:50:11: fatal error: pyconfig.h: No such file or directory
   50 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants