FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Alt

 
 
LinkBack Thread Tools
 
Old 09-13-2010, 10:47 AM
Al
 
Default Gentoo/Cygwin: Vicious Python

Hello,

to save me hours of debuggins, I hope to find some hints for the bunch
of Python related issus. I add the full build log as attachment and at
the bottom of the mail some extracts of it.

To get this far I needed to comment out a line the ebuild:

src_prepare() {
# Ensure that internal copies of expat, libffi and zlib are not used.
rm -fr Modules/expat
# rm -fr Modules/_ctypes/libffi*
rm -fr Modules/zlib

Else it ends with this ( and there are no more libffi messages):

error: /home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.4-r1/work/Python-2.6.4/Modules/_ctypes/libffi:
No such file or directory

So it seems it can only work with the internal copy of libffi. Why?

In Cygwin there is a runtime:

/usr/bin/cygffi-4.dll

In Prefix there is:

/home/prefix/gentoo/usr/bin/cygffi-5.dll
/home/prefix/gentoo/usr/lib/libffi-3.0.9
/home/prefix/gentoo/usr/lib/libffi-3.0.9/include/ffi.h
/home/prefix/gentoo/usr/lib/libffi-3.0.9/include/ffitarget.h
/home/prefix/gentoo/usr/lib/libffi.dll.a
/home/prefix/gentoo/usr/lib/libffi.la
/home/prefix/gentoo/usr/lib/pkgconfig/libffi.pc


The other issus is a missing _PyFPE_counter. Is this likely

[ ] a bug in python
[ ] a bug in a patch
[ ] a library not found

Finally a also tested the old python-2.4.6. It is compiled but ends with:

* emake altinstall maninstall failed


Thank you for help

Al


./configure --prefix=/home/prefix/gentoo/usr --build=i686-pc-cygwin1.7
--host=i686-pc-cygwin1.7 --mandir=/home/prefix/gentoo/usr/share/man
--infodir=/home/prefix/gentoo/usr/share/info
--datadir=/home/prefix/gentoo/usr/share
--sysconfdir=/home/prefix/gentoo/etc
--localstatedir=/home/prefix/gentoo/var/lib --with-fpectl
--disable-ipv6 --with-threads --enable-unicode=ucs4
--infodir=${prefix}/share/info --mandir=${prefix}/share/man
--with-libc= --with-system-ffi --enable-shared
[...]
Creating library file: libpython2.6.dll.a
[...]
gcc -L/home/prefix/gentoo/usr/lib -L/home/prefix/gentoo/lib -L. -o
python.exe
Modules/python.o
libpython2.6.dll.a -ldl -lm
[...]
INFO: Can't locate Tcl/Tk libs and/or headers
[...]
building 'math' extension
gcc -fno-strict-aliasing -DNDEBUG -I.
-I/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/./Include
-I. -IInclude -I./Include -I/home/prefix/gentoo/usr/include
-I/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Include
-I/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5
-c /home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.c
-o build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.o
/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.c:
In function `math_fsum':
/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.c:574:
warning: passing arg 1 of `PyFPE_dummy' discards qualifiers from
pointer target type
gcc -shared -Wl,--enable-auto-image-base -L/home/prefix/gentoo/usr/lib
-L/home/prefix/gentoo/lib -L. -fno-strict-aliasing -DNDEBUG -I.
-IInclude -I./Include -I/home/prefix/gentoo/usr/include
build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.o
-L/home/prefix/gentoo/usr/lib -L/home/prefix/gentoo/lib -L. -lm
-lpython2.6 -o build/lib.cygwin-1.7.7-i686-2.6/math.dll
build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.o:mathmodule.c.text+0x3d1):
undefined reference to `_PyFPE_counter'
[...]
build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/mathmodule.o:mathmodule.c.text+0x2195):
undefined reference to `_PyFPE_counter'
collect2: ld returned 1 exit status

