Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems compiling prefix on RH r4.7. linked to local libs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
keymon
n00b
n00b


Joined: 02 Aug 2011
Posts: 7

PostPosted: Thu Nov 17, 2011 6:18 pm    Post subject: Problems compiling prefix on RH r4.7. linked to local libs Reply with quote

Hello,

I am compiling Gentoo prefix on Red Hat Enterprise Linux ES release 4 (Nahant Update 7), on ame64 (Linux servername 2.6.9-78.0.1.ELsmp #1 SMP Tue Jul 22 18:01:05 EDT 2008 x86_64 GNU/Linux)

With python I have some problems that I fixed. I will share this to know if there is a better solution and to help if somebody is in the same situation.

First of all I had problems with Modules/_ctypes/libffi. It was complaining that it was not able to find that directory.
In the ebuild is explicitly removed, so I tried disabling this line in the ebuild (and signing with "ebuild digest file.ebuild")

Code:
rm -fr Modules/_ctypes/libffi*


But after now it works ok. I installed libffi in the prefix, and I did some other things so I am not sure why it works.

After that, I have these errors:

Code:

x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG -I. -IInclude -I./Include -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2 -c /tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/readline.c -o build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/readline.o
x86_64-pc-linux-gnu-gcc -pthread -shared -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib32 -L/usr/lib64 -L/lib32 -L/lib64 -L. -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/readline.o -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib64 -L/lib64 -L. -lreadline -lncursesw -lpython2.7 -o build/lib.linux-x86_64-2.7/readline.so
*** WARNING: renaming "readline" since importing it failed: build/lib.linux-x86_64-2.7/readline.so: undefined symbol: free_history_entry

x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG -I. -IInclude -I./Include -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2 -c /tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_hashopenssl.c -o build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_hashopenssl.o
x86_64-pc-linux-gnu-gcc -pthread -shared -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib32 -L/usr/lib64 -L/lib32 -L/lib64 -L. -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_hashopenssl.o -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib64 -L/lib64 -L. -lssl -lcrypto -lpython2.7 -o build/lib.linux-x86_64-2.7/_hashlib.so
*** WARNING: renaming "_hashlib" since importing it failed: build/lib.linux-x86_64-2.7/_hashlib.so: undefined symbol: EVP_MD_size


x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG -I. -IInclude -I./Include -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2 -c /tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_hashopenssl.c -o build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_hashopenssl.o
x86_64-pc-linux-gnu-gcc -pthread -shared -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib32 -L/usr/lib64 -L/lib32 -L/lib64 -L. -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_hashopenssl.o -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib64 -L/lib64 -L. -lssl -lcrypto -lpython2.7 -o build/lib.linux-x86_64-2.7/_hashlib.so
*** WARNING: renaming "_hashlib" since importing it failed: build/lib.linux-x86_64-2.7/_hashlib.so: undefined symbol: EVP_MD_size

x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG -I. -IInclude -I./Include -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2 -c /tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/pyexpat.c -o build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/pyexpat.o
x86_64-pc-linux-gnu-gcc -pthread -shared -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib32 -L/usr/lib64 -L/lib32 -L/lib64 -L. -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/pyexpat.o -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib64 -L/lib64 -L. -lexpat -lpython2.7 -o build/lib.linux-x86_64-2.7/pyexpat.so
*** WARNING: renaming "pyexpat" since importing it failed: build/lib.linux-x86_64-2.7/pyexpat.so: undefined symbol: XML_StopParser

x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG -DUSE_PYEXPAT_CAPI -I. -IInclude -I./Include -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Include -I/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2 -c /tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_elementtree.c -o build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_elementtree.o
x86_64-pc-linux-gnu-gcc -pthread -shared -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -Wl,-rpath=/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib32 -L/usr/lib64 -L/lib32 -L/lib64 -L. -fno-strict-aliasing -O2 -pipe -fwrapv -I/apps/murex/local/Linux-x86_64/gentoo/usr/include -DNDEBUG build/temp.linux-x86_64-2.7/tmp/portage/dev-lang/python-2.7.2-r3/work/Python-2.7.2/Modules/_elementtree.o -L/apps/murex/local/Linux-x86_64/gentoo/lib -L/apps/murex/local/Linux-x86_64/gentoo/usr/lib -L/usr/lib64 -L/lib64 -L. -lexpat -lpython2.7 -o build/lib.linux-x86_64-2.7/_elementtree.so
*** WARNING: renaming "_elementtree" since importing it failed: PyCapsule_Import could not import module "pyexpat"

Failed to build these modules:
_elementtree       _hashlib           pyexpat   readline



I discovered that the binaries were being linked with libraries in /usr/lib64 (libreadline.so.4 libcrypto.so.4 libexpat.so.0 libssl.so.4).

I tried to create links with the same name in the prefix, and it worked:

Code:

cd $EPREFIX/lib
ln -s libreadline.so.6 libreadline.so.4
cd $EPREFIX/usr/lib
ln -s libcrypto.so.1.0.0 libcrypto.so.4
ln -s libexpat.so.1.5.2 libexpat.so.0
ln -s libssl.so.1.0.0 libssl.so.4


So, this workaround works, but I am not sure if is the best way.
Back to top
View user's profile Send private message
grobian
Developer
Developer


Joined: 31 May 2006
Posts: 64

PostPosted: Sun Dec 04, 2011 7:30 pm    Post subject: Reply with quote

libffi when emerging should come from separate package libffi, hence the rm in the python ebuild.

It feels like something went wrong during your bootstrap (did you quit your terminal perhaps?) as you clearly lack some very important settings.

File a bug on bugs.gentoo.org if you can't get it to work if you restart from scratch following the solaris instructions carefully.
_________________
Gentoo on a different level
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum