AIX XCOFF problem

Anders Vstling anders.ostling@neurope.ikea.com
Thu Jan 21 04:38:00 GMT 1999


Hi

Platform: AIX blade 2 4 000005367500 (AIX 4.2)

 I downloaded EGCS 1.1.1 from cygnus and built the whole package with
IBM's
xlc compiler.

configure --prefix=/u/anos --enable-threads
make bootstrap-lean && make install

(Note that I did only build static libs, no shared)

Path was changed to start with /u/anos/bin so I got
anos$blade:/u/anos: echo $PATH
/u/anos/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:.

anos$blade:/u/anos: ls -l bin
total 7120
-rwxr-xr-x   2 anos     staff     187294 Jan 20 22:32 c++
-rwxr-xr-x   1 anos     staff      92306 Jan 20 22:32 c++filt
-rwxr-xr-x   2 anos     staff     187294 Jan 20 22:32 g++
-rwxr-xr-x   1 anos     staff     192867 Jan 20 22:32 g77
-rwxr-xr-x   2 anos     staff     183422 Jan 20 22:33 gcc
-rwxr-xr-x   1 anos     staff      63590 Jan 20 22:32 gcov
-rwxr-xr-x   1 anos     staff    1602757 Jan 19 09:49 gdb
-rwxr-xr-x   2 anos     staff     120443 Jan 14 09:04 gunzip
-rwxr-xr-x   2 anos     staff     120443 Jan 14 09:04 gzip
-rwxr-xr-x   1 anos     staff     448902 Jan 14 12:52 make
-rwxr-xr-x   1 anos     staff     123001 Jan 20 22:32 protoize
-rwxr-xr-x   2 anos     staff     183422 Jan 20 22:33
rs6000-ibm-aix4.2.1.0-gcc
-rwxr-xr-x   1 anos     staff     113253 Jan 20 22:32 unprotoize

anos$blade:/u/anos: gcc -v
Reading specs from
/u/anos/lib/gcc-lib/rs6000-ibm-aix4.2.1.0/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
anos$blade:/u/anos: c++ -v
Reading specs from
/u/anos/lib/gcc-lib/rs6000-ibm-aix4.2.1.0/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)

I can compile and link my software with GNU make

anos$blade:/u/anos: make -v
GNU Make version 3.76.1, by Richard Stallman and Roland McGrath.

When I attempt to run my program, I get this message

anos$blade:/u/anos/acid: bin/acid
Could not load program bin/acid
/u/anos/lib/libstdc++.a is not executable or not in correct XCOFF format

Could not load library libstdc++.a
Error was: Exec format error

What is strange (to me) is that altough I refer to the libstdc++.a
library, I get
a runtime linking error. Should'nt the .a file be included in the
resulting exe ?

anos$blade:/u/anos/acid/bin: file acid
acid:           executable (RISC System/6000) or object module not
stripped

anos$blade:/u/anos/lib: file libstdc++.a
libstdc++.a:    archive

I'm sure there is a logical explanation, but I have been chasing this
one for
a couple of days now and I am stuck now. Can't think of anything else
except
rebuilding egcs with shared libs instead. I will rebuild it tonight and
check in
the morning.

I also appends my makefile if you need to have a look at it.

Best regards

Anders



--------------------------------------------------------
Anders Östling
IKEA Corporate Technology Group
Email: anders dot ostling AT neurope dot ikea dot com
Phone: +46-42-25 73 45
Fax  : +46-42-25 73 70
Mobil: +46-70-753 70 39
--------------------------------------------------------




More information about the Gcc-bugs mailing list