Hi,
I am hoping someone would remember having a similar problem and have a
solution for me. I am using Solaris 2.5 running C++4.2 and Fortran 77
4.2 and Fortran 90 1.2. I am linking in dynamically libc.so.1 and
libC.so.5 and statically libf90.a (shared version not available Fortran
90 1.2 for some reason).
When I linked in libf90.a with the C/C++ libraries, I get the following
segmentation fault error. The program crashed on an open statement.
The file it was trying to open (I use dbx "examine" on the first
parameter of open -- "0xa5180") is a non-existent file under the
directory /opt/SUNWspro/WS4.0/lib/locale/C/LC_MESSAGES.
The program crashed without even executed one line of program code ( I
put break point in the 1st line of my code). The crash appears to
happen during or before program startup. Judging from the calling stack
(catopen -> open) I think the program is trying to retrieve an error
message from the message catalog.
I have tried having a C/C++ program with no Fortran code and link in
libf90.a. I will get the same error. I suspect the problem is library
conflict between libf90.a and libc.so.1. I have tried linking in libc.a
without success.
Has anyone remember a patch for Fortran 90 1.2 or Solaris 2.5 for this
kind of problem?
The following is the output from dbx. Anyone with any suggestions will
be very much appreciated. Thank you in advance.
(dbx) Running: wtest
(process id 14482)
signal SEGV (no mapping at the fault address) in open at 0xee364120
0xee364120: open : ldsb [%g7 + 0x45], %g1
(dbx) where
=>[1] open(0xa5180, 0x0, 0x3a000000, 0x3a, 0x8c78c, 0x3a), at 0xee364120
[2] catopen(0xf000, 0x4000, 0xa5180, 0xa3b70, 0xffffffff, 0xa5180), at
0x5234c
[3] __STATIC_CONSTRUCTOR(0xee1b70b8, 0x0, 0xee1b70b8, 0xee1b8b04,
0xee1b8a90, 0xee1b70b8), at 0xee1a5da4
[4] _init(0xef7a0c84, 0xef7f5874, 0xef7f4a98, 0x0, 0xef3e0218,
0xee1a6970), at 0xee1a6a48
[5] call_init(0xef7a0b74, 0x3b, 0x1e, 0x0, 0x0, 0x1), at 0xef7d8a84
[6] call_init(0xef7a0a64, 0x1e, 0xff00, 0x44010e4, 0x1, 0x0), at
0xef7d8a84
[7] call_init(0xef7a0950, 0x4801ae5, 0x1000, 0x4801ae5, 0x1e,
0xf026b494), at 0xef7d8a84
[8] call_init(0xef7a0840, 0x0, 0x0, 0xf5976d70, 0x1, 0x200), at
0xef7d8a84
[9] call_init(0xef7a0730, 0x5248, 0x8000000, 0xf6007980, 0xf5f6c480,
0xf5f6c5a0), at 0xef7d8a84
[10] call_init(0xef7a061c, 0xfc04fc64, 0xfc04fc08, 0x0, 0x0,
0xfc04fc90), at 0xef7d8a84
[11] call_init(0xef7a0508, 0xef7f4af0, 0x80, 0xef7f579c, 0xeffff90c,
0xef7f579c), at 0xef7d8a84
[12] call_init(0xef7a03f8, 0xef7f5874, 0xef7f4a98, 0x0, 0xef3e0218,
0x1), at 0xef7d8a84
[13] call_init(0xef7a02e4, 0x3b, 0x1e, 0x0, 0x0, 0x1), at 0xef7d8a84
[14] call_init(0xef7a01c4, 0x1e, 0xff00, 0x44010e4, 0x1, 0x0), at
0xef7d8a84
[15] call_init(0xef7a00b4, 0x4801ae5, 0x1000, 0x4801ae5, 0x1e,
0xf026b494), at 0xef7d8a84
[16] call_init(0xef7c0f6c, 0x0, 0x0, 0xf5976d70, 0x1, 0x200), at
0xef7d8a84
[17] call_init(0xef7c0e40, 0x5248, 0x8000000, 0xf6007980, 0xf5f6c480,
0xf5f6c5a0), at 0xef7d8a84
[18] call_init(0xef7c0d10, 0xfc04fc64, 0xfc04fc08, 0x0, 0x0,
0xfc04fc90), at 0xef7d8a84
[19] call_init(0xef7c0be4, 0xef7f4af0, 0x80, 0xef7f579c, 0xeffff90c,
0xef7f579c), at 0xef7d8a84
[20] call_init(0xef7c0ab8, 0xef7f5874, 0xef7f4a98, 0x0, 0xef3e0218,
0x1), at 0xef7d8a84
[21] call_init(0xef7c0988, 0x3b, 0x1e, 0x0, 0x0, 0x1), at 0xef7d8a84
[22] call_init(0xef7c0858, 0x1e, 0xff00, 0x44010e4, 0x1, 0x0), at
0xef7d8a84
[23] call_init(0xef7c072c, 0x4801ae5, 0x1000, 0x4801ae5, 0x1e,
0xf026b494), at 0xef7d8a84
[24] call_init(0xef7c05fc, 0x0, 0x0, 0xf5976d70, 0x1, 0x200), at
0xef7d8a84
[25] call_init(0xef7c04d0, 0x5248, 0x8000000, 0xf6007980, 0xf5f6c480,
0xf5f6c5a0), at 0xef7d8a84
[26] call_init(0xef7c03a0, 0xfc04fc64, 0xfc04fc08, 0x0, 0x0,
0xfc04fc90), at 0xef7d8a84
[27] call_init(0xef7c0274, 0xef7f4af0, 0x80, 0xef7f579c, 0xeffff90c,
0xef7f579c), at 0xef7d8a84
[28] call_init(0xef7c015c, 0xef7f5874, 0xef7f4a98, 0x0, 0xef3e0218,
0x1), at 0xef7d8a84
[29] call_init(0xef7c0048, 0x3b, 0x1e, 0x0, 0x0, 0x1), at 0xef7d8a84
[30] call_init(0xef7f5eac, 0x1e, 0xff00, 0x44010e4, 0x1, 0x0), at
0xef7d8a84
[31] call_init(0xef7f5d84, 0x4801ae5, 0x1000, 0x4801ae5, 0x1e,
0xf026b494), at 0xef7d8a84
[32] call_init(0xef7f5c54, 0x0, 0x0, 0xf5976d70, 0x1, 0x200), at
0xef7d8a84
[33] call_init(0xef7f5b24, 0x5248, 0x8000000, 0xf6007980, 0xf5f6c480,
0xf5f6c5a0), at 0xef7d8a84
[34] call_init(0xef7f59f8, 0xfc04fc64, 0xfc04fc08, 0x0, 0x0,
0xfc04fc90), at 0xef7d8a84
[35] call_init(0xef7f579c, 0xef7f4af0, 0x80, 0xef7f579c, 0xeffff90c,
0xef7f579c), at 0xef7d8a84
[36] setup(0xef7f579c, 0xef7f5874, 0xef7f4a98, 0x0, 0xef3e0218, 0x1),
at 0xef7d8a38
[37] _setup(0xef7f579c, 0x0, 0x0, 0x10074, 0xef7d0000, 0xef7f4948), at
0xef7dc18c
[38] _rt_boot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xef7d4428
The following are output from ldd showing runtime libraries required.
libXm.so.3 => /usr/dt/lib/libXm.so.3
libXt.so.4 => /usr/openwin/lib/libXt.so.4
libXmu.so.4 => /usr/openwin/lib/libXmu.so.4
libX11.so.4 => /usr/openwin/lib/libX11.so.4
libm.so.1 => /opt/SUNWspro/lib/libm.so.1
libposix4.so.1 => /usr/lib/libposix4.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libC.so.5 => /usr/lib/libC.so.5
libw.so.1 => /usr/lib/libw.so.1
libthread.so.1 => /usr/lib/libthread.so.1
libc.so.1 => /usr/lib/libc.so.1
libXext.so.0 => /usr/openwin/lib/libXext.so.0
libintl.so.1 => /usr/lib/libintl.so.1
libmp.so.1 => /usr/lib/libmp.so.1