[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error: environment is NULL (?)
From: |
Richard Frith-Macdonald |
Subject: |
Re: Error: environment is NULL (?) |
Date: |
Sat, 28 Jul 2001 07:18:03 +0100 |
On Tuesday, July 24, 2001, at 12:44 PM, Laurent Julliard wrote:
I have been working on a Ruby-GNUStep bridge for a while and yesterday I
decided to statically link the Ruby extension (written in Objective C)
in Ruby itself to ease debugging.
Compilation and linking of the extension went well but when I run the
new ruby interpreter I get the following error:
Error: for some reason, environ == NULL during GNUstep base
initialization
Please check the linking process
I must say that I have some difficulties to understand what's happening
here? Is there some GNUstep specific code I must add in my extension to
avoid this problem? Is it due to the fact that the ruby interpreter has
its own main subroutine
Thanks for any help
PS: the same extension linked dynamically loads with no problem in ruby.
I don't know how ruby extensions work ... but the environ external
variable
should point to the process environment. Perhaps there is a problem with
your ld flags that is causing the system to fail to do this properly -
eg. the extension is ending up with a separate copy of environ from the
main program, so that the variable is not being initialised.
If you can't fix the ld flags, it may be possible to work around this if
your extension can determine the environment in some other way, and use
it
to initialise environ before any GNUstep code it called.