You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by Gordon King <no...@github.com.INVALID> on 2021/07/20 16:36:21 UTC

[apache/incubator-teaclave] Python.h not found (#526)

On my system, the following error message shown up when compiling acs_py_enclave.c

`
Scanning dependencies of target pycomponent
[ 34%] Building C object CMakeFiles/pycomponent.dir/intermediate/acs_py_enclave.c.o
/home/gordon/incubator-teaclave/build/intermediate/acs_py_enclave.c:29:10: fatal error: Python.h: No such file or directory
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.
CMakeFiles/pycomponent.dir/build.make:67: recipe for target 'CMakeFiles/pycomponent.dir/intermediate/acs_py_enclave.c.o' failed
make[2]: *** [CMakeFiles/pycomponent.dir/intermediate/acs_py_enclave.c.o] Error 1
CMakeFiles/Makefile2:720: recipe for target 'CMakeFiles/pycomponent.dir/all' failed
make[1]: *** [CMakeFiles/pycomponent.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
`

My finding is the following script snippet that didn't detect the dependency correctly in file `CMakeLists.txt`, because the package `pypy` also put some header files e.g. `pypy_decl.h` in this folder so we cannot safely say that the `pypy_dev` has got installed if the folder `/usr/lib/pypy/include` exists.
`
if(NOT EXISTS "/usr/lib/pypy/include")
  message(
    FATAL_ERROR
      "pypy development package not found\nFor Ubuntu, please run `apt-get install pypy-dev`"
  )
endif()
`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/526

Re: [apache/incubator-teaclave] Python.h not found (#526)

Posted by Mingshen Sun <no...@github.com.INVALID>.
Closed #526.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/526#event-5045663760

Re: [apache/incubator-teaclave] Python.h not found (#526)

Posted by Mingshen Sun <no...@github.com.INVALID>.
Nice catch! Thanks.

Normally, we use docker container to build Teaclave.

CMakeList may miss some dependency checks.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/526#issuecomment-883537064

Re: [apache/incubator-teaclave] Python.h not found (#526)

Posted by Mingshen Sun <no...@github.com.INVALID>.
Merged.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-teaclave/issues/526#issuecomment-883568200