Bug 708800

Summary: gdal 1.7.2 source rpm will not build on Scientific Linux 64 bit
Product: [Fedora] Fedora EPEL Reporter: Micha Silver <micha>
Component: gdalAssignee: Devrim Gündüz <devrim>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el6CC: cristian.balint, devrim, pavel.lisy, pertusus, vijivijayakumar, volker27
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-22 20:38:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Micha Silver 2011-05-29 16:46:41 UTC
Description of problem:
I tried to build a gdal rpm from the src.rpm, but it failed.

Version-Release number of selected component (if applicable):


How reproducible:
rpmbuild -bb SPECS/gdal.spec

Steps to Reproduce:
1.Download gdal-1.7.2.src.rpm
2.setup rpmbuild environment
3.Run rpmbuild -bb SPECS/gdal.spec
  
Actual results:
Errors in the compile process regarding gdal_wrap -
---%<-----------------------------------------------
gdal_wrap.cpp: In function 'VALUE _wrap_regenerate_overview(int, VALUE*, VALUE)':
gdal_wrap.cpp:15200: warning: deprecated conversion from string constant to 'char*'
gdal_wrap.cpp:15200: warning: deprecated conversion from string constant to 'char*'
gdal_wrap.cpp:15200: warning: deprecated conversion from string constant to 'char*'
gdal_wrap.cpp:15200: warning: deprecated conversion from string constant to 'char*'
gdal_wrap.cpp:15200: warning: deprecated conversion from string constant to 'char*'
gdal_wrap.cpp:15198: warning: unused variable 'kwnames'
gdal_wrap.cpp: In function 'VALUE _wrap_push_error_handler(int, VALUE*, VALUE)':
gdal_wrap.cpp:3616: warning: 'argv[0]' may be used uninitialized in this function
libtool: compile:  g++ -O2 -g -Wall -Wdeclaration-after-statement -I/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/port -I/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/gcore -I/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/alg -I/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/ogr -I/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/ogr/ogrsf_frmts -I/usr/lib64/ruby/1.8 -c gdal_wrap.cpp -o gdal_wrap.o >/dev/null 2>&1
g++ -L../../.libs/ -O2 -g  -shared -L/usr/lib64  -L/usr/lib64 -lgeos_c -L/usr/lib -lsqlite3 -lodbc -lodbcinst -L/usr/lib -lexpat -L/usr/lib -lxerces-c -lpthread -lNCSEcw -lNCSCnet -lNCSUtil -ljasper -lhdf5 -L/usr/lib64/hdf -lmfhdf -ldf -logdi -lgif -ljpeg -lgeotiff -ltiff -lpng -lnetcdf -lcfitsio -lpq -L/usr/lib64 -lpq -lz -lpthread -lm -lrt -ldl  -ldap -ldapclient -ldapserver -lpthread -lrx  -lcurl    -lxml2 -lz -lm   -lcurl      -rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto -L/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora -lgdal -lruby gdal_wrap.o -o gdal.so
/usr/bin/ld: gdal_wrap.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
gdal_wrap.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [gdal.so] Error 1
make[3]: Leaving directory `/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/swig/ruby'
make[2]: *** [build] Error 2
make[2]: Leaving directory `/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/swig/ruby'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/micha/Downloads/rpmbuild/BUILD/gdal-1.7.2-fedora/swig'
make: *** [swig-modules] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.SOWawv (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.SOWawv (%build)

---%<-----------------------------------------------

Expected results:


Additional info:
This thread on elgis maillist:
http://lists.osgeo.org/pipermail/el/2011-May/000535.html

Comment 1 Volker Fröhlich 2012-01-15 18:50:05 UTC
That is a problem with the way the Ruby bindings were built originally. They later added -Xcompiler to solve the problem, which is not compatible with GCC 4.6.

At the moment we're patching these build flags. Please try if 1.7.3 builds on your system.

Comment 2 Volker Fröhlich 2012-07-22 20:38:18 UTC
With 1.7.3 in EL6, this is no longer relevant.