Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler errors when trying to install gem with Ruby 1.9.x and gdal 1.11 #4

Closed
timwaters opened this issue Aug 3, 2014 · 14 comments
Closed

Comments

@timwaters
Copy link

I get a number of compiler errors when trying to install the gem. They all seem to be related to one thing though:

-Werror=format-security

I am using this with a new Ubuntu LTS 14 Trusty install

Using Ruby 1.9.1 (ruby 1.9.3p484 )

installed libgdal-ruby from ubuntugis-unstable repository

gdal-config --version
1.11.0

(note, on a 12.04 ubuntu + rvm 1.9.3. gem was installed - using gdal 1.10.0)

Many thanks in advance for your help!

The gem_make.out file.

/var/lib/gems/1.9.1/gems/gdal-0.0.5/ext/gdal-ruby/ogr/gem_make.out
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lgdal... yes
creating Makefile

make
compiling ogr.cpp
In file included from /usr/include/gdal/cpl_progress.h:33:0,
                 from /usr/include/gdal/ogr_api.h:43,
                 from ogr.cpp:1869:
/usr/include/gdal/cpl_port.h:349:0: warning: "STRCASECMP" redefined [enabled by default]
 #    define STRCASECMP(a,b)         (strcasecmp(a,b))
 ^
In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
                 from ogr.cpp:856:
/usr/include/ruby-1.9.1/ruby/ruby.h:1466:0: note: this is the location of the previous definition
 #define STRCASECMP(s1, s2) (st_strcasecmp((s1), (s2)))
 ^
In file included from /usr/include/gdal/cpl_progress.h:33:0,
                 from /usr/include/gdal/ogr_api.h:43,
                 from ogr.cpp:1869:
/usr/include/gdal/cpl_port.h:350:0: warning: "STRNCASECMP" redefined [enabled by default]
 #    define STRNCASECMP(a,b,n)      (strncasecmp(a,b,n))
 ^
In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
                 from ogr.cpp:856:
/usr/include/ruby-1.9.1/ruby/ruby.h:1467:0: note: this is the location of the previous definition
 #define STRNCASECMP(s1, s2, n) (st_strncasecmp((s1), (s2), (n)))
 ^
ogr.cpp: In function ‘void SWIG_Ruby_define_class(swig_type_info*)’:
ogr.cpp:1517:9: warning: variable ‘klass’ set but not used [-Wunused-but-set-variable]
   VALUE klass;
         ^
ogr.cpp: In function ‘VALUE SWIG_AUX_NUM2DBL(VALUE*)’:
ogr.cpp:2245:9: warning: unused variable ‘type’ [-Wunused-variable]
   VALUE type = TYPE(obj);
         ^
ogr.cpp: In function ‘void OGRLayerShadow_each(OGRLayerShadow*)’:
ogr.cpp:2375:66: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    while (feature = (OGRFeatureShadow*) OGR_L_GetNextFeature(self))
                                                                  ^
ogr.cpp: In function ‘VALUE _wrap_Driver_create_data_source(int, VALUE*, VALUE)’:
ogr.cpp:3339:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:3339:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3339:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3337:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Driver_copy_data_source(int, VALUE*, VALUE)’:
ogr.cpp:3435:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:3435:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3435:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3435:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3433:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Driver_open(int, VALUE*, VALUE)’:
ogr.cpp:3535:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:3535:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3535:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:3533:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_DataSource_delete_layer(int, VALUE*, VALUE)’:
ogr.cpp:4267:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_DataSource_sync_to_disk(int, VALUE*, VALUE)’:
ogr.cpp:4330:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_DataSource_create_layer(int, VALUE*, VALUE)’:
ogr.cpp:4371:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:4371:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4371:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4371:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4371:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4369:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_DataSource_copy_layer(int, VALUE*, VALUE)’:
ogr.cpp:4485:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:4485:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4485:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4485:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4483:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_DataSource_execute_sql(int, VALUE*, VALUE)’:
ogr.cpp:4663:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:4663:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4663:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4663:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:4661:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Layer_set_attribute_filter(int, VALUE*, VALUE)’:
ogr.cpp:5155:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_set_next_by_index(int, VALUE*, VALUE)’:
ogr.cpp:5604:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_set_feature(int, VALUE*, VALUE)’:
ogr.cpp:5680:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_create_feature(int, VALUE*, VALUE)’:
ogr.cpp:5756:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_delete_feature(int, VALUE*, VALUE)’:
ogr.cpp:5827:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_sync_to_disk(int, VALUE*, VALUE)’:
ogr.cpp:5890:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_get_feature_count(int, VALUE*, VALUE)’:
ogr.cpp:5977:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:5977:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:5975:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Layer_get_extent(int, VALUE*, VALUE)’:
ogr.cpp:6045:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:6045:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:6091:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp:6043:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Layer_create_field(int, VALUE*, VALUE)’:
ogr.cpp:6210:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:6210:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:6210:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:6262:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp:6208:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Layer_delete_field(int, VALUE*, VALUE)’:
ogr.cpp:6333:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_reorder_field(int, VALUE*, VALUE)’:
ogr.cpp:6412:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_reorder_fields(int, VALUE*, VALUE)’:
ogr.cpp:6496:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_alter_field_defn(int, VALUE*, VALUE)’:
ogr.cpp:6600:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_start_transaction(int, VALUE*, VALUE)’:
ogr.cpp:6663:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_commit_transaction(int, VALUE*, VALUE)’:
ogr.cpp:6726:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_rollback_transaction(int, VALUE*, VALUE)’:
ogr.cpp:6789:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Layer_set_ignored_fields(int, VALUE*, VALUE)’:
ogr.cpp:6972:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_new_Feature(int, VALUE*, VALUE)’:
ogr.cpp:7097:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:7095:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Feature_set_geometry(int, VALUE*, VALUE)’:
ogr.cpp:7250:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Feature_set_geometry_directly(int, VALUE*, VALUE)’:
ogr.cpp:7319:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Feature_set_fid(int, VALUE*, VALUE)’:
ogr.cpp:8931:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Feature_set_from(int, VALUE*, VALUE)’:
ogr.cpp:10285:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:10285:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:10285:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:10337:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp:10283:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Feature_set_from_with_map(int, VALUE*, VALUE)’:
ogr.cpp:10442:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_new_FeatureDefn(int, VALUE*, VALUE)’:
ogr.cpp:10861:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:10859:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_new_FieldDefn(int, VALUE*, VALUE)’:
ogr.cpp:11639:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:11639:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:11637:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_create_geometry_from_wkb(int, VALUE*, VALUE)’:
ogr.cpp:12542:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:12542:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12540:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_create_geometry_from_wkt(int, VALUE*, VALUE)’:
ogr.cpp:12608:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:12608:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12606:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_build_polygon_from_edges(int, VALUE*, VALUE)’:
ogr.cpp:12794:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:12794:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12794:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12794:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12792:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_approximate_arc_angles(int, VALUE*, VALUE)’:
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12898:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:12896:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_new_Geometry(int, VALUE*, VALUE)’:
ogr.cpp:13254:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:13254:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13254:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13254:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13252:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_export_to_wkt(int, VALUE*, VALUE)’:
ogr.cpp:13374:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_export_to_wkb(int, VALUE*, VALUE)’:
ogr.cpp:13434:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:13434:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13480:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp:13432:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_add_point(int, VALUE*, VALUE)’:
ogr.cpp:13708:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:13708:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13708:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13708:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:13706:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_add_geometry_directly(int, VALUE*, VALUE)’:
ogr.cpp:13887:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_add_geometry(int, VALUE*, VALUE)’:
ogr.cpp:13963:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_get_x(int, VALUE*, VALUE)’:
ogr.cpp:14368:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:14368:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14366:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_get_y(int, VALUE*, VALUE)’:
ogr.cpp:14434:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:14434:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14432:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_get_z(int, VALUE*, VALUE)’:
ogr.cpp:14500:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:14500:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14498:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_set_point(int, VALUE*, VALUE)’:
ogr.cpp:14788:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:14788:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14788:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14788:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14788:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14786:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_set_point_2d(int, VALUE*, VALUE)’:
ogr.cpp:14872:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:14872:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14872:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14872:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:14870:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_buffer(int, VALUE*, VALUE)’:
ogr.cpp:15288:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:15288:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:15288:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:15286:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_transform_to(int, VALUE*, VALUE)’:
ogr.cpp:16772:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_Geometry_transform(int, VALUE*, VALUE)’:
ogr.cpp:16848:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_set_generate_db2_v72_byte_order(int, VALUE*, VALUE)’:
ogr.cpp:17680:56: error: format not a string literal and no format arguments [-Werror=format-security]
       rb_raise(rb_eRuntimeError, OGRErrMessages(result));
                                                        ^
ogr.cpp: In function ‘VALUE _wrap_open(int, VALUE*, VALUE)’:
ogr.cpp:17909:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:17909:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:17907:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
ogr.cpp: In function ‘VALUE _wrap_open_shared(int, VALUE*, VALUE)’:
ogr.cpp:17978:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   };
   ^
ogr.cpp:17978:3: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
ogr.cpp:17976:9: warning: unused variable ‘kwnames’ [-Wunused-variable]
   char *kwnames[] = {
         ^
cc1plus: some warnings being treated as errors
make: *** [ogr.o] Error 1
@timwaters
Copy link
Author

Seems to be a platform compiler thing:
https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wformat_-Wformat-security

Note: -Werror=format-security is turned on by default in 13.04 and later releases of Ubuntu.

@zhm
Copy link
Owner

zhm commented Aug 4, 2014

Thanks for reporting this. It looks like the problem is coming from the SWIG-generated ruby bindings. You can see here that the SWIG bindings are generating code that violates that compiler flag. I might be able to override the compiler flag to get it to work until an upstream fix is pushed. Have you tried building the bindings on their own from the GDAL sources?

@zhm
Copy link
Owner

zhm commented Aug 4, 2014

I was able to get it to build by editing the global ruby compiler flags. As a test, you can do the following:

Find your rbconfig.rb file, this is located in a different place depending how you installed ruby. I just installed it from a package manager in my test VM.

find / -iname "rbconfig.rb"

Edit that file and remove -Werror=format-security from CFLAGS and CXXFLAGS. Now try installing the gem and it should work.

I'm having trouble overriding CXXFLAGS in the makefile config. I can override CFLAGS, but not CXXFLAGS. This gem compiles as C++ so we need to override CXXFLAGS. I'm not sure how to accomplish this in the extconf.rb file.

I'm guessing that either 1.) this code is currently broken in the GDAL distribution under this configuration, or 2.) When this code is compiled normally from the GDAL distribution, they're overriding this flag. Conceptually, what needs to happen is that flag should be removed when compiling the code, so either it's done globally in the rbconfig.rb file, or done somehow in the extconf.rb file in this repo. A patch would be welcome :)

@timwaters
Copy link
Author

I also tried overriding the cfflags - I was able to do so, but it didnt seem to make any difference. I was able to print out the cfflags, and they were not present in the mkkf.log file. Anyhow,

I changed the statements like:

rb_raise(rb_eRuntimeError, OGRErrMessages(result));

to

rb_raise(rb_eRuntimeError, "$1", OGRErrMessages(result));

and it was able to compile timwaters@a7cc8c0

I will try the rbconfig version now.

@timwaters
Copy link
Author

Yes, can confirm editing rbconfig.rb worked for me. Thanks!

(I tried changing CXXFLAGS like for CFLAGS but it seemed as if CXXFLAGS does not exist)

@goldhoorn
Copy link

I successfully used this version from timewater
timwaters@a7cc8c0

Could you create a pull-request out of this..?!

@timwaters
Copy link
Author

Well those changes made it compile, but I have not tested it - I'm rubbish at C++/C so I wouldn't rely on them

@zhm
Copy link
Owner

zhm commented Feb 9, 2015

Sorry this took so long to get fixed. I made a change in 5385274 that makes it work on Ubuntu 14.04 without needing to patch the sources or the ruby config. A proper fix should be done upstream in GDAL (and possible it is already). Until I get time to update the binding code from upstream, this fix will have to do.

@zhm zhm closed this as completed Feb 9, 2015
@timwaters
Copy link
Author

hmm, so I got an error installing this on 12.04 (in 14.04 it installed fine)

extconf.rb:16:in `<main>': undefined method `<<' for nil:NilClass (NoMethodError)

on the CXXFLAGS line

with ruby-1.9.3-p547

I note this comment in this file which may hint at it.
https://github.com/Hanmac/rwx/blob/master/ext/extconf.rb#L45

@zhm zhm reopened this Mar 30, 2015
@zhm
Copy link
Owner

zhm commented Apr 4, 2015

Can you try version 0.0.7?

@zhm
Copy link
Owner

zhm commented Apr 9, 2015

This should be resolved now with 1.0.0.

@zhm zhm closed this as completed Apr 9, 2015
@timwaters
Copy link
Author

👍

@dolorierp
Copy link

Thank you

@allthesignals
Copy link

I'm seeing this now too:

Full Error

Fetching gdal 1.0.0
Installing gdal 1.0.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/mgardner/.rvm/gems/ruby-2.4.0@rails4/gems/gdal-1.0.0/ext/gdal-ruby/gdal

/Users/mgardner/.rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20180722-30299-1gurz41.rb extconf.rb
checking for -lgdal... yes
creating Makefile

current directory: /Users/mgardner/.rvm/gems/ruby-2.4.0@rails4/gems/gdal-1.0.0/ext/gdal-ruby/gdal
make "DESTDIR=" clean

current directory: /Users/mgardner/.rvm/gems/ruby-2.4.0@rails4/gems/gdal-1.0.0/ext/gdal-ruby/gdal
make "DESTDIR="
compiling gdal.cpp
In file included from gdal.cpp:1860:
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:615:13: warning: 'STRCASECMP' macro redefined [-Wmacro-redefined]

define STRCASECMP(a,b) (strcasecmp(a,b))

        ^

/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:2129:9: note: previous definition is here
#define STRCASECMP(s1, s2) (st_locale_insensitive_strcasecmp((s1), (s2)))
^
In file included from gdal.cpp:1860:
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:617:13: warning: 'STRNCASECMP' macro redefined [-Wmacro-redefined]

define STRNCASECMP(a,b,n) (strncasecmp(a,b,n))

        ^

/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:2130:9: note: previous definition is here
#define STRNCASECMP(s1, s2, n) (st_locale_insensitive_strncasecmp((s1), (s2), (n)))
^
In file included from gdal.cpp:1860:
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:665:49: error: no member named 'finite' in namespace 'std'; did you mean simply 'finite'?
static inline int CPLIsFinite(float f) { return std::isfinite(f); }
^~~~~
/usr/include/math.h:757:12: note: 'finite' declared here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
In file included from gdal.cpp:1860:
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:666:50: error: no member named 'finite' in namespace 'std'; did you mean simply 'finite'?
static inline int CPLIsFinite(double f) { return std::isfinite(f); }
^~~~~
/usr/include/math.h:757:12: note: 'finite' declared here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
gdal.cpp:1911:41: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
nChildCount = RARRAY_LEN(rubyArray) - 2;
~ ~~~~~~~~~~~~~~~~~~~~~~^~~
gdal.cpp:3045:18: warning: 'GDALGetRasterHistogram' is deprecated: Use GDALGetRasterHistogramEx() instead [-Wdeprecated-declarations]
CPLErr err = GDALGetRasterHistogram( self, min, max, buckets, panHistogram,
^
/usr/local/Cellar/gdal2/2.2.3/include/gdal.h:799:63: note: 'GDALGetRasterHistogram' has been explicitly marked deprecated here
void * pProgressData ) CPL_WARN_DEPRECATED("Use GDALGetRasterHistogramEx() instead");
^
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:1096:74: note: expanded from macro 'CPL_WARN_DEPRECATED'
#define CPL_WARN_DEPRECATED(x) attribute ((deprecated(x)))
^
gdal.cpp:3051:12: warning: 'GDALGetDefaultHistogram' is deprecated: Use GDALGetDefaultHistogramEx() instead [-Wdeprecated-declarations]
return GDALGetDefaultHistogram( self, min_ret, max_ret, buckets_ret,
^
/usr/local/Cellar/gdal2/2.2.3/include/gdal.h:811:63: note: 'GDALGetDefaultHistogram' has been explicitly marked deprecated here
void * pProgressData ) CPL_WARN_DEPRECATED("Use GDALGetDefaultHistogramEx() instead");
^
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:1096:74: note: expanded from macro 'CPL_WARN_DEPRECATED'
#define CPL_WARN_DEPRECATED(x) attribute ((deprecated(x)))
^
gdal.cpp:3056:12: warning: 'GDALSetDefaultHistogram' is deprecated: Use GDALSetDefaultHistogramEx() instead [-Wdeprecated-declarations]
return GDALSetDefaultHistogram( self, min, max,
^
/usr/local/Cellar/gdal2/2.2.3/include/gdal.h:820:74: note: 'GDALSetDefaultHistogram' has been explicitly marked deprecated here
int nBuckets, int *panHistogram ) CPL_WARN_DEPRECATED("Use GDALSetDefaultHistogramEx() instead");
^
/usr/local/Cellar/gdal2/2.2.3/include/cpl_port.h:1096:74: note: expanded from macro 'CPL_WARN_DEPRECATED'
#define CPL_WARN_DEPRECATED(x) attribute ((deprecated(x)))
^
gdal.cpp:4118:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:5053:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[0]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:5584:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:5633:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[5]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:5701:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:5739:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[3]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:8603:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
arg1 = RARRAY_LEN(argv[0]);
~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:9344:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int seq_size = RARRAY_LEN(argv[0]);
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:9407:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:9436:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
arg3 = RARRAY_LEN(argv[1]);
~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:9692:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
arg2 = RARRAY_LEN(argv[0]);
~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:9806:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:9833:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[1]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:10021:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:10090:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
arg11 = RARRAY_LEN(argv[8]);
~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:10207:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:10275:15: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
arg11 = RARRAY_LEN(argv[7]);
~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:11089:16: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[0]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:11899:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:12205:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:12360:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:12949:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:13076:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:13370:16: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[0]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:13436:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:14920:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:14998:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15120:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15377:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15403:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[2]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:15503:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15524:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
arg2 = RARRAY_LEN(argv[1]);
~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:15574:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[7]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:15680:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15716:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[4]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:15810:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15846:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[4]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:15938:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:15981:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[5]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:16075:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:16176:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:16297:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:16552:16: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[2]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:16636:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int seq_size = RARRAY_LEN(argv[1]);
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:16977:15: warning: unused variable 'kwnames' [-Wunused-variable]
const char *kwnames[] = {
^
gdal.cpp:17032:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[5]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:17121:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int seq_size = RARRAY_LEN(argv[0]);
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:17209:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int seq_size = RARRAY_LEN(argv[0]);
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:18255:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[1]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
gdal.cpp:18320:16: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int size = RARRAY_LEN(argv[0]);
~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mgardner/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:1022:23: note: expanded from macro 'RARRAY_LEN'
#define RARRAY_LEN(a) rb_array_len(a)
^~~~~~~~~~~~~~~
56 warnings and 2 errors generated.
make: *** [gdal.o] Error 1

make failed, exit code 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants