Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302519 - dev-lang/python-3.1.1-r1 cross-compiling fails (chflags test)
Summary: dev-lang/python-3.1.1-r1 cross-compiling fails (chflags test)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard: 3.1.2
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 20:38 UTC by Arsen Shnurkov
Modified: 2010-03-22 18:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/temp/environment (environment.txt,164.06 KB, text/plain)
2010-01-27 20:43 UTC, Arsen Shnurkov
Details
emerge-armv4tl-softfloat-linux-gnueabi -pqv =dev-lang/python-3.1.1-r1 (emerge.pqv.txt,386 bytes, text/plain)
2010-01-27 20:43 UTC, Arsen Shnurkov
Details
emerge-armv4tl-softfloat-linux-gnueabi --info =dev-lang/python-3.1.1-r1 (emerge.info.txt,2.97 KB, text/plain)
2010-01-27 20:43 UTC, Arsen Shnurkov
Details
/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/work/Python-3.1.1/config.log (config.log.txt,357.75 KB, text/plain)
2010-01-27 20:44 UTC, Arsen Shnurkov
Details
/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/temp/build.log (build.log.txt,59.59 KB, text/plain)
2010-01-27 20:44 UTC, Arsen Shnurkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arsen Shnurkov 2010-01-27 20:38:30 UTC
I do steps from the tutorial
http://gentoo.mindzoo.de/index.cgi/wiki/cross-compiling

after command
emerge-armv4tl-softfloat-linux-gnueabi world

compilation fails at ebuild  dev-lang/python-3.1.1-r1

with message
checking for chflags... configure: error: in `/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/work/Python-3.1.1':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.
Comment 1 Arsen Shnurkov 2010-01-27 20:43:10 UTC
Created attachment 217644 [details]
/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/temp/environment

S: '/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/work/Python-3.1.1'
Comment 2 Arsen Shnurkov 2010-01-27 20:43:34 UTC
Created attachment 217646 [details]
emerge-armv4tl-softfloat-linux-gnueabi -pqv =dev-lang/python-3.1.1-r1
Comment 3 Arsen Shnurkov 2010-01-27 20:43:58 UTC
Created attachment 217648 [details]
emerge-armv4tl-softfloat-linux-gnueabi --info =dev-lang/python-3.1.1-r1
Comment 4 Arsen Shnurkov 2010-01-27 20:44:24 UTC
Created attachment 217650 [details]
/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/work/Python-3.1.1/config.log
Comment 5 Arsen Shnurkov 2010-01-27 20:44:44 UTC
Created attachment 217652 [details]
/usr/armv4tl-softfloat-linux-gnueabi/tmp/portage/dev-lang/python-3.1.1-r1/temp/build.log
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2010-01-29 10:39:42 UTC
I'm not sure if it helps, but there is an article:
http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html

That said, reassigning on maintainers.
Comment 7 SpanKY gentoo-dev 2010-01-29 20:30:55 UTC
there's already fixes for the chflags test, but only in the python-2.6 ebuilds at the moment
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-01-30 20:22:34 UTC
The fix will be included in 3.1.2:
http://svn.python.org/view?view=rev&revision=77863
Comment 9 SpanKY gentoo-dev 2010-01-30 21:14:45 UTC
unless 3.1.2 is going to be released soonish, this should be added to 3.1.1
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-01-31 19:37:48 UTC
Reporter of this bug: Could you check if this patch is sufficient or if there are additional problems, which can be noticed after fixing of this problem?
Comment 11 gent_bz 2010-02-18 05:16:59 UTC
When building for powerpc-unknown-gnu-linux, in addition to the already-patched chflags and printf configure checks, I see configure failures when checking for getaddrinfo() and sem_open()

After working around these, the build works up until the source files in the Modules dir are compiled

powerpc-unknown-linux-gnu-gcc -fPIC -DNDEBUG -Os -pipe -mcpu=cell -fomit-frame-pointer -I/usr/powerpc-unknown-linux-gnu/usr/include/ -I/usr/powerpc-unknown-linux-gnu/include/ -I/usr/include -I. -I./Include -I/usr/local/include -IInclude -I/usr/powerpc-unknown-linux-gnu/tmp/portage/dev-lang/python-3.1.1-r2/work/Python-3.1.1 -c -I/usr/include -I. -I./Include -I/usr/local/include -IInclude -I/usr/powerpc-unknown-linux-gnu/tmp/portage/dev-lang/python-3.1.1-r2/work/Python-3.1.1 -c /usr/powerpc-unknown-linux-gnu/tmp/portage/dev-lang/python-3.1.1-r2/work/Python-3.1.1/Modules/selectmodule.c -o build/temp.linux-x86_64-3.1/usr/powerpc-unknown-linux-gnu/tmp/portage/dev-lang/python-3.1.1-r2/work/Python-3.1.1/Modules/selectmodule.o                                                                                    
/usr/powerpc-unknown-linux-gnu/tmp/portage/dev-lang/python-3.1.1-r2/work/Python-3.1.1/Modules/selectmodule.c: In function ‘seq2set’:                                                                                                    
/usr/powerpc-unknown-linux-gnu/tmp/portage/dev-lang/python-3.1.1-r2/work/Python-3.1.1/Modules/selectmodule.c:92: error: impossible constraint in ‘asm’


Note the presence of "-I/usr/include" in the command-line - the error corresponds to the use of the FD_OPEN() macro in selectmodule.c.  An x86-optimised version is used.  If I manually re-run the command without the -I/usr/include arg(s), there is no error.

I cannot determine where in the build system this argument (-I/usr/include) is being added.
Comment 12 gent_bz 2010-02-19 02:12:52 UTC
setup.py contains the following

if os.path.normpath(sys.prefix) != '/usr':
    add_dir_to_list(self.compiler.library_dirs,
                    sysconfig.get_config_var("LIBDIR"))
    add_dir_to_list(self.compiler.include_dirs,
                    sysconfig.get_config_var("INCLUDEDIR"))

which is what is adding /usr/include to the command line.  Removing this gets me past this problem to the next one.
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-04 18:54:06 UTC
(In reply to comment #12)

Please report it to upstream.
Comment 14 solar (RETIRED) gentoo-dev 2010-03-04 19:14:48 UTC
(In reply to comment #13)
> (In reply to comment #12)
> 
> Please report it to upstream.


Sadly upstream is not responsive in the case of cross-compiles. Kinda a lack of understanding. Lets just fix it at gentoo.
Comment 15 SpanKY gentoo-dev 2010-03-05 18:21:53 UTC
python cross-compiling support is done in parallel -- fixed in Gentoo and reported upstream.  simply dumping it as UPSTREAM isnt going to fly.

going by the response here though, i'm guessing i'm just going to have to fix it myself again.
Comment 16 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-21 17:03:47 UTC
(In reply to comment #12)
> setup.py contains the following
> 
> if os.path.normpath(sys.prefix) != '/usr':
>     add_dir_to_list(self.compiler.library_dirs,
>                     sysconfig.get_config_var("LIBDIR"))
>     add_dir_to_list(self.compiler.include_dirs,
>                     sysconfig.get_config_var("INCLUDEDIR"))

This code exists also in Python 2.4.*, 2.5.* and 2.6.*.
Comment 17 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-22 18:13:35 UTC
Fixed in 3.1.2.