You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Aelony, Avram" <Av...@mpi.com> on 2002/04/16 22:11:40 UTC

fatal: relocation error

hi,

I have written a c++ application that uses the Xerces C++ parser.  The
program, named 'a.out', compiles (with g++/gcc version 2.8.0) and runs
correctly on Solaris when it is I that am running it, however any other
user of my program gets a "relocation error" or some variation of this
theme.  

My aim is to discover a way such that the compiled form of the program
is stand-alone and does not require any special environment
specifications in order to run my executable.  Additionally, the
executable should run correctly regardless of the path in which it sits.

If anyone has any thoughts on how to accomplish this, it would help me
out a great deal. I have limited experience with linker options, but
suspect this is where the problem lies.  I have googled and seen that
others have seen this error, but I have yet to view a solution.

thanks for any help in advance,
Avram

the current error I am getting:
------------------------------
%a.out
ld.so.1: /home/aelony/a.out: fatal: relocation error: file
/home/aelony/a.out
: symbol _6XMLUni.fgRuntimeException_Name: referenced symbol not found
Killed
%

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: fatal: relocation error

Posted by Brad Settlemyer <bw...@cox.rr.com>.
There are several ways of solving this problem.

In code I deploy, I simply link everything statically, which means I created a 
static library from xerces by hand (using ar -r, not the best way, but 
appropriate for me).  When I build my test drivers, I don't want to waste the 
space for each test executable so I compile in the .so path to the executable 
by adding an option like this to the link cycle (this works for Linux):
 -Wl,"-rpath,/home/bsettlem/xerces-c/lib"

If this isn't what you need, please explain what I'm missing.

Brad
On Tuesday 16 April 2002 04:11 pm, Aelony, Avram wrote:
> hi,
>
> I have written a c++ application that uses the Xerces C++ parser.  The
> program, named 'a.out', compiles (with g++/gcc version 2.8.0) and runs
> correctly on Solaris when it is I that am running it, however any other
> user of my program gets a "relocation error" or some variation of this
> theme.
>
> My aim is to discover a way such that the compiled form of the program
> is stand-alone and does not require any special environment
> specifications in order to run my executable.  Additionally, the
> executable should run correctly regardless of the path in which it sits.
>
> If anyone has any thoughts on how to accomplish this, it would help me
> out a great deal. I have limited experience with linker options, but
> suspect this is where the problem lies.  I have googled and seen that
> others have seen this error, but I have yet to view a solution.
>
> thanks for any help in advance,
> Avram
>
> the current error I am getting:
> ------------------------------
> %a.out
> ld.so.1: /home/aelony/a.out: fatal: relocation error: file
> /home/aelony/a.out
>
> : symbol _6XMLUni.fgRuntimeException_Name: referenced symbol not found
>
> Killed
> %
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

-- 
Brad Settlemyer
http://deepcopy.org/
Progamming in the trenches


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org