* [parisc-linux] xfree86 build problem
@ 2001-04-13 22:21 Grant Grundler
2001-04-14 11:55 ` amodra
0 siblings, 1 reply; 9+ messages in thread
From: Grant Grundler @ 2001-04-13 22:21 UTC (permalink / raw)
To: parisc-linux
hi folks,
The xfree86 build dies with the following errors:
...
making all in lib/GL/glu/libutil...
make[3]: Entering directory `/home/src/xfree86-4.0.2/build-tree/xc/lib/GL/glu/libutil'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/src/xfree86-4.0.2/build-tree/xc/lib/GL/glu/libutil'
rm -f libGLU.so.1.3~
+ cd .
+ c++ -o ./libGLU.so.1.3~ -shared -Wl,--whole-archive -Wl,-soname,libGLU.so.1 libutil/libutil.a libtess/libtess.a libnurbs/internals/libinternals.a libnurbs/interface/libinterface.a libnurbs/nurbtess/libnurbtess.a -Wl,--no-whole-archive
/usr/bin/ld: error.o: relocation R_PARISC_DPREL21L can not be used when making a shared object; recompile with -fPIC
libutil/libutil.a(error.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
+ rm -f libGLU.so.1
+ ln -s libGLU.so.1.3 libGLU.so.1
+ rm -f ../../../exports/lib/libGLU.so.1
+ cd ../../../exports/lib
+ ln -s ../../lib/GL/glu/libGLU.so.1 .
rm -f libGLU.so.1.3
mv -f libGLU.so.1.3~ libGLU.so.1.3
mv: cannot stat `libGLU.so.1.3~': No such file or directory
make[2]: *** [libGLU.so.1.3] Error 1
make[2]: Leaving directory `/home/src/xfree86-4.0.2/build-tree/xc/lib/GL/glu'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/src/xfree86-4.0.2/build-tree/xc/lib/GL'
make: *** [all] Error 2
a500:/usr/src/xfree86-4.0.2/build-tree/xc/lib# file GL/glu/libutil/error.o
GL/glu/libutil/error.o: ELF 32-bit MSB relocatable, PA-RISC, version 1, not stripped
1) error.o was built with:
gcc -c -O2 -g -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -I../include -I../../../../include -I../../../../include/GL -I../../../.. -I../../../../exports/include -Dlinux -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DX_LOCALE -DFUNCPROTO=15 -DNARROWPROTO -DNDEBUG error.c
Is the -fPIC missing here?
If so, why does "file" say it's relocatable?
I rebuilt error.o and glue.o by hand with -fPIC, rebuilt the libutil.a,
and then the build proceeded (until it hit the next problem).
2) c++ isn't returning the error reported by collect2
Fortunately the build soon dies since the expected product
doesn't exist. Known problem?
grant
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] xfree86 build problem
2001-04-13 22:21 [parisc-linux] xfree86 build problem Grant Grundler
@ 2001-04-14 11:55 ` amodra
2001-04-14 22:18 ` Grant Grundler
0 siblings, 1 reply; 9+ messages in thread
From: amodra @ 2001-04-14 11:55 UTC (permalink / raw)
To: Grant Grundler; +Cc: parisc-linux
On Fri, Apr 13, 2001 at 04:21:16PM -0600, Grant Grundler wrote:
> 1) error.o was built with:
> gcc -c -O2 -g -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -I../include -I../../../../include -I../../../../include/GL -I../../../.. -I../../../../exports/include -Dlinux -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DX_LOCALE -DFUNCPROTO=15 -DNARROWPROTO -DNDEBUG error.c
> Is the -fPIC missing here?
Yes (or error.o shouldn't be included in the shared lib)
> If so, why does "file" say it's relocatable?
Because it is. :) Relocatable files don't have to be PIC.
> 2) c++ isn't returning the error reported by collect2
> Fortunately the build soon dies since the expected product
> doesn't exist. Known problem?
Are you sure about this statement? It might just be "make" (the presense
of those `+'s is ringing bells with me but I don't recall the exact
signifigance.)
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] xfree86 build problem
2001-04-14 11:55 ` amodra
@ 2001-04-14 22:18 ` Grant Grundler
2001-04-14 23:00 ` Ulrich Drepper
2001-04-14 23:41 ` Alan Cox
0 siblings, 2 replies; 9+ messages in thread
From: Grant Grundler @ 2001-04-14 22:18 UTC (permalink / raw)
To: amodra; +Cc: parisc-linux
amodra@one.net.au wrote:
> > 2) c++ isn't returning the error reported by collect2
> > Fortunately the build soon dies since the expected product
> > doesn't exist. Known problem?
>
> Are you sure about this statement? It might just be "make" (the presense
> of those `+'s is ringing bells with me but I don't recall the exact
> signifigance.)
I'm not. It might be a make bug.
I've seen make say something like "[ ... ignored ]" when ignoring an error.
Anyway, after spending another two hours on the -fPIC problem, I'm
starting to think the xfree86 lib build is broken by design for __hppa__.
I'll send out another mail with a patch + recipe for building the libs.
I'm pretty close to finding workarounds (not solutions) for the problems.
Do other arches allow non-PIC .o's to be linked into a .so lib?
Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [parisc-linux] xfree86 build problem
2001-04-14 22:18 ` Grant Grundler
@ 2001-04-14 23:00 ` Ulrich Drepper
2001-04-14 23:41 ` Alan Cox
1 sibling, 0 replies; 9+ messages in thread
From: Ulrich Drepper @ 2001-04-14 23:00 UTC (permalink / raw)
To: Grant Grundler; +Cc: amodra, parisc-linux
Grant Grundler <grundler@puffin.external.hp.com> writes:
> Do other arches allow non-PIC .o's to be linked into a .so lib?
Many do. You will get text relocations (indicated by the DT_TEXTREL
tag) which render your DSO unsharable.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] xfree86 build problem
2001-04-14 22:18 ` Grant Grundler
2001-04-14 23:00 ` Ulrich Drepper
@ 2001-04-14 23:41 ` Alan Cox
2001-04-15 4:23 ` Grant Grundler
2001-04-15 4:42 ` amodra
1 sibling, 2 replies; 9+ messages in thread
From: Alan Cox @ 2001-04-14 23:41 UTC (permalink / raw)
To: Grant Grundler; +Cc: amodra, parisc-linux
> Anyway, after spending another two hours on the -fPIC problem, I'm
> starting to think the xfree86 lib build is broken by design for __hppa__.
> I'll send out another mail with a patch + recipe for building the libs.
> I'm pretty close to finding workarounds (not solutions) for the problems.
Did the patches I built to get XFree86 libs building not get as far as you.
I sent them to Paul (I believe)
> Do other arches allow non-PIC .o's to be linked into a .so lib?
Generally - yes.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] xfree86 build problem
2001-04-14 23:41 ` Alan Cox
@ 2001-04-15 4:23 ` Grant Grundler
2001-04-15 12:32 ` Alan Cox
2001-04-15 4:42 ` amodra
1 sibling, 1 reply; 9+ messages in thread
From: Grant Grundler @ 2001-04-15 4:23 UTC (permalink / raw)
To: Alan Cox; +Cc: parisc-linux
Alan Cox wrote:
> Did the patches I built to get XFree86 libs building not get as far as you.
> I sent them to Paul (I believe)
nope. On Thursday, paul (Lahaie) forwarded an email from you (Feb 12th)
stating you would dig up the patches for him but no patches.I pointed
this out to paul but he didn't reply yet. Can you fwd me the patches?
Besides, alot has changed since you built xfree86.
But I could use it as guidance.
BTW, I did get the libs to build. I've hacked the Imakefile for libGLU
so only the .a gets built. Battling my way through programs directories
now. A good test to see if the libs are useful or not (already found
the libfreetype.a was missing/stale).
Short notes and diff are on pehc:~grundler/*.xfree86
ta,
grant
Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [parisc-linux] xfree86 build problem
2001-04-14 23:41 ` Alan Cox
2001-04-15 4:23 ` Grant Grundler
@ 2001-04-15 4:42 ` amodra
1 sibling, 0 replies; 9+ messages in thread
From: amodra @ 2001-04-15 4:42 UTC (permalink / raw)
To: Alan Cox; +Cc: Grant Grundler, parisc-linux
On Sun, Apr 15, 2001 at 12:41:00AM +0100, Alan Cox wrote:
> > Do other arches allow non-PIC .o's to be linked into a .so lib?
>
> Generally - yes.
True, but it's not recommended. The reason being that non-PIC code in
a shared lib will mean lib pages with relocations can't be shared between
processes should the library be loaded at a different virtual addresses.
--
Alan Modra
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] xfree86 build problem
@ 2001-04-15 6:17 amodra
0 siblings, 0 replies; 9+ messages in thread
From: amodra @ 2001-04-15 6:17 UTC (permalink / raw)
To: parisc-linux
On Sat, Apr 14, 2001 at 10:36:25PM -0600, Grant Grundler wrote:
> amodra@one.net.au wrote:
> > True, but it's not recommended. The reason being that non-PIC code in
> > a shared lib will mean lib pages with relocations can't be shared between
> > processes should the library be loaded at a different virtual addresses.
>
> Well, I guess either x86 doesn't have that problem,
It does.
> no one has noticed it, or no one cares (OpenGL fans?).
Possibly :-( As Ulrich mentioned, it's fairly easy to see if a shared lib
can't actually be shared. "readelf -d libwhatever.so | grep DT_TEXTREL"
> Under build-env/xc/lib/GL/glu Imakefiles
> all have the following construct: (eg libtess/Imakefile)
>
> NormalLibraryTarget(tess, $(OBJS))
> rm -f unshared; ln -sf . ./unshared
>
> The result is only .a's get built and the libGLU.so is globbed together
> from those. The last step fails for __hppa__ since the .o's are non-PIC.
I suppose you could build the .a lib with -fPIC as a workaround.
--
Alan Modra
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-04-15 12:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-13 22:21 [parisc-linux] xfree86 build problem Grant Grundler
2001-04-14 11:55 ` amodra
2001-04-14 22:18 ` Grant Grundler
2001-04-14 23:00 ` Ulrich Drepper
2001-04-14 23:41 ` Alan Cox
2001-04-15 4:23 ` Grant Grundler
2001-04-15 12:32 ` Alan Cox
2001-04-15 4:42 ` amodra
-- strict thread matches above, loose matches on Subject: below --
2001-04-15 6:17 amodra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox