Subject: pkg/31975: www/py-clearsilver
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 11/01/2005 23:49:00
>Number:         31975
>Category:       pkg
>Synopsis:       www/py-clearsilver ( on macppc contain unsupported relocation type 6 in non-PLT relocations
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 01 23:49:00 +0000 2005
>Originator:     Daniel Eggert
>Release:        NetBSD 2.1_RC5
Macvaerk, DTU
System: NetBSD ipv6 2.1_RC5 NetBSD 2.1_RC5 (GENERIC) #0: Mon Sep 19 20:54:23 UTC 2005 macppc
Architecture: powerpc
Machine: macppc

# ldd /usr/pkg/lib/python2.3/site-packages/
         -lz.0 => /usr/lib/
         -lpthread.0 => /usr/lib/

The file
is not compiled correctly. It is part of www/py-clearsilver.

When it is imported into python code with
    import neo_cgi
the following error results:
    ImportError: /usr/pkg/lib/python2.3/site-packages/ Unsupported relocation type 6 in non-PLT relocations\n

According to this reference
this is because it was not compiled with -fPIC or -fpic. I don't quite know about that myself, though.

Seems to be powerpc specific.

I ran into this problem while trying to run www/trac on a macppc machine.

When i 'make' www/py-clearsilver I see this as the last lines:
    cc -fno-strict-aliasing -DNDEBUG -O2 -I/usr/include -O2 -I/usr/include -I/usr/pkg/include/python2.3 -Wall -I../ -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -I../ -I/usr/include -I/usr/pkg/include/python2.3 -fPIC -I/usr/include -I/usr/pkg/include/python2.3 -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -c neo_util.c -o build/temp.netbsd-2.1_RC5-macppc-2.3/neo_util.o
    cc -fno-strict-aliasing -DNDEBUG -O2 -I/usr/include -O2 -I/usr/include -I/usr/pkg/include/python2.3 -Wall -I../ -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -I../ -I/usr/include -I/usr/pkg/include/python2.3 -fPIC -I/usr/include -I/usr/pkg/include/python2.3 -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -c neo_cs.c -o build/temp.netbsd-2.1_RC5-macppc-2.3/neo_cs.o
    cc -fno-strict-aliasing -DNDEBUG -O2 -I/usr/include -O2 -I/usr/include -I/usr/pkg/include/python2.3 -Wall -I../ -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -I../ -I/usr/include -I/usr/pkg/include/python2.3 -fPIC -I/usr/include -I/usr/pkg/include/python2.3 -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -c neo_cgi.c -o build/temp.netbsd-2.1_RC5-macppc-2.3/neo_cgi.o
   cc -pthread -shared -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L../libs/ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib/python2.3/config -Wl,-R/usr/pkg/lib/python2.3/config -Wl,-R/usr/pkg/lib -O2 -I/usr/include -I/usr/pkg/include/python2.3 -Wall -I../ -I/usr/include -I/usr/pkg/include/python2.3 -I../ -I/usr/pkg/include/python2.3 -I../ -I/usr/include -I/usr/pkg/include/python2.3 build/temp.netbsd-2.1_RC5-macppc-2.3/neo_cgi.o build/temp.netbsd-2.1_RC5-macppc-2.3/neo_cs.o build/temp.netbsd-2.1_RC5-macppc-2.3/neo_util.o -L/usr/lib -L/usr/pkg/lib/python2.3/config -L../libs -lz -lneo_cgi -lneo_cs -lneo_utl -o -L../libs/ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib/python2.3/config -Wl,-R/usr/pkg/lib/python2.3/config -Wl,-R/usr/pkg/lib

There is -fPIC on the three first lines, but not on the last one. Maybe that's the cause of the problem?

and run
    % python2.3
    import neo_cgi
at the python prompt. You'll get the above error.


Need to add -fPIC or -fpic to compilation?