[El] Trying to build gdal with ECW support on SL 6.0

Micha Silver micha at arava.co.il
Sat May 14 12:29:45 EDT 2011


Hi Volker:

Thanks for responding. I'm not there yet.

I put the 1.7.3 patch in place (into the 1.7.2 SOURCE directory) and 
altered the spec file to apply it, and it was applied:


[micha at MS-SL6 rpmbuild]$ grep -r Xcompiler BUILD
BUILD/gdal-1.7.2-fedora/swig/ruby/RubyMakefile.mk.xcompiler:LDFLAGS += 
-Xcompiler -shared -L$(RUBY_LIB_DIR)
BUILD/gdal-1.7.2-fedora/ltmain.sh:    -Xcompiler)
BUILD/gdal-1.7.2-fedora/ltmain.sh:      -Xcompiler)
BUILD/gdal-1.7.2-fedora/libtool:    -Xcompiler)
BUILD/gdal-1.7.2-fedora/libtool:      -Xcompiler)


The -Xcompiler flag appears only in the backup RubyMakfile, not in 
RubyMakefile.mk itself as in the patch .


But I still get these errors:


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.KpRsoY (%build)


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


Maybe I should take this question to the EPEL maillist. I wonder how the 
packaged gdal.1.7.2 was built??

Regards,
Micha

On 05/14/2011 01:08 PM, Volker Fröhlich wrote:

> Dear Micha!
>
> Besides what you mentioned, the ECW 4.2 license is restricted to create
> software for personal use, or something nastly like that.
>
> You fail on the -Xcompiler flag. There is a patch. This is related to your
> version of GCC and only the Ruby bindings are affected.
>
> You can either take a look at the patch in Fedora's GDAL 1.7.3 source RPM and
> I guess ELGIS has it too.
>
> http://koji.fedoraproject.org/koji/buildinfo?buildID=240296
>
> By the way, you can also run:
>
> # yum-builddep some.src.rpm -- All BRs from the source RPM are installed
> rpmbuild --rebuild some.src.rpm
>
> Volker
>
>



More information about the el mailing list