Re: [Haskell-cafe] libffi mystery

2010-10-29 Thread Ketil Malde
Conor McBride  writes:

> ...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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] libffi mystery

2010-10-29 Thread Conor McBride

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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] libffi mystery

2010-10-28 Thread Ketil Malde
"Sittampalam, Ganesh"  writes:

> 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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] libffi mystery

2010-10-28 Thread Sittampalam, Ganesh
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 
=== 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe