All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing python.h when building ntpsec
@ 2022-02-09 13:50 Måns
  2022-02-09 17:51 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Måns @ 2022-02-09 13:50 UTC (permalink / raw)
  To: OE-core

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?

Thanks,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] Missing python.h when building ntpsec
  2022-02-09 13:50 Missing python.h when building ntpsec Måns
@ 2022-02-09 17:51 ` Khem Raj
  2022-02-10 11:40   ` Måns
       [not found]   ` <16D269E7B2ADA751.11771@lists.openembedded.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2022-02-09 17:51 UTC (permalink / raw)
  To: Mans Zigher; +Cc: OE-core

On Wed, Feb 9, 2022 at 5:50 AM Mans Zigher <mans.zigher@gmail.com> 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,
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#161562): https://lists.openembedded.org/g/openembedded-core/message/161562
> Mute This Topic: https://lists.openembedded.org/mt/89021393/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] Missing python.h when building ntpsec
  2022-02-09 17:51 ` [OE-core] " Khem Raj
@ 2022-02-10 11:40   ` Måns
       [not found]   ` <16D269E7B2ADA751.11771@lists.openembedded.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Måns @ 2022-02-10 11:40 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core

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@gmail.com>:
>
> On Wed, Feb 9, 2022 at 5:50 AM Mans Zigher <mans.zigher@gmail.com> 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,
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#161562): https://lists.openembedded.org/g/openembedded-core/message/161562
> > Mute This Topic: https://lists.openembedded.org/mt/89021393/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] Missing python.h when building ntpsec
       [not found]   ` <16D269E7B2ADA751.11771@lists.openembedded.org>
@ 2022-02-10 12:34     ` Måns
  0 siblings, 0 replies; 4+ messages in thread
From: Måns @ 2022-02-10 12:34 UTC (permalink / raw)
  To: mans; +Cc: Khem Raj, OE-core

For anyone stumbling on this issue the solution is to adjust the
recipe to contain

CFLAGS_append = " -I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/"

instead of

CFLAGS_append = " -I${PYTHON_INCLUDE_DIR}"


Den tors 10 feb. 2022 kl 12:40 skrev Mans Zigher via
lists.openembedded.org <mans.zigher=gmail.com@lists.openembedded.org>:
>
> 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@gmail.com>:
> >
> > On Wed, Feb 9, 2022 at 5:50 AM Mans Zigher <mans.zigher@gmail.com> 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,
> > >
> > >
> > >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#161608): https://lists.openembedded.org/g/openembedded-core/message/161608
> Mute This Topic: https://lists.openembedded.org/mt/89021393/3617459
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mans.zigher@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-10 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 13:50 Missing python.h when building ntpsec Måns
2022-02-09 17:51 ` [OE-core] " Khem Raj
2022-02-10 11:40   ` Måns
     [not found]   ` <16D269E7B2ADA751.11771@lists.openembedded.org>
2022-02-10 12:34     ` Måns

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.