Linux PARISC architecture development
 help / color / mirror / Atom feed
* [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-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