building 'strop' extension
gcc -fno-strict-aliasing -DNDEBUG -I.
-I/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/./Include
-I. -IInclude -I./Include -I/home/prefix/gentoo/usr/include
-I/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Include
-I/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5
-c /home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/stropmodule.c
-o build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/stropmodule.o
gcc -shared -Wl,--enable-auto-image-base -L/home/prefix/gentoo/usr/lib
-L/home/prefix/gentoo/lib -L. -fno-strict-aliasing -DNDEBUG -I.
-IInclude -I./Include -I/home/prefix/gentoo/usr/include
build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/stropmodule.o
-L/home/prefix/gentoo/usr/lib -L/home/prefix/gentoo/lib -L.
-lpython2.6 -o build/lib.cygwin-1.7.7-i686-2.6/strop.dll
build/temp.cygwin-1.7.7-i686-2.6/home/prefix/gentoo/var/tmp/portage/dev-lang/python-2.6.5-r2/work/Python-2.6.5/Modules/stropmodule.o:stropmodule.c.text+0x1d2d):
undefined reference to `_PyFPE_counter'
[...]
collect2: ld returned 1 exit status
[...]
Failed to find the necessary bits to build these modules:
_bsddb _hashlib _sqlite3
_ssl _tkinter bsddb185
gdbm linuxaudiodev nis
ossaudiodev spwd sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for
the module's name.


Failed to build these modules:
cmath math strop

[...]

make: *** [sharedmods] Error 1
* ERROR: dev-lang/python-2.6.5-r2 failed:
* emake failed
 
Old 09-16-2010, 08:31 PM
Al
 
Default Gentoo/Cygwin: Vicious Python

Hello,

> ./configure --prefix=/home/prefix/gentoo/usr --build=i686-pc-cygwin1.7
> --host=i686-pc-cygwin1.7 --mandir=/home/prefix/gentoo/usr/share/man
> --infodir=/home/prefix/gentoo/usr/share/info
> --datadir=/home/prefix/gentoo/usr/share
> --sysconfdir=/home/prefix/gentoo/etc
> --localstatedir=/home/prefix/gentoo/var/lib --with-fpectl
> --disable-ipv6 --with-threads --enable-unicode=ucs4
> --infodir=${prefix}/share/info --mandir=${prefix}/share/man
> --with-libc= --with-system-ffi --enable-shared


I managed to emerge portage finally, but it was missing the broken
math module of python. So back to python.

I found out by extended experiments that it is the --with-fpectl
option which causes the errors of the math module: undefined reference
to `_PyFPE_counter'. Now this counter is something completly
different.

Didn't figure out how all this is related, ... but ... IT WORKS so far
... I can run emerge -- sometimes.

This python stuff took me four days so far. Still it's very dirty.
Some patches applied, others disabled, expat module still broken.

It's "sometimes", because I am in the DLL hell again. DLLs changing
addresses each run and Cygwins rebaseall script doesn't fix it this
time.

Again I know there is a solution, as the Cygwin binaris of python work.

Al
 
Old 09-18-2010, 03:24 PM
Al
 
Default Gentoo/Cygwin: Vicious Python

>
> It's "sometimes", because I am in the DLL hell again. DLLs changing
> addresses each run and Cygwins rebaseall script doesn't fix it this
> time.
>

Again something for the archives and those who are interested:

The reason why rebaseall didn't fix it is, that it only rebases files
that have been installed with setup.exe. It makes use of files in
which the pathes of DLLs are listet. By creating such a list file it
is possible to rebase user contributed DLLs. The file is given with
the -T option of rebaseall.

SOLVED:

Open a windows command shell (cmd):

P:/cygwin/bin/ash
/bin/rebaseall -T /home/prefix/rebase.lst
exit
exit

I create the rebase.lst with this lines:

#/bin/bash
BASE=/home/prefix
rm $BASE/rebase.lst
find $BASE/gentoo/bin/ -name *.dll -o -name *.so >> $BASE/rebase.lst
find $BASE/gentoo/lib/ -name *.dll -o -name *.so >> $BASE/rebase.lst
find $BASE/gentoo/usr/bin -name *.dll -o -name *.so >> $BASE/rebase.lst
find $BASE/gentoo/usr/lib -name *.dll -o -name *.so >> $BASE/rebase.lst

Maybe some more is required if DLLs are outside of this pathes. It is
necessary that all DLLs have write access to change the default
address where they are loaded to.

TODO:

A remaining problem is, that you can't run this script from within
bash, which depends on many DLLs itself. Hence you have to run it from
a very limited ash. This means, you can't include the rebaseall script
into emerge, if you wan't be able to run emerge from bash.

I need to adapt the rebase all script so that it only rebases those
DLLs that are not loaded by bash. It must load them to a completly
different address space. That would base DLLs from Perl and Python for
example.

Remains the issue with the ncurses DLL wich has a bad (low) default
address, but bash depends on it. The best solution is probably to set
it explicitly to a sane address.

Al
 

Thread Tools




All times are GMT. The time now is 07:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org