Skip to contentSkip to conversation

could not read symbols: Bad value error on musl based buildroot env on rpi2 config.

Buildroot Eial Czerwacki 2 participants 5 messages Jan 17, 2016 – Jan 18, 2016

lore
Share & tools
lore
#0 lore raw

Greetings,

I'm trying to create a musl base env for my rpi2 and I'm getting the below failure.

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Python build finished, but the necessary bits to build these modules were not found:
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules:

_bisect            _codecs_iso2022    _collections   
_csv               _ctypes            _ctypes_test   
_elementtree       _functools         _hashlib       
_heapq             _hotshot           _io            
_json              _locale            _lsprof        
_multibytecodec    _multiprocessing   _random        
_socket            _ssl               _struct        
_testcapi          array              audioop        
binascii           cmath              cPickle        
crypt              cStringIO          datetime       
fcntl              future_builtins    grp            
itertools          linuxaudiodev      math           
mmap               operator           parser         
pyexpat            readline           resource       
select             spwd               strop          
syslog             termios            time           
unicodedata        zlib                              

make[1]: *** [sharedmods] Error 1

my config can be found here: http://paste.ubuntu.com/14543009/

is it possible I'm having a bitness issue on the system? the machine I'm using to compile is 64 bit but the machine on which the fs exists is 32 bit. any ideas how to fix it?

Thanks.

#1 lore raw
Quoted 6 lines · Eial Czerwacki

Greetings,

I'm trying to create a musl base env for my rpi2 and I'm getting the below failure.

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation

This is bad, because it's trying to use your installed python while building
buildroot's host-python... This error happens while compiling host-python, right? You didn't show the last bit of the output.

Can you pastebin output/build/host-python-2.7.11/config.log?

(Note for others on the list: I suspect host-python is built for xcb-proto and
libxcb.)

Regards,
Arnout

Quoted 46 lines

R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Python build finished, but the necessary bits to build these modules were not found:
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules:

_bisect            _codecs_iso2022    _collections   
_csv               _ctypes            _ctypes_test   
_elementtree       _functools         _hashlib       
_heapq             _hotshot           _io            
_json              _locale            _lsprof        
_multibytecodec    _multiprocessing   _random        
_socket            _ssl               _struct        
_testcapi          array              audioop        
binascii           cmath              cPickle        
crypt              cStringIO          datetime       
fcntl              future_builtins    grp            
itertools          linuxaudiodev      math           
mmap               operator           parser         
pyexpat            readline           resource       
select             spwd               strop          
syslog             termios            time           
unicodedata        zlib                              

make[1]: *** [sharedmods] Error 1

my config can be found here: http://paste.ubuntu.com/14543009/

is it possible I'm having a bitness issue on the system? the machine I'm using to compile is 64 bit but the machine on which the fs exists is 32 bit. any ideas how to fix it?

Thanks.
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#2 lore raw

Greetings,

the pastebin can be found at http://paste.ubuntu.com/14565509/

what makes it a bit weirder is that on my 64 bit gentoo machine (this is a 32 bit ubuntu 12.04 machine) it compiles well.

Quoted 66 lines · Arnout Vandecappelle
Quoted 6 lines · Eial Czerwacki

Greetings,

I'm trying to create a musl base env for my rpi2 and I'm getting the below failure.

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation

This is bad, because it's trying to use your installed python while building
buildroot's host-python... This error happens while compiling host-python, right? You didn't show the last bit of the output.

Can you pastebin output/build/host-python-2.7.11/config.log?

(Note for others on the list: I suspect host-python is built for xcb-proto and
libxcb.)

Regards,
Arnout

Quoted 46 lines

R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Python build finished, but the necessary bits to build these modules were not found:
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules:

_bisect            _codecs_iso2022    _collections   
_csv               _ctypes            _ctypes_test   
_elementtree       _functools         _hashlib       
_heapq             _hotshot           _io            
_json              _locale            _lsprof        
_multibytecodec    _multiprocessing   _random        
_socket            _ssl               _struct        
_testcapi          array              audioop        
binascii           cmath              cPickle        
crypt              cStringIO          datetime       
fcntl              future_builtins    grp            
itertools          linuxaudiodev      math           
mmap               operator           parser         
pyexpat            readline           resource       
select             spwd               strop          
syslog             termios            time           
unicodedata        zlib                              

make[1]: *** [sharedmods] Error 1

my config can be found here: http://paste.ubuntu.com/14543009/

is it possible I'm having a bitness issue on the system? the machine I'm using to compile is 64 bit but the machine on which the fs exists is 32 bit. any ideas how to fix it?

Thanks.
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

[Please don't top-post, but reply in-line like I do below.]

Quoted 3 lines · Eial Czerwacki

Greetings,

the pastebin can be found at http://paste.ubuntu.com/14565509/

Hm, no reference to /usr/local/lib there...

First of all, can you confirm that this happened while building host-python? I
don't see what else it could be, but just to be sure.

Then, could you try to grep in the host-python build directory for the
occurence of /usr/local/lib? It must come from somewhere...

Quoted 2 lines

what makes it a bit weirder is that on my 64 bit gentoo machine (this is a 32 bit ubuntu 12.04 machine) it compiles well.

I don't expect it has anything to do with that, it's just that your gentoo
machine has a python installed in /usr/local while your ubuntu machine doesn't.

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle      arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#4 lore raw
Quoted 10 lines · Arnout Vandecappelle

[Please don't top-post, but reply in-line like I do below.]

Quoted 3 lines · Eial Czerwacki

Greetings,

the pastebin can be found at http://paste.ubuntu.com/14565509/

Hm, no reference to /usr/local/lib there...

First of all, can you confirm that this happened while building host-python? I
don't see what else it could be, but just to be sure.

seems like:
make[1]: *** [sharedmods] Error 1
make[1]: Leaving directory `/u/eial/workspace/buildroot-9999/output/build/host-python-2.7.11'
make: *** [/u/eial/workspace/buildroot-9999/output/build/host-python-2.7.11/.stamp_built] Error 2

Quoted 3 lines

Then, could you try to grep in the host-python build directory for the
occurence of /usr/local/lib? It must come from somewhere...

just did it, non found

Quoted 6 lines
Quoted 4 lines

what makes it a bit weirder is that on my 64 bit gentoo machine (this is a 32 bit ubuntu 12.04 machine) it compiles well.

I don't expect it has anything to do with that, it's just that your gentoo
machine has a python installed in /usr/local while your ubuntu machine doesn't.

well I wasn't that accurate apparently, the system I'm running on it is a CentOS 6.5 which builds the buildroot on a fs which is nfs mounted from a ubuntu machine.
I think this setup is so exotic that it doesn't worth while to continue research especially when my home systems works.
it is up to you.

Quoted 5 lines

Regards,
Arnout

[snip]