
Hi again This is what happens when you write actual for-users for-running programs, I guess. It's been a while... I've been writing some software with Network.CGI etc, which we run on the deparmental web server for my students to use. But we just had a bit of an upgrade on the system, and now (once cabal was properly installed) everything compiles again but nothing works. The reason appears to be that the executables now depend on a dynamic library libffi.so.5 which is not (and I am told cannot become) available on our web server. The current workaround is to compile with 6.8.2, which is survivable and will hopefully get me through the semester, but not ideal. Is there some way I can get some more static linking to happen? I did poke about online a bit and found some remarks to the effect that GHC got so much more portable after switching to the dynamic libffi. That sounds great, but tough luck for me. So, being both powerless and clueless, I can only ask: how hosed am I? I'd be grateful for any glimmers of light. Thanks Conor

Conor McBride wrote:
Is there some way I can get some more static linking to happen? I did poke about online a bit and found some remarks to the effect that GHC got so much more portable after switching to the dynamic libffi. That sounds great, but tough luck for me.
So, being both powerless and clueless, I can only ask:
how hosed am I?
I'd be grateful for any glimmers of light.
Have you tried passing -optl-static to ghc (which causes -static to be passed to ld)? Ganesh =============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===============================================================================

"Sittampalam, Ganesh"
Have you tried passing -optl-static to ghc (which causes -static to be passed to ld)?
It used to be: -optl-static -optl-pthread But it doesn't seem to work anymore on my install. % ./a.out a.out: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize: Assertion `_rtld_global_ro._dl_pagesize != 0' failed. -k -- If I haven't seen further, it is by standing in the footprints of giants

Hi Thanks for the help! I've made some progress, but I'm not there yet. On 28 Oct 2010, at 20:08, Ketil Malde wrote:
"Sittampalam, Ganesh"
writes: Have you tried passing -optl-static to ghc (which causes -static to be passed to ld)?
This was new to me. I gave it a whirl. I got lots of linker errors about missing pthread this, missing pthread that, so...
It used to be: -optl-static -optl-pthread
...seemed like a good plan. I got lots of scary warnings like (.text+0x51d8): warning: Using 'setprotoent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/haskell-packages/ghc6/lib/network-2.2.1.7/ghc-6.12.1/ libHSnetwork-2.2.1.7.a(BSD.o): In function `suy9_info': (.text+0x12f6): warning: Using 'endprotoent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/haskell-packages/ghc6/lib/network-2.2.1.7/ghc-6.12.1/ libHSnetwork-2.2.1.7.a(BSD.o): In function `svAk_info': but an executable emerges. If I run the executable from the prompt, it dumps some html, but it still 500s on the web server. So there are at least options and ways to control what's going on. I haven't figured out how to achieve the 6.8.2-alike linking, but oughtn't it to be possible? Many thanks Conor

Conor McBride
...seemed like a good plan. I got lots of scary warnings like
(.text+0x51d8): warning: Using 'setprotoent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
I guess the message is pretty self-explanatory, but current policy for libc these days is that static linking is deprecated, and that a statically linked libc just manually opens other libraries dynamically - at hard coded paths, too. One possible solution is to use an alternative libc, which ISTR asking for, but not getting any suggestions.
but an executable emerges. If I run the executable from the prompt, it dumps some html, but it still 500s on the web server.
As in 500 -Internal error? Did you check the logs? Usually there would be some output there. -k -- If I haven't seen further, it is by standing in the footprints of giants
participants (3)
-
Conor McBride
-
Ketil Malde
-
Sittampalam, Ganesh