Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cross-compiling NetCDF - problems with make



Hi everyone,

I'm having difficulties compiling NetCDF 3.6.1 for AROS operating system (http://freshmeat.net/projects/aros/). I'm running the AROS development platform hosted on Linux Fedora Core 3. The following steps describe what I have done and how far I managed to get to.

(1) Configuring with the following settings:

[insurgent@localhost src]$ CC='i386-aros-gcc -nix' FC='' F90='' CXX='' CC_FOR_BUILD=gcc ./configure --target=i386-aros --host=i386-aros --build=local

(2) Initially, I got this this error message:

checking for working ftruncate()... configure: error: cannot run test program while cross compiling

(3) I figured from previous forum posts that I should perhaps skip this test since running in cross-compiling environment, so I have inserted the 'cross_compiling' flags into ./configure as shown in this snippet:

    echo "$as_me:$LINENO: checking for working ftruncate()" >&5
echo $ECHO_N "checking for working ftruncate()... $ECHO_C" >&6
cross_compiling=no
    if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
cross_compiling=yes
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */

(4) Configuring again:

[insurgent@localhost src]$ CC='i386-aros-gcc -nix' FC='' F90='' CXX='' CC_FOR_BUILD=gcc ./configure --target=i386-aros --host=i386-aros --build=local

Works fine!

(5) Now, trying to run make - it bails out with the following errors:

[insurgent@localhost src]$ make
make[1]: Entering directory `/home/insurgent/netcdf-3.6.1-beta3/src'

Making `all' in directory /home/insurgent/netcdf-3.6.1-beta3/src/libsrc

make[2]: Entering directory `/home/insurgent/netcdf-3.6.1-beta3/src/libsrc'
i386-aros-gcc -nix -c -g -I.. -I.   ncx.c
ncx.c:1707:2: #error "x_size_t implementation"
ncx.c: In function `ncx_put_off_t':
ncx.c:1775: warning: right shift count >= width of type
ncx.c: In function `ncx_get_off_t':
ncx.c:1832: warning: left shift count >= width of type
ncx.c:1833: warning: left shift count >= width of type
ncx.c:1834: warning: left shift count >= width of type
ncx.c:1835: warning: left shift count >= width of type
make[2]: *** [ncx.o] Error 1
make[2]: Leaving directory `/home/insurgent/netcdf-3.6.1-beta3/src/libsrc'
make[1]: *** [subdir_target] Error 1
make[1]: Leaving directory `/home/insurgent/netcdf-3.6.1-beta3/src'
make: *** [libsrc/all] Error 2

What these errors and warnings mean?
What should I try next?

Thanks,
Dmitar
butrovski@xxxxxxxxx


On Yahoo!7
Messenger: Make free PC-to-PC calls to your friends overseas.
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690