LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   Compiling netcdf-3.6.2 on powerpc-ibm-aix5.2.0.0 (https://www.linuxquestions.org/questions/aix-43/compiling-netcdf-3-6-2-on-powerpc-ibm-aix5-2-0-0-a-720893/)

samrat_rao 04-22-2009 06:41 AM

Compiling netcdf-3.6.2 on powerpc-ibm-aix5.2.0.0
 
Hi,
I am trying to compile a package netcdf-3.6.2 on an ibm aix machine called IBM Regatta P690. The script i am using is:
Code:

#!/usr/bin/bash -f

export CC=xlc_r
export CXX=xlC_r
export F77=xlf_r
export FC=xlf90_r
export CFLAGS=-q64
export CXXFLAGS=-q64
export FFLAGS='-q64 -qextname'
export FCFLAGS='-qsuffix=f=f90 -qextname'
export FCFLAGS_f90=-qsuffix=f=f90
export CPPFLAGS='-DIBMR2Fortran -Df2cFortran -Dextname'
export ARFLAGS='-X32_64 -cru'
export NMFLAGS=-X32_64
export SED=/usr/bin/sed

./configure --prefix=/home/caos1/mecsmrao/netcdf_3.6.2 --enable-f90

During the configure process i got a message as:
Quote:

checking command to parse /usr/bin/nm -B output from xlc_r object... failed
After a few object files get created the gmake process aborts giving the error as:
Quote:

libtool: compile: xlc_r -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../libsrc -DIBMR2Fortran -Df2cFortran -Dextname -q64 -c -M fort-varsio.c -o fort-varsio.o
/bin/sh ../libtool --tag=CC --mode=link xlc_r -q64 -o libnetcdff.la fort-attio.lo fort-control.lo fort-dim.lo fort-genatt.lo fort-geninq.lo fort-genvar.lo fort-lib.lo fort-misc.lo fort-v2compat.lo fort-vario.lo fort-var1io.lo fort-varaio.lo fort-varmio.lo fort-varsio.lo
libtool: link: ar cru .libs/libnetcdff.a fort-attio.o fort-control.o fort-dim.o fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o fort-misc.o fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o fort-varmio.o fort-varsio.o
ar: 0707-126 fort-attio.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-control.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-dim.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-genatt.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-geninq.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-genvar.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-lib.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-misc.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-v2compat.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-vario.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-var1io.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-varaio.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-varmio.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 fort-varsio.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
gmake[3]: *** [libnetcdff.la] Error 14
gmake[3]: Leaving directory `/home/caos1/mecsmrao/netcdf-3.6.2/netcdf-3.6.2/fortran'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/caos1/mecsmrao/netcdf-3.6.2/netcdf-3.6.2/fortran'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/caos1/mecsmrao/netcdf-3.6.2/netcdf-3.6.2'
gmake: *** [all] Error 2
Could someone suggest a solution.

I am not a programmer, but i need to get this package compiled.

Thanks for any help.

crabboy 04-30-2009 10:01 AM

ar: 0707-126 fort-varaio.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.


you have a 64 bit vs 32 bit problem. Some of your objects are 32 bit and some are 64.

DukeSSD 04-30-2009 07:21 PM

Yep, and you should probably know that AIX 5.2 went End Of Service today so what is the point, you should be compioling for at least 5,3 these days.

samrat_rao 04-30-2009 11:46 PM

Quote:

Originally Posted by crabboy (Post 3525877)
you have a 64 bit vs 32 bit problem. Some of your objects are 32 bit and some are 64.

Hi,
Yes, i figured out that the problem is a 32 and 64 bit one. I have tried compiling with the ar option -X64 (which is the correct one) as well as -X32. In all cases i get the same error. It is as though the -X option is not being accepted, although during the configure process this flag is accepted. I have also tried some small changes like qarch=ppc and export OBJECT_MODE=64, but nothing works.

AS far as choosing AIX 5.3 over AIX 5.2 is concerned, i have no choice as it i am not an admin and probably AIX 5.2 will be used here for quite some time more.

Thanks.


All times are GMT -5. The time now is 05:23 AM.