Hi all,
I'm trying to build GDAL 2.1.0 in 32 bit on Mac OS X.
I set the following environment variables

export CFLAGS="-arch i386"
export CXXFLAGS="-arch i386"
export CPPFLAGS="-arch i386"
export LDFLAGS="-arch i386"

and then execute

./configure

The build stops with the following error

/bin/sh /Users/mauceri/work/dev/libs/gdal-2.1.1/libtool --mode=compile --tag=CXX g++ -I/Users/mauceri/work/dev/libs/gdal-2.1.1/port -I/Users/mauceri/work/dev/libs/gdal-2.1.1/gcore -I/Users/mauceri/work/dev/libs/gdal-2.1.1/alg -I/Users/mauceri/work/dev/libs/gdal-2.1.1/ogr -I/Users/mauceri/work/dev/libs/gdal-2.1.1/ogr/ogrsf_frmts -I/Users/mauceri/work/dev/libs/gdal-2.1.1/gnm -I/Users/mauceri/work/dev/libs/gdal-2.1.1/apps -arch i386 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wnull-dereference -Wunused-private-field -Wmissing-prototypes -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -I.. -I../jpeg -DHAVE_LIBJPEG -I../jpeg/libjpeg -DINTERNAL_LIBGEOTIFF -Ilibgeotiff -DINTERNAL_LIBTIFF -Ilibtiff -DBIGTIFF_SUPPORT -DOGR_ENABLED -arch i386 -I/Users/mauceri/work/dev/libs/gdal-2.1.1/port -DGDAL_COMPILATION -c -o ../o/geotiff.lo geotiff.cpp libtool: compile: g++ -I/Users/mauceri/work/dev/libs/gdal-2.1.1/port -I/Users/mauceri/work/dev/libs/gdal-2.1.1/gcore -I/Users/mauceri/work/dev/libs/gdal-2.1.1/alg -I/Users/mauceri/work/dev/libs/gdal-2.1.1/ogr -I/Users/mauceri/work/dev/libs/gdal-2.1.1/ogr/ogrsf_frmts -I/Users/mauceri/work/dev/libs/gdal-2.1.1/gnm -I/Users/mauceri/work/dev/libs/gdal-2.1.1/apps -arch i386 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wshorten-64-to-32 -Wshadow -Werror=vla -Wnull-dereference -Wunused-private-field -Wmissing-prototypes -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -I.. -I../jpeg -DHAVE_LIBJPEG -I../jpeg/libjpeg -DINTERNAL_LIBGEOTIFF -Ilibgeotiff -DINTERNAL_LIBTIFF -Ilibtiff -DBIGTIFF_SUPPORT -DOGR_ENABLED -arch i386 -I/Users/mauceri/work/dev/libs/gdal-2.1.1/port -DGDAL_COMPILATION -c geotiff.cpp -fno-common -DPIC -o ../o/.libs/geotiff.o geotiff.cpp:9771:21: error: no member named 'my_function' in 'CPLStaticAssert<false>'; did you mean 'CPLStaticAssert<true>::my_function'?
        if( bSwap ) CPL_SWAP64PTR(&nTmp);
                    ^~~~~~~~~~~~~~~~~~~~
/Users/mauceri/work/dev/libs/gdal-2.1.1/port/cpl_port.h:655:5: note: expanded from macro 'CPL_SWAP64PTR' CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 8); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mauceri/work/dev/libs/gdal-2.1.1/port/cpl_port.h:605:43: note: expanded from macro 'CPL_STATIC_ASSERT_IF_AVAILABLE'
#define CPL_STATIC_ASSERT_IF_AVAILABLE(x) CPL_STATIC_ASSERT(x)
^~~~~~~~~~~~~~~~~~~~
/Users/mauceri/work/dev/libs/gdal-2.1.1/port/cpl_port.h:604:30: note: expanded from macro 'CPL_STATIC_ASSERT'
#define CPL_STATIC_ASSERT(x) CPLStaticAssert<x>::my_function()
                             ^~~~~~~~~~~~~~~~~~~~
/Users/mauceri/work/dev/libs/gdal-2.1.1/port/cpl_port.h:599:17: note: 'CPLStaticAssert<true>::my_function' declared here
    static void my_function() {}

[...]

Do you have any idea on how to fix this?
It seems a problem related to 32 bit compilation, if I compile GDAL in 64 bit I do not get any error.

Thanks,
Calogero

--
Calogero Mauceri
Software Engineer

Applied Coherent Technology Corporation (ACT)
www.actgate.com


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to