Missing _environ while compiling 6.8.1 on Leopard

Folks, I keep getting this issue when compiling ghc 6.8.1 on Leopard. Manuel doesn't have this issue for some reason. I have removed the GMP framework as per his suggestion but it didn't help. Any clues? --- GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help ghc-6.8.1: /usr/local/lib/ghc-6.8.1/lib/base-3.0.0.0/HSbase-3.0.0.0.o: unknown symbol `_environ' Loading package base ... linking ... ghc-6.8.1: unable to load package `base' --- Thanks, Joel -- http://wagerlabs.com

I'm seeing this, too. An fgrep of /usr/include for environ picked up this: /usr/include/X11/Xw32defs.h:#define environ _environ Is there any reason this X11 header would get included? That would mess up this in HsBase.h: /* ToDo: write a feature test that doesn't assume 'environ' to * be in scope at link-time. */ extern char** environ; INLINE char **__hscore_environ() { return environ; } Deborah On Nov 6, 2007, at 3:03 AM, Joel Reymont wrote:
Folks,
I keep getting this issue when compiling ghc 6.8.1 on Leopard. Manuel doesn't have this issue for some reason. I have removed the GMP framework as per his suggestion but it didn't help.
Any clues?
---
GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help ghc-6.8.1: /usr/local/lib/ghc-6.8.1/lib/base-3.0.0.0/HSbase-3.0.0.0.o: unknown symbol `_environ' Loading package base ... linking ... ghc-6.8.1: unable to load package `base'
---
Thanks, Joel
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

X has nothing to do with this. Run this test: junior:ghc-6.8.1 joelr$ nm compiler/stage2/ghc-6.8.1|grep _environ 008f7e10 T ___hscore_environ 00a40004 D _environ The symbol is there (D). Now run the same on /usr/local/lib/ghc-6.8.1/ ghc-6.8.1, assuming you installed into /usr/local. The symbol will _not_ be there. What's going on? Take a look: junior:ghc-6.8.1 joelr$ strip compiler/stage1/ghc-6.8.1 junior:ghc-6.8.1 joelr$ nm compiler/stage1/ghc-6.8.1|grep _environ junior:ghc-6.8.1 joelr$ Now you see it and now you don't. install-sh has a '-s' option that runs strip on the installed binaries. To work around the problem either copy the binaries from stage2 manually or find the Makefile that runs install-sh -s and remove the strip option. On Nov 9, 2007, at 9:24 PM, Deborah Goldsmith wrote:
I'm seeing this, too. An fgrep of /usr/include for environ picked up this:
/usr/include/X11/Xw32defs.h:#define environ _environ
Is there any reason this X11 header would get included? That would mess up this in HsBase.h:
/* ToDo: write a feature test that doesn't assume 'environ' to * be in scope at link-time. */ extern char** environ; INLINE char **__hscore_environ() { return environ; }
participants (2)
-
Deborah Goldsmith
-
Joel Reymont