Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2766 closed defect (worksforme)

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 (2)

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

Download all attachments as: .zip

Change History (6)

by fundawang, 15 years ago

Attachment: gdal-1.6.0-gcc4.2.3.log.bz2 added

build log with gcc 4.2.3

by fundawang, 15 years ago

Build dependencies of gdal 1.6.0

comment:1 by warmerdam, 15 years ago

Component: OGR_SFConfigBuild
Keywords: mysql added

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

comment:2 by fundawang, 15 years ago

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

comment:3 by warmerdam, 15 years ago

Resolution: worksforme
Status: newclosed

comment:4 by Even Rouault, 15 years ago

Milestone: 1.6.1

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

Note: See TracTickets for help on using tickets.