[prog] Fortran portability on linux
Shirrell
shirrell at pstat.com
Mon Jun 7 21:54:47 EST 2004
Kathryn Hogg wrote:
>>ldd reports that the module was not dynamically linked.
>>strace has no mentions of dlopen
>>
>>Any other thoughts ?
>>
>>
>
>Well, lets go back to beginning. When you say "the module does not run
>and that the problem seems to be an incompatibility with glibc 2.3" --
>what actually happens when the binary is run?
>
>
>
Unfortunately the module runs fine here and I have only the information
from the
customer. The following is a report on what happens:
Abort
"according to the trace, it is receiving (and handling) a SIGABRT signal"
these results are seen on a Red Hat 7.1 system running
Kernel: 2.4.20aa1
Glibc: 2.2.4-33 The same results were senn on Red Hat Advanced
Server 2.1 running
Kernel 2.4.9-e.38smp
Glibc 2.2.4-32.11
I am still waiting for a report on why they could not:
1) Compiling under Red Hat Advanced Server 3 (Red Hat 9) is not readily feasible (details available upon request)
2) Compiling under Red Hat Advanced Server 2.1 is feasible. He made a dynamic binary (more on that later) that seems to work on Red Hat Advanced Server 3 (presumably in backward compatibility mode).
3) There is something about gethostbyname and getservbyname that force use of some dynamic libraries even if you specify static linking.
The information from Jimen Ching may have some relevance except that we
do not have
any explicit reference that call gethostbyname:
Depending on the version of the GNU linker, you don't need a direct call
to a function to cause it to be linked in. For example, if you had two
function definitions:
void some_func_that_calls_gethostbyname(void);
void some_func_that_does_not_call_gethostbyname(void);
that exists in the same file and your main() calls the function that
doesn't call gethostbyname(), then gethostbyname will be linked in because
of the other function. GCC 3.4 has a new feature that prevents this.
There's this -funit-at-a-time option, which won't pull in the uncalled
function, and thus, won't pull in gethostbyname.
Since this is all the information I have perhaps we should put this on
hold until they send me
more details.
Thanks,
Shirrell at pstat.com
More information about the Programming
mailing list