Closed Bug 21308 Opened 25 years ago Closed 23 years ago

Linker error in layout/build with SGI/IRIX 6.5

Categories

(Core :: Layout, defect, P3)

SGI
IRIX
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: dolan, Assigned: rhess)

References

Details

Attachments

(1 file)

I'm building with M11, so this *might* be out of date, but I checked lxr.mozilla.org and I see no obvious changes. When doing make libs in layout/build, the SGI linker generates MANY errors trying to make libraptorhtml.so -------------------------------------------------------------------------- c++ -elf -shared -o libraptorhtml.so nsLayoutDLF.o nsLayoutFactory.o nsLayoutModule.o -Wl,-all ../../dist/lib/libraptorevents_s.a ../../dist/lib/libraptorhtmlbase_s.a ../../dist/lib/libnglhtmlcon_s.a ../../dist/lib/libraptorhtmldoc_s.a ../../dist/lib/libraptorhtmlforms_s.a ../../dist/lib/libraptorhtmlstyle_s.a ../../dist/lib/libraptorhtmltable_s.a ../../dist/lib/libraptorxmlcontent_s.a ../../dist/lib/libraptorxmldoc_s.a ../../dist/lib/libraptorxulcontent_s.a ../../dist/lib/libraptorxulbase_s.a ../../dist/lib/libraptorlayout_s.a -Wl,-none ../../dist/lib/libneckoutil_s.a ../../dist/lib/libtimer_s.a -L../../dist/bin -lplds3 -lplc3 -lnspr3 -lpthread -lxpcom -lraptorgfx -ljsdom -lmozjs ld32: WARNING 84 : /usr/local/lib/gcc-lib/mips-sgi-irix6.5/2.95/libstdc++.a is not used for resolving any symbol. ld32: WARNING 127: Two shared objects with the same soname, /usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been been linked. This is probably due to a missing -L specification. Ignoring the latter. ld32: INFO 171: Multigot invoked. Gp relative region broken up into 2 separate regions. ld32: ERROR 104: GOT page/offset relocation out of range: ../../dist/lib/libraptorxmlcontent_s.a(nsXMLNamedNodeMap.o) section: .rela.text relocation offset: 0x8a0. Please use -LD_LAYOUT:lgot_buffer=20. If that doesn't work see the gp_overflow(5) manpage. -------------------------------------------------------------------------- My solution is to add "-Wl,-LD_LAYOUT:lgot_buffer=30" to the CFLAGS, which makes it finish with just warnings, not errors (I got the 20 by trial and error). So, it compiles, but I haven't got mozilla to run due to other issues, so this may just clean up the symptom, not the source of the problem... I'd recommend (maybe) adding to the layout/build/Makefile something like: ifeq ($(OS_ARCH),IRIX) CFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=30 endif
Assignee: troy → rickg
I don't know who this should be assigned to. It looks like a build problem under SGI/IRIX
Assignee: rickg → jdunn
Hey Jim -- is this the kind of thing I can bribe you into taking care of for me? I'd be very greatful -- and owe you a favor.
Unfortunately I no even less about Irix than I do about AIX. I have asked briano his thoughts.
Jonathon Longman wrote: I did a man gp_overflow as suggested in the output, which suggested checking question 22 in man dso. This particularly looks like a simple fix. from "man dso" on Irix 6.5: 22. What should I do about Global Offset Table (GOT) overflow? GOT overflow has occured if you receive messages from the linker saying GP-relative sections overflow by 0x??? bytes, GOT overflow, or GOT unreachable. To fix this situation, perform one of more of the following steps: * Recompile with the -TENV:large_got=ON option on your compiler command line. Only the large input file that is causing overflow needs to be recompiled with this option. * Break the large input file.o into two or more smaller files. * Use the -m option on the ld(1) command to obtian a link map. This map indicates large objects that you can recompile with -G0 or some other small -G value. Data objects affected by the -Gnum option are numeric literals, addreses (including those generated by the compiler), all C/C++ static veriables, and, if the -static option is in effect, all Fortran local variables. For more information on the -Gnum option, see your compiler command line.
Blocks: 28709
unfortunately at this poing I can't even get this far, due to the compiler problem 28717
Blocks: 28717
No longer blocks: 28709
Status: NEW → ASSIGNED
Hi- I was able to compile M16 on Irix using native compilers which don't give the lgot problem. I also had to use classic NSPR instead of pthreads (running with pthreads enabled NSPR dumped core on pthread initialization). Another change I had to do was not use the -none/-Wl,-none flag to CC/ld when trying to produce the dso's; using this flag resulted in a dso which didn't export all the symbols from the archives intended to be contained in the dso; thereby, I didn't provide any OS/standard libraries to resolve undefined symbols in producing the dso itself (leaving them to be resolved when producing the executables themselves). Having created the dist/bin/mozilla-bin executable, running it does some registery stuff and then returns with "bus error (core dumped)" and unfortunately doesn't create a core file at all. The registery stuff is done only for the first time a newly produced executable is run. I know its not enough information to debug this by.. but I'm not familiar with mozilla code/structure etc. and doing this entirely out of personal interest. If there are any tests - running which would help people debug this, I might be willing to run them, as and when I can spare time. :a
Rich I am going to reassign to you since you are looking at this much more than I am...
Assignee: jdunn → rhess
Status: ASSIGNED → NEW
Trying to get the gcc build of Mozilla working on IRIX, I come across this again with the latest source, in content/build . --- gmake[2]: Entering directory `/projects/sise/mozilla/devel/workpits/moz/latest_gcc/workarea/content/build' rm -f libgkcontent.so g++ -fno-rtti -fno-exceptions -Wall -pedantic -Wno-long-long -DDEBUG - DDEBUG_johnv -DTRACING -g -elf -shared -o libgkcontent.so nsContentDLF.o nsContentFactory. o nsContentModule.o nsContentHTTPStartup.o -Wl,- all ../../dist/lib/libgkconevents_s.a ../../dist/lib/libgkconhtmlcon_s.a ../../d ist/lib/libgkconhtmldoc_s.a ../. ./dist/lib/libgkconhtmlstyle_s.a ../../dist/lib/libgkconxmlcon_s.a ../../dist/li b/libgkconxmldoc_s.a ../../dist/lib/libgkconxsldoc_s.a ../../dist/lib/libgkconxu lco n_s.a ../../dist/lib/libgkconxuldoc_s.a ../../dist/lib/libgkconxultmpl_s.a ../.. /dist/lib/libgkconxbl_s.a ../../dist/lib/libgkconbase_s.a ../../dist/lib/libgkco nsh ared_s.a -Wl,-none -L../../dist/bin -ljsdom -lgkgfx -L../../dist/bin -lxpcom - L../../dist/bin - L/projects/sise/mozilla/devel/workpits/moz/latest_gcc/workarea/dist /lib -lplds4 -lplc4 -lnspr4 -lpthread -lmozjs -lsocket -ldl -lm ld32: WARNING 84 : /usr/lib32/libsocket.so is not used for resolving any symbol. ld32: WARNING 84 : /usr/lib32/libdl.so is not used for resolving any symbol. ld32: WARNING 84 : /usr/freeware/lib/gcc-lib/mips-sgi- irix6.2/2.95.2/libstdc++.a is not used for resolving any symbol. ld32: WARNING 47 : This module (../../dist/lib/libgkconxuldoc_s.a (nsXULDocument.o) .text) contains branch instruction(s) that might degrade performance on an older version (rev. 2.2) R4000 processor. ld32: INFO 171: Multigot invoked. Gp relative region broken up into 2 separate regions. ld32: ERROR 104: GOT page/offset relocation out of range: ../../dist/lib/libgkconxuldoc_s.a(nsXULDocument.o) section: .rela.text relocation offset: 0xc6c. Please use -LD_LAYOUT:lgot_buffer=20. If that doesn't work see the gp_overflow (5) manpage. ld32: ERROR 104: GOT page/offset relocation out of range: ../../dist/lib/libgkconxuldoc_s.a(nsXULDocument.o) section: .rela.text relocation offset: 0xdbc. Please use -LD_LAYOUT:lgot_buffer=20. If that doesn't work see the gp_overflow (5) manpage. ... --- Using the same workaround, I had to add "-Wl,-LD_LAYOUT:lgot_buffer=50" . As IRIX now has a MIPSpro build, the previous Makefile change is not sufficient, as this CFLAG should only be added if OS_ARCH = IRIX , and compiler is GNU. I am not sure how the latter would be tested.
Blocks: 28709
Looking for how to add to LDFLAGS (I presume this is a better candidate than CFLAGS) when OS is IRIX and compiler is g++, I have found a define 'GNU_CXX' in config/rules.mk , used in conjunction with SunOS. http://lxr.mozilla.org/seamonkey/source/config/rules.mk#244 Tested this with gcc and MIPSpro, both now work.
r=cls
Target Milestone: --- → mozilla0.9.1
a= asa@mozilla.org for checkin to 0.9.1
working on getting an ETA for this. I'll update ASAP... :-l
Patch has been checked in. Marking fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Marking verified per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: