Opened 15 years ago
Closed 15 years ago
#2973 closed defect (duplicate)
swig extension compile error with "format not a string literal and no format arguments"
Reported by: | Markus Neteler | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | SWIG (all bindings) | Version: | svn-trunk |
Severity: | normal | Keywords: | python |
Cc: |
Description
After update to Mandriva 2009.1, extensions/gdal_wrap.cpp no longer compiles/installs:
make install ... running build_ext building 'osgeo._gdal' extension creating build/temp.linux-x86_64-2.6 creating build/temp.linux-x86_64-2.6/extensions gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -g -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.6 -I/usr/lib64/python2.6/site-packages/numpy/core/include -I/home/neteler/software/gdal/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.6/extensions/gdal_wrap.o extensions/gdal_wrap.cpp: In function ‘void Debug(const char*, const char*)’: extensions/gdal_wrap.cpp:2882: error: format not a string literal and no format arguments extensions/gdal_wrap.cpp: In function ‘void Error(CPLErr, int, const char*)’: extensions/gdal_wrap.cpp:2993: error: format not a string literal and no format arguments extensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*, PyObject*)’: extensions/gdal_wrap.cpp:5383: warning: deprecated conversion from string constant to ‘char*’ error: command 'gcc' failed with exit status 1 make[2]: *** [build] Error 1 make[2]: Leaving directory `/home/neteler/software/gdal/swig/python' make[1]: *** [build] Error 2 make[1]: Leaving directory `/home/neteler/software/gdal/swig' make: *** [swig-modules] Error 2
The function there is
void Debug( const char *msg_class, const char *message ) { CPLDebug( msg_class, message ); }
Additionally, I see during compilation:
[neteler@host550 swig]$ make for dir in python php csharp ruby perl java; do (cd $dir; make generate) || exit; done make[1]: Entering directory `/home/neteler/software/gdal/swig/python' swig -Wall -I../include -I../include/python -I../include/python/docs -outdir "osgeo" -I/home/neteler/software/gdal -c++ -python -o extensions/gdal_wrap.cpp gdal.i SWIG:1: Warning(125): Use of the include path to find the input file is deprecated and will not work with ccache. Please include the path when specifying the input file. swig -Wall -I../include -I../include/python -I../include/python/docs -outdir "osgeo" -I/home/neteler/software/gdal -python -o extensions/gdalconst_wrap.c gdalconst.i SWIG:1: Warning(125): Use of the include path to find the input file is deprecated and will not work with ccache. Please include the path when specifying the input file. ...
(maybe worth fixing, too)
System:
uname -a Linux host550 2.6.29.1-server-4mnb #1 SMP Mon Apr 20 17:17:54 EDT 2009 x86_64 Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GNU/Linux gcc --version gcc (GCC) 4.3.2 SWIG Version 1.3.38
Change History (2)
comment:1 by , 15 years ago
Summary: | swig extension compile error with → swig extension compile error with "format not a string literal and no format arguments" |
---|
comment:2 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Waou. We create the same bug at the same time. Closed as a duplicate of #2974