Re: Missing python.h when building ntpsec


Mans Zigher
 

Hi,

So Python.h does actually exist. It was just me that was looking for
the wrong file python.h but the issue is that ntpsec is not able to
find the h-file

['arm-oe-linux-gnueabi-gcc', '-march=armv7-a', '-mfpu=neon',
'-mfloat-abi=hard', '-fstack-protector-strong', '-pie', '-fPIE',
'-D_FORTIFY_SOURCE=2', '-Wa,--noexecstack', '-Wformat',
'-Wformat-security', '-Werror=format-security',
'--sysroot=/home/extmzigher/Workspace/2016platform/python_product/builds/python/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/ntpsec/1.2.1-r0/recipe-sysroot',
'-DUNITY_EXCLUDE_FLOAT_PRINT', '-fstack-protector-all', '-Wshadow',
'-Wpacked', '-Wcast-qual', '-Wmissing-declarations',
'-Wdisabled-optimization', '-Wimplicit-function-declaration',
'-Winvalid-pch', '-Wpointer-arith', '-Wwrite-strings', '-Winit-self',
'-Wfloat-equal', '-Wformat', '-Wformat-signedness',
'-Wformat-security', '-Wsuggest-attribute=noreturn', '-fPIC', '-O1',
'-Wall', '-Wextra', '-Wmissing-prototypes', '-Wstrict-prototypes',
'-Wundef', '-Wunused', '-g', '-O2', '-Wa,--noexecstack',
'-fexpensive-optimizations', '-frename-registers', '-ftree-vectorize',
'-finline-functions', '-finline-limit=64',
'-Wno-error=maybe-uninitialized', '-Wno-error=unused-result',
'-fno-omit-frame-pointer', '-DTARGET_ION_ABI_VERSION=2',
'-I${PYTHON_INCLUDE_DIR}', '-fPIC', '../../test.c', '-c',
'-o/home/extmzigher/Workspace/2016platform/python_product/builds/python/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/ntpsec/1.2.1-r0/ntpsec-1.2.1/build/.conf_check_d3b505aa7ab58576b6d76a2fc3091b1f/testbuild/main/test.c.1.o']
err: ../../test.c:2:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.

from /home/extmzigher/Workspace/2016platform/python_product/builds/python/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/ntpsec/1.2.1-r0/ntpsec-1.2.1/pylib:
Test does not build: Traceback (most recent call last):
File "/home/extmzigher/Workspace/2016platform/python_product/builds/python/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/ntpsec/1.2.1-r0/ntpsec-1.2.1/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Configure.py",
line 335, in run_build
bld.compile()
File "/home/extmzigher/Workspace/2016platform/python_product/builds/python/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/ntpsec/1.2.1-r0/ntpsec-1.2.1/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Build.py",
line 176, in compile
raise Errors.BuildError(self.producer.error)
BuildError: Build failed
-> task in 'testprog' failed with exit status 1 (run with -v to
display more information)

Could not build python extensions
from /home/extmzigher/Workspace/2016platform/python_product/builds/python/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/ntpsec/1.2.1-r0/ntpsec-1.2.1/pylib

So something is not correct with the include path. But thanks for your help

Thanks,


Den ons 9 feb. 2022 kl 18:51 skrev Khem Raj <raj.khem@...>:


On Wed, Feb 9, 2022 at 5:50 AM Mans Zigher <mans.zigher@...> wrote:

Hi,

I am trying to backport ntpsec from master to Thud but I have
encountered an issue where python.h is missing in the sysroot for the
ntpsec so the configuration task is failing. The ntpsec recipe has

DEPENDS += "bison-native \
openssl \
python3"

So should that not result in python.h being included to the sysroot
for the ntpsec? Any hints on what to look for?
what happens if you change python3 to python in depends

Thanks,


Join openembedded-core@lists.openembedded.org to automatically receive all group messages.