[OpenWrt-Devel] Package compile which requires Python.h

Alexandru Ardelean ardeleanalex at gmail.com
Sun Oct 18 04:42:35 EDT 2015


Yep, seen this a couple of times.

You're building for an x86 target, but you're including the host Python's
Python.h file.
Any idea why this happens ? Or if you're include paths are ok ?

It could also [very likely] be a regression with the Python package.
If you want, you could show me your Makefile and I can try to figure out
what's wrong.

An example of a Python package that builds as  C extension is this:
https://github.com/wlanslovenija/firmware-packages-opkg/blob/master/lang/python-greenlet/Makefile

Here's a similar issue [a Github link] which is closed:
https://github.com/openwrt/packages/issues/518

Cheers
Alex

On Sun, Oct 18, 2015 at 2:08 AM, W. Michael Petullo <mike at flyn.org> wrote:

> I am trying to create a new gobject-introspection package for
> OpenWrt. This package builds some code using Python.h. However, the
> configuration of gobject-introspection fails with the following appearing
> in config.log:
>
> configure:14641: i486-openwrt-linux-musl-gcc -E
> -I/home/mike/Source/openwrt/openwrt/staging_dir/target-i386_pentium4_musl-1.1.11/usr/include
> -I/home/mike/Source/openwrt/openwrt/staging_dir/target-i386_pentium4_musl-1.1.11/include
> -I/home/mike/Source/openwrt/openwrt/staging_dir/toolchain-i386_pentium4_gcc-4.8-linaro_musl-1.1.11/usr/include
> -I/home/mike/Source/openwrt/openwrt/staging_dir/toolchain-i386_pentium4_gcc-4.8-linaro_musl-1.1.11/include/fortify
> -I/home/mike/Source/openwrt/openwrt/staging_dir/toolchain-i386_pentium4_gcc-4.8-linaro_musl-1.1.11/include
> -I/home/mike/Source/openwrt/openwrt/staging_dir/target-i386_pentium4_musl-1.1.11/usr/lib/libiconv-stub/include
> -I/home/mike/Source/openwrt/openwrt/staging_dir/target-i386_pentium4_musl-1.1.11/usr/lib/libintl-stub/include
> -I/home/mike/Source/openwrt/openwrt/staging_dir/host/include/python2.7
> -I/home/mike/Source/openwrt/openwrt/staging_dir/host/include/python2.7
> conftest.c
> In file included from
> /home/mike/Source/openwrt/openwrt/staging_dir/host/include/python2.7/Python.h:8:0,
>                  from conftest.c:42:
> /home/mike/Source/openwrt/openwrt/staging_dir/host/include/python2.7/pyconfig.h:1019:0:
> warning: "SIZEOF_LONG" redefined [enabled by default]
>  #define SIZEOF_LONG 8
>  ^
> conftest.c:30:0: note: this is the location of the previous definition
>  #define SIZEOF_LONG 4
>  ^
> In file included from
> /home/mike/Source/openwrt/openwrt/staging_dir/host/include/python2.7/Python.h:58:0,
>                  from conftest.c:42:
> /home/mike/Source/openwrt/openwrt/staging_dir/host/include/python2.7/pyport.h:886:2:
> error: #error "LONG_BIT definition appears wrong for platform (bad
> gcc/glibc config?)."
>  #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
> config?)."
>   ^
>
> Has anyone else seen this LONG_BIT check causing a problem when building
> a Python-related package?
>
> --
> Mike
>
> :wq
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20151018/9bd677f7/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list