pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Build issue of textproc/py-4Suite on Linux (CentOS)



Hello,

        Building of py-4Suite on Linux (CentOS 5 x86_64) failes with this error 
message : 
        Fatal Python error: Interpreter not initialized (version mismatch?)

        After some digging, it appears that le ld linker links the shared 
libraries (EscapeQuotesc.so... etc) against the static libpython that is in 
/opt/pkg/lib/python2.6/config.
        The ld man page states that the linker will look for shared libraires 
in paths specified with -L in the order of their apperience in the command 
line. And in fact the -L/opt/pkg/lib/python2.6/config comes before 
-L/opt/pkg/lib (where the libpython2.6.so lies)

        The -L opt/pkg/lib/python2.6/config is added in the buildlink3.mk file 
of the python2.6 package (line 16) : BUILDLINK_LIBDIRS.python26+=    
lib/python2.6/config

        I was wondering what will be the best way to avoid this static linking 
knowing that :
        - GCC and LD does not seem to provide any way to force linking 
Dynamically Vs Staticly (even ld -Bdynamic does not have any effect)
        - Commenting line 16 in buildlink3.mk make things work but it's not a 
"real" solution. Some scenarios need to link against the static libpython and 
this trick disable this ability.
        - Reorder the option line to make sure that -L opt/pkg/lib comes before 
-L opt/pkg/lib/python2.6/config. This works fine but there is no way to put it 
in the pkgsrc way (in the Makefile or in the mk.conf)
        - Do some BUILDLINK_TRANSFORM magic (BUILDLINK_TRANSFORM+= 
rm:-L/opt/pkg/lib/python2.6/config) in the Makefile of py-4Suite but this will 
be python version specific and does not seem to work (not taken into effect)

        Thanks for your help.

Youssef Ghorbal

PS : /opt/pkg is the prefix of my pkgsrc installation.


Home | Main Index | Thread Index | Old Index