Ticket #2766 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

gdal 1.6.0 does not build with gcc 4.3/4.2

Reported by: fundawang Owned by: warmerdam
Priority: normal Milestone:
Component: ConfigBuild Version: 1.6.0
Severity: normal Keywords: mysql
Cc:

Description

Please see attached build log

Attachments

gdal-1.6.0-gcc4.2.3.log.bz2 Download (21.0 KB) - added by fundawang 4 years ago.
build log with gcc 4.2.3
gdal-1.6.0-mdv2009.1-br.log.bz2 Download (2.6 KB) - added by fundawang 4 years ago.
Build dependencies of gdal 1.6.0

Change History

Changed 4 years ago by fundawang

build log with gcc 4.2.3

Changed 4 years ago by fundawang

Build dependencies of gdal 1.6.0

Changed 4 years ago by warmerdam

  • keywords mysql added
  • component changed from OGR_SF to ConfigBuild

The problem seems to specific to an interaction between the mysql driver and gcc 4.3/4.2. It is unclear if this is due to some bad ordering of include files on OGR's part, or whether it is just fundamentally an incompatability between the mysql include files and gcc 4.2/4.3.

Relavent log portion:

 /usr/bin/g++4.2 -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wall -I.. -I../.. -I/home/fwang/rpm/BUILD/gdal-1.6.0/port -I/home/fwang/rpm/BUILD/gdal-1.6.0/gcore -I/home/fwang/rpm/BUILD/gdal-1.6.0/alg -I/home/fwang/rpm/BUILD/gdal-1.6.0/ogr -I/home/fwang/rpm/BUILD/gdal-1.6.0/ogr/ogrsf_frmts -I/usr/include/mysql -DOGR_ENABLED -I/usr/include/libdap -I/usr/include/netcdf-3 -I/usr/include/libgeotiff -I/home/fwang/rpm/BUILD/gdal-1.6.0/port -I/usr -I/usr/include -c ogrmysqldriver.cpp  -fPIC -DPIC -o ../o/.libs/ogrmysqldriver.o
In file included from /usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/bits/char_traits.h:46,
                 from /usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/string:47,
                 from /home/fwang/rpm/BUILD/gdal-1.6.0/port/cpl_string.h:169,
                 from ../../ogr_featurestyle.h:34,
                 from ../../ogr_feature.h:34,
                 from ../ogrsf_frmts.h:33,
                 from ogr_mysql.h:41,
                 from ogrmysqldriver.cpp:30:
/usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/bits/stl_algobase.h:226:56: error: macro "min" passed 3 arguments, but takes just 2
/usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/bits/stl_algobase.h:246:56: error: macro "max" passed 3 arguments, but takes just 2
In file included from /usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/memory:60,
                 from /usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/string:48,
                 from /home/fwang/rpm/BUILD/gdal-1.6.0/port/cpl_string.h:169,
                 from ../../ogr_featurestyle.h:34,
                 from ../../ogr_feature.h:34,
                 from ../ogrsf_frmts.h:33,
                 from ogr_mysql.h:41,
                 from ogrmysqldriver.cpp:30:
/usr/lib/gcc/x86_64-manbo-linux-gnu/4.2.3/../../../../include/c++/4.2.3/limits:290:22: error: macro "min" requires 2 arguments, but only 1 given

Changed 4 years ago by fundawang

You are right, I've tried building under 2009.0 with mysql 5.0.67, it succeeded.

Changed 4 years ago by warmerdam

  • status changed from new to closed
  • resolution set to worksforme

Changed 4 years ago by rouault

  • milestone 1.6.1 deleted

It was reported again as #2972. Fixed in trunk (r16921) and branches/1.6 (r16922)

Note: See TracTickets for help on using tickets.