Re: Relocation error

David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Thu, 30 Jan 2003 19:09:02 -0500
Newsgroups gmane.comp.lang.moto.devel
Message-ID <[email protected]>
Yeah ... this is one of the problems with linking to symbols inside of 
another binary ... you can't load them unless your program is itself 
loaded by that binary (a bit of a tongue twister there :) ) . That's 
what's going on here. The methods in the codex.http extension rely on 
symbols inside of the apache server. It would be nice if apache had 
those separated out into a shared library ... but unfortunately :) no 
such luck. So, you can verify moto pages that use "codex.http"

moto -v mypage.moto

You can even generate C code for those pages

moto -c mypage.moto

But you can't run them from the command line :P

-Dave

On Thursday, January 30, 2003, at 07:53  PM, Stefano Corsi wrote:

> When I execute this code under apache:
>
> ${
>    use "codex.http";
>    State s = getState();
>    Session session = s.getSession();
>    String username = <String>session.get("username");
>    if (username == null) {
>       sendRedirect("login_form.moto?sid="+getState().getSID());
>    }
> }$
>
> everything is ok. But if I try to execute it from the command line:
>
> [devel@localhost moto]$ moto  index.moto
> moto: relocation error: /usr/mx/codex/http/libmx_codex_http.so: 
> undefined
> symbol: getState
>
> I get this relocation error. Does anyone understand where the problem 
> is?
>
> Thanks,
> 	Stefano
>
>