This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/25134] AIX 5.3 64bit - xgcc error: 1252-191 Only .llong should be used for relocatable expressions



------- Comment #3 from michele_mazza at hotmail dot com  2005-12-27 11:05 -------
We need to build a C++ library on AIX and we would like to use gcc compiler to
keep the library multiplatform (we can run on Linux also).
The C interface of our library is used by SAS (that will soon be 64bit).
This means we need to recompile all libraries to 64bit.
At the moment, we are using a gcc 3.3.3 (32bit) build by UCLA.


As firt test, we compiled and linked our library with -maix64 option and
'export OBJECT_MODE=64' environment.
As a result we have got the following error message at execution time:

read whitepapers compile, link and test with aix and 64bit flags
exec(): 0509-036 Cannot load program ./console because of the following errors:
        0509-150   Dependent module
/home/fmr/workarea/usr/local/lib/libstdc++.a(libstdc++.so.5) could not be
loaded.
        0509-103   The module has an invalid magic number.

To me it seems that libstdc++.a of the 32bit gcc compiler is not usable by a
64bit application (all libraries must be 64bit).
This is why I wold like to compile gcc as a 64bit program.


Then, to investigate the problem, we created a small and very basic library
example.
We tryed to compile and link without 'export OBJECT_MODE=64' but we have got
the following:

/home/fmr/MYLIB # libtool --mode compile g++ -maix64 $CXXFLAGS -I./ -c 
libshl.c
g++ -maix64 -I./ -c libshl.c  -DPIC -o .libs/libshl.o
/home/fmr/MYLIB # libtool --mode=link g++ -maix64 -o libshl.la ./libshl.lo 
-rpath $PWD/lib
generating symbol list for `libshl.la'
/usr/bin/nm -B -BCpg  ./.libs/libshl.o  | awk '{ if ((($2 == "T") || ($2 == 
"D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > 
.libs/libshl.exp
0654-210 ./.libs/libshl.o is not valid in the current object file mode.
        Use the -X option to specify the desired object mode.
g++ -shared -o .libs/libshl.so.0  ./.libs/libshl.o  
-L/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2 
-L/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2/../../.. -lstdc++ 
-lm -lc  -maix64 -Wl,-bE:.libs/libshl.exp -Wl,-bnoentry ${wl}-berok
ar cru .libs/libshl.a .libs/libshl.so.0
ar: 0707-126 .libs/libshl.so.0 is not valid with the current object file 
mode.
        Use the -X option to specify the desired object mode.

Instead, with OBJECT_MODE=64 we are able to compile and link but not to
execute.


We would like to keep using gcc and so if you could help us we would apreciate.
Thanks for your help.


-- 

michele_mazza at hotmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25134


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]