#2458: Unknown symbol `_environ' on MacOS X
-----------------------------+----------------------------------------------
  Reporter:  IgorBoehm       |          Owner:         
      Type:  bug             |         Status:  new    
  Priority:  high            |      Milestone:  6.14.1 
 Component:  libraries/base  |        Version:  6.10.1 
Resolution:                  |       Keywords:  environ
Difficulty:  Unknown         |             Os:  MacOS X
  Testcase:                  |   Architecture:  x86    
   Failure:  None/Unknown    |  
-----------------------------+----------------------------------------------
Changes (by igloo):

  * priority:  normal => high
  * milestone:  6.12.3 => 6.14.1


Comment:

 {{{
 [20:55] < safiire> Has anyone here ran into a problem of trying to link a
                    library compiled with ghc -c into a C++ project and
                    receiving an unresolved symbol _environ.  I am aware
 that
                    _environ is supposed to be defined in crt1.o, however
 the
                    C++ project I am building is an audio unit plugin on
 OSX, so
                    it never links against crt1.o as it is not an
 executable,
                    but a shared object itself.  There is something called
 the
                    osx _environ bug which is the cause of t
 [20:55] < safiire> his.  The work around is that OSX applications are not
                    supposed to call environ(), but are supposed to call
                    _NSGetEnviron(), or, that is the workaround at least.
                    HSBase4.2.0.0.a does not do this on OSX apparently.
 Does
                    anyone know how I can get my linker resolve this
 symbol, or
                    not care that it is undefined, short of recompling
 haskel
                    from source and manually patching it to not call
 environ()?
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2458#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to