Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* GCC linker error... Help?
@ 1996-11-12  1:30 Hunter Andreas Ware
  0 siblings, 0 replies; 2+ messages in thread
From: Hunter Andreas Ware @ 1996-11-12  1:30 UTC (permalink / raw)


I am trying to compile the VTK, a mesa program for data
visualization, and have run into a problem I wondered if anyone else new
about.  Mesa compiles and runs well w/out shared memory (Working on that
too...), and the C part of the VTK compiles and links fine.  There is
also, however, and TCL interface.
	The TCL interface seems to compile somewhat ok (read it swallows
the code, whining all the way) but on linking it gives a bunch of errors
like this...

system1: ~/prog/vtk1.2/tclsrc$ make
c++ -o vtk tkAppInit.o vtkAutoInit.o vtkTclUtil.o \
-L. -lvtkTcl vtkXRenderWindowInteractor.o  \
-L../src -lvtk -L/usr/X11R6/lib -lGL    /usr/lib/libtk.so /usr/lib/libtcl.so
 -ldl -L/usr/X11R6/lib -lXext -lXt -lSM -lICE -lX11  -lm
/usr/lib/gcc-lib/alpha-linux/2.7.2/crtend.o(.text+0x14): relocation truncated
 to fit: LITERAL __CTOR_END__
./libvtkTcl.a(tclvtkObject.hh.o): In function `vtkObjectCppCommand
(vtkObject *, Tcl_Interp *, int, char **)':
tclvtkObject.hh.cc(.text+0x610): undefined reference to `_IO_putc'
tclvtkObject.hh.cc(.text+0x614): undefined reference to `_IO_putc'
./libvtkTcl.a(tclvtkProperty.hh.o): In function `vtkPropertyCppCommand
(vtkProperty *, Tcl_Interp *, int, char **)':
tclvtkProperty.hh.cc(.text+0x4a5c): relocation truncated to fit: LITERAL $C229
tclvtkProperty.hh.cc(.text+0x4a78): relocation truncated to fit: LITERAL $C230
tclvtkProperty.hh.cc(.text+0x4a94): relocation truncated to fit: LITERAL $C231
...
	< Total about 30 of these >
...
tclvtkProperty.hh.cc(.text+0x4d18): relocation truncated to fit: LITERAL $C254
tclvtkProperty.hh.cc(.text+0x4d70): relocation truncated to fit: LITERAL $C255
tclvtkProperty.hh.cc(.text+0x4d94): relocation truncated to fit: LITERAL $C256
./libvtkTcl.a(tclvtkProperty.hh.o): In function `vtkIdList::~vtkIdList(void)':
tclvtkProperty.hh.cc(.text+0x4e00): relocation truncated to fit: LITERAL
 vtkIdList virtual table
./libvtkTcl.a(tclvtkQuad.hh.o): In function `vtkQuadCommand(void *,
 Tcl_Interp *, int, char **)':
tclvtkQuad.hh.cc(.text+0x30): relocation truncated to fit: LITERAL $C51
tclvtkQuad.hh.cc(.text+0x90): relocation truncated to fit: LITERAL
 vtkQuadCppCommand(vtkQuad *, Tcl_Interp *, int, char **)
./libvtkTcl.a(tclvtkQuad.hh.o): In function `vtkQuadCppCommand(vtkQuad *,
 Tcl_Interp *, int, char **)':
tclvtkQuad.hh.cc(.text+0x108): relocation truncated to fit: LITERAL temps.558
tclvtkQuad.hh.cc(.text+0x11c): relocation truncated to fit: LITERAL $C52
tclvtkQuad.hh.cc(.text+0x138): relocation truncated to fit: LITERAL $C50
tclvtkQuad.hh.cc(.text+0x190): relocation truncated to fit: LITERAL $C53
...
	Pages of this stuff. *sigh*
...
vtkStructuredPointsReader.cc(.text+0x44d8): relocation truncated to fit: LITERAL vtkIdList virtual table
gcc: Internal compiler error: program ld got fatal signal 11
make: *** [vtk] Error 1

	Does anyone have any says into what might be going on here. I know
this pig compiles, links, and runs fine on intel gcc 2.7.0 & 2.7.2, and with
3 versions of tcl.

					Any help would be loved,
							Hunter

-- 
               If the good lord had wanted man to stay on
        ._ O     the ground, he would have given us roots.
~~~\      //\.
    \    \>> |   Don't take life seriously, you'll never get out alive.
     \    \\
      \                 Hunter Ware - haw4t@virginia.edu

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GCC linker error... Help?
       [not found] <199611120130.UAA11375@system1.virginia.edu>
@ 1996-11-12  4:52 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 1996-11-12  4:52 UTC (permalink / raw)


> 	I am trying to compile the VTK, a mesa program for data
> visualization, and have run into a problem I wondered if anyone else new
> about.
[...]
> c++ -o vtk tkAppInit.o vtkAutoInit.o vtkTclUtil.o \
> -L. -lvtkTcl vtkXRenderWindowInteractor.o  \
> -L../src -lvtk -L/usr/X11R6/lib -lGL    /usr/lib/libtk.so /usr/lib/libtcl.so
>  -ldl -L/usr/X11R6/lib -lXext -lXt -lSM -lICE -lX11  -lm
> /usr/lib/gcc-lib/alpha-linux/2.7.2/crtend.o(.text+0x14): relocation truncated
>  to fit: LITERAL __CTOR_END__
[...]
> tclvtkProperty.hh.cc(.text+0x4a5c): relocation truncated to fit: LITERAL $C229

There are two possible problems:

 1) less likely, you are mixing ELF and ECOFF object files or libraries.

 2) you've run into a limit in the current ELF linker in the size of the
    .got section (which is related to the number of global variables and
    functions in the program).

Assuming the second, there is a way that you can work around the problem
right now: turn some of your static libraries into shared libraries. 

From your link line, there appear to be three likely candidates:
-lvtkTcl, -lvtk, and -lGL.  The link line for doing that is

  gcc -shared -o <library>.so -Wl,--whole-archive <library>.a \
	-Wl,--no-whole-archive

Now you have three options: (1) you can either put the newly created
shared libraries in one of the standard library directories, (2) if
you have a dedicated directory heirarchy for your application (e.g.
/usr/local/vtk/) you can put them in /usr/local/vtk/lib and add that
to your /etc/ld.so.conf, or (3) you can pick a directory (usually
the one the executable resides in) and add -Wl,-rpath=<directory> to
the link line _for the executable_.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-11-12  4:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <199611120130.UAA11375@system1.virginia.edu>
1996-11-12  4:52 ` GCC linker error... Help? Richard Henderson
1996-11-12  1:30 Hunter Andreas Ware

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox