-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comments
Seems to be a platform compiler thing:
|
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? |
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 find / -iname "rbconfig.rb" Edit that file and remove I'm having trouble overriding 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 |
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:
to
and it was able to compile timwaters@a7cc8c0 I will try the rbconfig version now. |
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) |
I successfully used this version from timewater Could you create a pull-request out of this..?! |
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 |
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. |
hmm, so I got an error installing this on 12.04 (in 14.04 it installed fine)
on the CXXFLAGS line with ruby-1.9.3-p547 I note this comment in this file which may hint at it. |
Can you try version 0.0.7? |
This should be resolved now with 1.0.0. |
👍 |
Thank you |
I'm seeing this now too: Full ErrorFetching gdal 1.0.0
/Users/mgardner/.rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20180722-30299-1gurz41.rb extconf.rb current directory: /Users/mgardner/.rvm/gems/ruby-2.4.0@rails4/gems/gdal-1.0.0/ext/gdal-ruby/gdal current directory: /Users/mgardner/.rvm/gems/ruby-2.4.0@rails4/gems/gdal-1.0.0/ext/gdal-ruby/gdal 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 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 make failed, exit code 2 |
I get a number of compiler errors when trying to install the gem. They all seem to be related to one thing though:
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.
The text was updated successfully, but these errors were encountered: