Mike R.
asked on
make: "GNU ld" and "relocations remain against allocatable but non-writable sections"
Hey Gang,
I am trying to configure and build wxPython on Solaris 9. I get a good configure, it creates the Makefile, but when I "Make", ig the following error...
.
.
.
free 0x68 lib/libwxzlibd.a(wxzlib_zu til.o)
inflate_blocks 0x5cc lib/libwxzlibd.a(wxzlib_in flate.o)
.urem 0x768 lib/libwxzlibd.a(wxzlib_de flate.o)
.urem 0x3ec lib/libwxzlibd.a(wxzlib_in flate.o)
.urem 0x150 lib/libwxzlibd.a(wxzlib_ad ler32.o)
.urem 0x160 lib/libwxzlibd.a(wxzlib_ad ler32.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
gmake: *** [lib/libwx_based-2.5.so.1. 0.0] Error 1
#
It is the same whether I use "make" or "gmake". The web says the solution is to use "GNU ld" instead of "/usr/ccs/bin/ld" ... but I can't FIND a GNU "ld". GCC and GNU binutils are installed. To what "ld" is this recommendation referring to??!!
Thanks!
M
I am trying to configure and build wxPython on Solaris 9. I get a good configure, it creates the Makefile, but when I "Make", ig the following error...
.
.
.
free 0x68 lib/libwxzlibd.a(wxzlib_zu
inflate_blocks 0x5cc lib/libwxzlibd.a(wxzlib_in
.urem 0x768 lib/libwxzlibd.a(wxzlib_de
.urem 0x3ec lib/libwxzlibd.a(wxzlib_in
.urem 0x150 lib/libwxzlibd.a(wxzlib_ad
.urem 0x160 lib/libwxzlibd.a(wxzlib_ad
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
gmake: *** [lib/libwx_based-2.5.so.1.
#
It is the same whether I use "make" or "gmake". The web says the solution is to use "GNU ld" instead of "/usr/ccs/bin/ld" ... but I can't FIND a GNU "ld". GCC and GNU binutils are installed. To what "ld" is this recommendation referring to??!!
Thanks!
M
ASKER
OK...update number 2.
After installing GNU binutils from GNU (NOT SUN) I copied the original linkers to an "orig" file, and linked the GNU linker in their stead. I.E...
#cp -p /usr/ucb/ld /usr/ucb/ld.orig
#ln -s /opt/sfw/GNU/bin/ld /usr/ucb/ld
#cp -p /usr/ccs/bin/ld /usr/ccs/bin/ld.orig
#ln -s /opt/sfw/GNU/bin/ld /usr/ccs/bin/ld
This seems to be working (as I am able to make without those errors) however, just for gits and siggles (and points) could someone please tell me what the CORRECT FRIGGIN METHOD for accomplishing this WOULD have been!! :-D
Thanks!
M
After installing GNU binutils from GNU (NOT SUN) I copied the original linkers to an "orig" file, and linked the GNU linker in their stead. I.E...
#cp -p /usr/ucb/ld /usr/ucb/ld.orig
#ln -s /opt/sfw/GNU/bin/ld /usr/ucb/ld
#cp -p /usr/ccs/bin/ld /usr/ccs/bin/ld.orig
#ln -s /opt/sfw/GNU/bin/ld /usr/ccs/bin/ld
This seems to be working (as I am able to make without those errors) however, just for gits and siggles (and points) could someone please tell me what the CORRECT FRIGGIN METHOD for accomplishing this WOULD have been!! :-D
Thanks!
M
Hi rightmirem,
When I use GNU tools (gcc, make, autoconf ... from http://sunfreeware.com/), to
make sure I use them, I normaly do:
PATH=/usr/local/bin:$PATH
LD_LIBRARY_PATH=$LD_LIBRAR Y_PATH:/us r/local/li b
export PATH LD_LIBRARY_PATH
before configure and make.
You can Python from http://sunfreeware.com/ as well.
Since you have solved the problem by yourself, do you want me to PAQ and refund the
points for you?
Cheers!
yuzh
When I use GNU tools (gcc, make, autoconf ... from http://sunfreeware.com/), to
make sure I use them, I normaly do:
PATH=/usr/local/bin:$PATH
LD_LIBRARY_PATH=$LD_LIBRAR
export PATH LD_LIBRARY_PATH
before configure and make.
You can Python from http://sunfreeware.com/ as well.
Since you have solved the problem by yourself, do you want me to PAQ and refund the
points for you?
Cheers!
yuzh
ASKER
Um...not yet on the points. You can have them if you can help me understand why this was not working.
Regarding the above, I did have the correct gcc and ld in the paths (PATH and LD_LIBRARY_PATH) and had specifically removed the /usr/ccs and /usr/ucb paths from the both of the above...but apparently it was still finding the ld from one or the other (/usr/ccs or /usr/ucb.) The build would not complete until I replaced these files wiht the GNU ld.
I wish I had known there was a wxPython on sun freeware. I was using a download done by a previous admin. Wasted a lot of time :-)
Thanks!
M
Regarding the above, I did have the correct gcc and ld in the paths (PATH and LD_LIBRARY_PATH) and had specifically removed the /usr/ccs and /usr/ucb paths from the both of the above...but apparently it was still finding the ld from one or the other (/usr/ccs or /usr/ucb.) The build would not complete until I replaced these files wiht the GNU ld.
I wish I had known there was a wxPython on sun freeware. I was using a download done by a previous admin. Wasted a lot of time :-)
Thanks!
M
It have something to do with your PATH settings, most people put /usr/ccs/bin in front
of /usr/local/bin, in that case when you do:
which ld, it will give you:
/usr/ccs/bin/ld
When I use GNU tools, I do:
PATH=/usr/local/bin:$PATH
LD_LIBRARY_PATH=$LD_LIBRAR Y_PATH:/us r/local/li b
export PATH LD_LIBRARY_PATH
to force it to use /usr/local/bin/ld
of /usr/local/bin, in that case when you do:
which ld, it will give you:
/usr/ccs/bin/ld
When I use GNU tools, I do:
PATH=/usr/local/bin:$PATH
LD_LIBRARY_PATH=$LD_LIBRAR
export PATH LD_LIBRARY_PATH
to force it to use /usr/local/bin/ld
You might be able to change the LD flag in the Makefile to:
LD=/usr/local/bin/ld
to force it to use GUN ld.
or modify: /usr/share/lib/make/make.r ules file (I would not change this one!)
LD=/usr/local/bin/ld
to force it to use GUN ld.
or modify: /usr/share/lib/make/make.r
ASKER
I looked in the Makefile, but could not see an OBVIOUS reference to LD. I was not sure if it might have been referenced differently. I will check the make.rules file tomorrow.
Thanks again!
M
Thanks again!
M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ahhh soo...that could be (newly inherited system to me, so I am not sure where the gcc came from, or how it got installed.) Is there a way around this (I.E. a switch when configuring) or am I stuck :-)
Thanks!
M
Thanks!
M
ASKER
I am going to quit this thread and assign some points...but I'm still having some difficulties with a DIFFERENT section of the wxPython install...so look for the new thread and THANKS!
M
M
You can try
configure --with-gun-ld=/usr/local/b in/ld
The last time I built Python was 2 years+ ago, can't remember what options support with
the Python configure script. check the README file before you run configure script.
I'll have a look at your new question later.
configure --with-gun-ld=/usr/local/b
The last time I built Python was 2 years+ ago, can't remember what options support with
the Python configure script. check the README file before you run configure script.
I'll have a look at your new question later.
ASKER
# /opt/sfw/GNU/bin/ld -V
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
elf32_sparc
elf64_sparc
NOW, although this version of "ld" is the only one in the path "I.E. which ld reports the correct GNU version), I am not sure if it is using the correct version of "ld"...if for no other reason than the error is continuing, and should not be.
Help!
M