shared libraries problems with gcc-2.95.2 and AIX 4.1.5

Macintyre, Hamish Hamish.Macintyre@Hess.com
Thu Apr 27 11:16:00 GMT 2000


gcc-bugs,

I thought I successfully compiled gcc-2.95.2 on AIX unix version 4.1.5.0.
I configured with the following flags:
../gcc-2.95.2/configure
--with-gcc-version-trigger=/u2/macintyh/src/gcc-2.95.2/gcc/version.c
--host=rs6000-ibm-aix4.1.5.0 --prefix=/u2/macintyh/gnu/gcc-2.95.2-hrm
--enable-shared --enable-cpp --with-gnu-ld --with-gnu-as --norecursion
I used the gnu linker to compile since the compile fails when I use the
system linker--
as noted in ../install/SPECIFIC.
I have four questions (Q1-Q4).
Q1: I built binutils-2.9.1 version of ld, in order to build gcc, it seems to
be unable to generate shared code 
on this platform--is this the only functionality possible on this platform?

For the following tests (T1--T4) I used the system linker /usr/bin/ld.

T1: I tried to compile a "hello world" program. Firstly I compiled and
linked (picked up sytem linker)
with gcc, the program ran successfully.
T2: I tried to compile the same code with c++, it failed with the following
error:

$./a.out
 0509-037 System error - error data is: ./a.out
 0509-022 Cannot load library ..
 0509-026 System error: The file access permissions do not allow the
specific action.
$

NOTE: I would like to point out that I had a similar problems after
successfully compiling
groff-1.15 (a c++ gnu utility):

On the one AIX 4.1.5 platform (the one used for a.out above) the error on
executing groff is:
$./groff
 0509-037 System error - error data is: ./a.out
 0509-022 Cannot load library ..
 0509-026 System error: The file access permissions do not allow the
specific action.
$
and on another AIX 4.1.5 platform (also with gcc-2.95.2, c++):

$./groff
 Could not load program ./groff
 Could not load library .
 Error was: No such file or directory
$

although I had the equivalent LIBPATH env set.

Q2: Why do I get slightly different output?--patches to the OS (I do not
know the OS history, I am new to these machines)

T3:I re-linked with the static flag, the a.out generated compiled
successfully.
T4:I compiled the code on a AIX 4.1.5 with XlC, it compiled, linked and ran
successfully.

I have looked through the mail archives of the gcc-bugs@gcc.gnu.org and note
that
in http://gcc.gnu.org/ml/gcc-bugs/1999-06n/msg00656.html a similar bug was
discussed
for the compiler-OS combination of egcs-1.1.2 and AIX 4.1.5.
With reference to the bug fix provided therein:
1. My system ld manpage talkes about,
"#! .    (A single dot) This name refers to the main executable. Use
this file name when you are creating a shared object that imports
symbols from multiple main programs with different names. The main
program must export symbols imported by other modules, or loading
will fail. This import file name can be used with or without the run-time
linker."
but I don't know if this feature is implemented in my version of AIX 4.1.5
(I suspect not).

2. I haved looked at the souce code for collect2.c in gcc-2.95.2 and
egcs-1.1.2.
I note that in gcc-2.95.2 there is no function write_import_list().

Q3: Has anybody compiled dynamically linked c++ code on such a platform with
(gcc-2.95.2) c++ ?
Q4: Was the gcc-2.95.2 release patched for this AIX-4.1.5 problem after the
discussion,
http://gcc.gnu.org/ml/gcc-bugs/1999-06n/msg00554.html ?

Best regards
Thanks

Hamish 

______________________________________________________
* email:  hamish.macintyre at hess.com





More information about the Gcc-bugs mailing list