|
From: Emmanuel B. <be...@ia...> - 2004-12-01 23:27:36
|
Hi all,
Although there is no problem on x86 systems, a strange thing happens
when linking statically a C program with PLPlot on the x86-64
architecture: *Any* unsuccesfull call to fopen() happens to generate
immediately a segmentation fault!! I tried with various 5.x versions,
including the latest 5.3.1.cvs.20041028, with different versions of
glibc on Mandrake 10.x and the latest Gentoo. No such problem ever
happens when linking dynamically. Here is what strace says:
brk(0) = 0xd4c000
brk(0xd6d000) = 0xd6d000
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=420, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Does anyone have a clue??? I guess it may have to do with some library
used by PLPlot, but I have not been able to find which one.
Thanks for this very nice library.
Emmanuel.
PS: One may wonder the purpose of statically linking a library which
depends on specific font files at runtime. Well we made a patch that
circumvents this and allows you to use and distribute programs linked
with PLPLOT without having PLPLOT installed (this was proposed to the
developers for inclusion in the official package but we got no
response)... But the bug above occurs also without the patch applied.
|