SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm running Slackware 13. Trying to install qgis from SlackBuilds. It needs geos, so installing geos also from SlackBuilds. Making the geos package stalls with an error relating to swig ruby bindings. I have ruby and swig installed already. Any ideas what might be wrong?
Here is the error message.
Thanks,
Don
geos_wrap.cxx:856:18: error: ruby.h: No such file or directory
geos_wrap.cxx:994: error: 'VALUE' does not name a type
geos_wrap.cxx:1009: error: 'VALUE' does not name a type
geos_wrap.cxx:1020: error: 'VALUE' does not name a type
geos_wrap.cxx:1032: error: 'VALUE' does not name a type
geos_wrap.cxx:1093: error: 'VALUE' has not been declared
geos_wrap.cxx: In function 'const char* Ruby_Format_TypeError(const char*, const char*, const char*, int, int)':
geos_wrap.cxx:1096: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1096: error: expected ';' before 'str'
geos_wrap.cxx:1097: error: expected ';' before 'asStr'
geos_wrap.cxx:1100: error: 'str' was not declared in this scope
geos_wrap.cxx:1100: error: 'rb_str_new2' was not declared in this scope
geos_wrap.cxx:1104: error: 'str' was not declared in this scope
geos_wrap.cxx:1104: error: 'rb_str_new' was not declared in this scope
geos_wrap.cxx:1107: error: 'str' was not declared in this scope
geos_wrap.cxx:1107: error: 'rb_str_cat2' was not declared in this scope
geos_wrap.cxx:1108: error: 'sprintf' was not declared in this scope
geos_wrap.cxx:1112: error: 'rb_obj_classname' was not declared in this scope
geos_wrap.cxx:1114: error: 'asStr' was not declared in this scope
geos_wrap.cxx:1114: error: 'rb_inspect' was not declared in this scope
geos_wrap.cxx:1115: error: 'RSTRING' was not declared in this scope
geos_wrap.cxx:1117: error: 'TYPE' was not declared in this scope
geos_wrap.cxx:1117: error: 'T_STRING' was not declared in this scope
geos_wrap.cxx:1117: error: ISO C++ forbids declaration of 'type name' with no type
geos_wrap.cxx:1117: error: ISO C++ forbids declaration of 'type name' with no type
geos_wrap.cxx:1117: error: expected primary-expression before 'volatile'
geos_wrap.cxx:1117: error: expected ')' before 'volatile'
geos_wrap.cxx:1117: error: expected ')' before ';' token
geos_wrap.cxx:1117: error: expected ')' before ';' token
geos_wrap.cxx:1122: error: 'rb_str_append' was not declared in this scope
geos_wrap.cxx:1132: error: 'TYPE' was not declared in this scope
geos_wrap.cxx:1132: error: 'T_STRING' was not declared in this scope
geos_wrap.cxx:1132: error: ISO C++ forbids declaration of 'type name' with no type
geos_wrap.cxx:1132: error: ISO C++ forbids declaration of 'type name' with no type
geos_wrap.cxx:1132: error: expected primary-expression before 'volatile'
geos_wrap.cxx:1132: error: expected ')' before 'volatile'
geos_wrap.cxx:1132: error: expected ')' before ';' token
geos_wrap.cxx:1132: error: expected ')' before ';' token
geos_wrap.cxx: In function 'void Ruby_Format_OverloadedError(int, int, const char*, const char*)':
geos_wrap.cxx:1146: error: 'rb_eArgError' was not declared in this scope
geos_wrap.cxx:1148: error: 'rb_raise' was not declared in this scope
geos_wrap.cxx: At global scope:
geos_wrap.cxx:1182: error: 'VALUE' does not name a type
geos_wrap.cxx:1186: error: 'ID' does not name a type
geos_wrap.cxx: In function 'void SWIG_RubyInitializeTrackings()':
geos_wrap.cxx:1199: error: 'ID' was not declared in this scope
geos_wrap.cxx:1199: error: expected ';' before 'trackings_id'
geos_wrap.cxx:1200: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1200: error: expected ';' before 'verbose'
geos_wrap.cxx:1201: error: 'Qfalse' was not declared in this scope
geos_wrap.cxx:1201: error: 'rb_gv_set' was not declared in this scope
geos_wrap.cxx:1202: error: 'swig_ruby_trackings' was not declared in this scope
geos_wrap.cxx:1202: error: '_mSWIG' was not declared in this scope
geos_wrap.cxx:1202: error: 'trackings_id' was not declared in this scope
geos_wrap.cxx:1202: error: 'rb_ivar_get' was not declared in this scope
geos_wrap.cxx:1203: error: 'verbose' was not declared in this scope
geos_wrap.cxx:1206: error: 'Qnil' was not declared in this scope
geos_wrap.cxx:1208: error: 'rb_hash_new' was not declared in this scope
geos_wrap.cxx:1209: error: 'rb_ivar_set' was not declared in this scope
geos_wrap.cxx:1214: error: 'swig_ruby_hash_delete' was not declared in this scope
geos_wrap.cxx:1214: error: 'rb_intern' was not declared in this scope
geos_wrap.cxx: At global scope:
geos_wrap.cxx:1218: error: 'VALUE' does not name a type
geos_wrap.cxx:1228: error: 'VALUE' does not name a type
geos_wrap.cxx:1238: error: 'VALUE' does not name a type
geos_wrap.cxx:1247: error: 'VALUE' has not been declared
geos_wrap.cxx: In function 'void SWIG_RubyAddTracking(void*, int)':
geos_wrap.cxx:1256: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1256: error: expected ';' before 'key'
geos_wrap.cxx:1259: error: expected ';' before 'value'
geos_wrap.cxx:1262: error: 'swig_ruby_trackings' was not declared in this scope
geos_wrap.cxx:1262: error: 'key' was not declared in this scope
geos_wrap.cxx:1262: error: 'value' was not declared in this scope
geos_wrap.cxx:1262: error: 'rb_hash_aset' was not declared in this scope
geos_wrap.cxx: At global scope:
geos_wrap.cxx:1266: error: 'VALUE' does not name a type
geos_wrap.cxx: In function 'void SWIG_RubyRemoveTracking(void*)':
geos_wrap.cxx:1289: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1289: error: expected ';' before 'key'
geos_wrap.cxx:1293: error: 'swig_ruby_trackings' was not declared in this scope
geos_wrap.cxx:1293: error: 'swig_ruby_hash_delete' was not declared in this scope
geos_wrap.cxx:1293: error: 'key' was not declared in this scope
geos_wrap.cxx:1293: error: 'rb_funcall' was not declared in this scope
geos_wrap.cxx: In function 'void SWIG_RubyUnlinkObjects(void*)':
geos_wrap.cxx:1300: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1300: error: expected ';' before 'object'
geos_wrap.cxx:1302: error: 'object' was not declared in this scope
geos_wrap.cxx:1302: error: 'Qnil' was not declared in this scope
geos_wrap.cxx:1303: error: 'DATA_PTR' was not declared in this scope
geos_wrap.cxx: At global scope:
geos_wrap.cxx:1320: error: 'VALUE' does not name a type
geos_wrap.cxx:1337: error: expected constructor, destructor, or type conversion before 'void'
geos_wrap.cxx:1419: error: 'VALUE' does not name a type
geos_wrap.cxx:1420: error: 'VALUE' does not name a type
geos_wrap.cxx:1428: error: 'VALUE' does not name a type
geos_wrap.cxx:1429: error: 'VALUE' does not name a type
geos_wrap.cxx:1432: error: 'ID' does not name a type
geos_wrap.cxx:1433: error: 'ID' does not name a type
geos_wrap.cxx:1465: error: 'VALUE' does not name a type
geos_wrap.cxx:1480: error: 'VALUE' does not name a type
geos_wrap.cxx: In function 'void SWIG_Ruby_InitRuntime()':
geos_wrap.cxx:1494: error: '_mSWIG' was not declared in this scope
geos_wrap.cxx:1494: error: 'Qnil' was not declared in this scope
geos_wrap.cxx:1495: error: 'rb_define_module' was not declared in this scope
geos_wrap.cxx:1496: error: 'swig_call_id' was not declared in this scope
geos_wrap.cxx:1496: error: 'rb_intern' was not declared in this scope
geos_wrap.cxx:1497: error: 'swig_arity_id' was not declared in this scope
geos_wrap.cxx: In function 'void SWIG_Ruby_define_class(swig_type_info*)':
geos_wrap.cxx:1505: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1505: error: expected ';' before 'klass'
geos_wrap.cxx:1506: error: 'malloc' was not declared in this scope
geos_wrap.cxx:1507: error: 'sprintf' was not declared in this scope
geos_wrap.cxx:1508: error: '_cSWIG_Pointer' was not declared in this scope
geos_wrap.cxx:1508: error: 'NIL_P' was not declared in this scope
geos_wrap.cxx:1509: error: '_mSWIG' was not declared in this scope
geos_wrap.cxx:1509: error: 'rb_cObject' was not declared in this scope
geos_wrap.cxx:1509: error: 'rb_define_class_under' was not declared in this scope
geos_wrap.cxx:1510: error: 'CLASS_OF' was not declared in this scope
geos_wrap.cxx:1510: error: 'rb_undef_method' was not declared in this scope
geos_wrap.cxx:1512: error: 'klass' was not declared in this scope
geos_wrap.cxx:1512: error: '_mSWIG' was not declared in this scope
geos_wrap.cxx:1512: error: '_cSWIG_Pointer' was not declared in this scope
geos_wrap.cxx:1512: error: 'rb_define_class_under' was not declared in this scope
geos_wrap.cxx:1513: error: 'free' was not declared in this scope
geos_wrap.cxx: At global scope:
geos_wrap.cxx:1517: error: 'VALUE' does not name a type
geos_wrap.cxx:1574: error: 'VALUE' does not name a type
geos_wrap.cxx:1586: error: 'SWIG_Ruby_MangleStr' declared as an 'inline' variable
geos_wrap.cxx:1586: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1587: error: expected ',' or ';' before '{' token
geos_wrap.cxx:1596: error: 'VALUE' was not declared in this scope
geos_wrap.cxx:1596: error: expected primary-expression before 'own'
geos_wrap.cxx:1596: error: initializer expression list treated as compound expression
geos_wrap.cxx:1596: error: expected ',' or ';' before '{' token
In file included from /usr/lib/gcc/i486-slackware-linux/4.4.3/../../../../include/c++/4.4.3/stdexcept:38,
from geos_wrap.cxx:1854:
/usr/lib/gcc/i486-slackware-linux/4.4.3/../../../../include/c++/4.4.3/exception:35: error: expected '}' before end of line
/usr/lib/gcc/i486-slackware-linux/4.4.3/../../../../include/c++/4.4.3/exception:35: error: expected declaration before end of line
make[4]: *** [geos_la-geos_wrap.lo] Error 1
make[4]: Leaving directory `/tmp/SBo/geos-3.0.4/swig/ruby'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/SBo/geos-3.0.4/swig/ruby'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/SBo/geos-3.0.4/swig/ruby'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/geos-3.0.4/swig'
make: *** [all-recursive] Error 1
I'm the SBo qgis guy, by a strange coincidence I was trying to recompile geos just now -- mine breaks just like yours, so I was googling to try to find a solution -- and that's how I found your question!
(I would put a really messed-up smiley here, but apparently nobody has yet invented one that expresses how I feel at this exact moment)
Let me guess you're running -current, like me? Looks like there was some sort of change in Ruby that broke things recently, since the last time I built geos on -current (there's various signs of anguish in Pat's changelog).
The good news is that if you delete the line in the geos slackbuild that says
Code:
--enable-ruby \
then geos will build just fine. (Qgis doesn't need Geos with Ruby support, and since you're only just installing Geos, you presumably don't need the Geos Ruby support for anything else either.)
I'm confident that'll fix it a, but I'm rebuilding qgis right now against the replacement and will update you if it croaks
Best regards (and I feel your pain)
-Dave Spencer
ps. don't bother to try the new version of geos (3.2.0) - it breaks exactly the same way as the old one.
Well, according to this Autoconf mailing list post, Ruby 1.8 uses "archdir" but Ruby 1.9 uses "rubyhdrdir". Wow, there's a change that has truly enhanced world peace and prosperity
So that line in the configure script needs to be changed to
I did what you suggested in the last post but this did not cure the problem so did what you suggested in the first post and built without ruby. That worked fine.
which is some SWIG people moaning that Ruby 1.9.1 croaks like this under GCC 4.4.x because it tries some dodgy optimisations. There's a way to disable them: in swig/ruby/geos_wrap.cxx you add "#undef rb_intern" after "#include <ruby.h>".
Does that fix it? Oh dear me no. It brings us to *another* problem:
geos_wrap.cxx: In function 'VALUE _wrap_create_polygon(int, VALUE*, VALUE)':
geos_wrap.cxx:7788: error: 'struct RArray' has no member named 'len'
which suggests changing line 7788 of geos_wrap.cxx from
arg3 = RARRAY(argv[1])->len;
to
arg3 = RARRAY_LEN(argv[1]);
although this is mightily disappointing in view of lines 888 onwards, which read
/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
/* Define these for older versions so we can just write code the new way */
#ifndef RSTRING_LEN
# define RSTRING_LEN(x) RSTRING(x)->len
#endif
#ifndef RSTRING_PTR
# define RSTRING_PTR(x) RSTRING(x)->ptr
#endif
#ifndef RSTRING_END
# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
#endif
#ifndef RARRAY_LEN
# define RARRAY_LEN(x) RARRAY(x)->len
#endif
Nice code there from the geos devs. Actually *using* it would have been helpful, but whatever...
Anyway, doing all that (sheesh!) geos finally builds ok, although frankly I don't know of anything that uses these bindings so who knows whether it actually works or not.
Looks like neither Fedora nor Debian have gone to Ruby 1.9 yet, so we are breaking new ground here. My sincere thanks to all the humble searchers for truth at the web pages I cited. Are there any Ruby fans reading this thread? Until we started on this adventure I had an open mind about Ruby; not now, though
As we agreed earlier, a much easier fix for the geos SlackBuild on -current is to delete --enable-ruby.
Have you been successful with qgis under Slackware 13.1? I have built several of the latest revisions and they build okay, but I have a problem with the way shapefiles are clipped. Have you seen this? I can send you the url to a sample data set and some images, but I'm unable to post it according to the Newbie Rules. ;-)
Thanks,
Jim
On Sun, Jul 11, 2010 at 12:46 AM, Jim Hammack <hammack@gotslack.org> wrote:
> I am using QGIS to display oil spill extents and tropical weather in the
> Gulf of Mexico. I've found that since I moved from 1.4.0 to 1.5.0
> (rev 13903) that the clipping behavior has changed, and not in a good
> way! (This may have happened much earlier than rev 13903, but I
> haven't been keeping up with the latest revisions.)
>
> It seems now that if any portion of a shapefile falls outside the view,
> the entire shapefile is omitted from the display instead of just being
> clipped at the edges of the window.
>
--> stuff deleted
>
> Can anyone confirm that this is the expected behavior? Is there a way
> to configure the project such that clipping is performed as it was in 1.4.0?
>
> Thanks,
> Jim
>
Thanks for the report Jim. I have also read your bug report upstream on the qgis developer mailing list. Hopefully they will take your bug report seriously and will sort it out before 1.5.0 is released.
What version do you have of gdal and geos?
I've left the official SlackBuilds.org version of gdal at 1.6.3 for a specific reason (see my LQ blog for details) and would not recommend 1.7.x at this time.
Kyle Guinn's geos SlackBuild is still at 3.0.4. I don't know of any specific reasons why he has not upversioned it yet, but because 3.0.4 is the official SBo version, that is therefore the version of geos that I stay with and that I test qgis against.
When qgis-1.5.0 is formally released I will test it with the relevant SBo versions of gdal and geos, and if qgis-1.5.0 still has your shapefile clipping bug I will hold the SBo version at 1.4.0.
Thanks for being a beta tester, but for stability you'll need to drop back to the official versions.
I'm using gdal 1.72 and geos 3.1.1. I moved to the new gdal library with qgis 1.4 in order to solve a georeferencing problem between geotiffs and shapefiles in an earlier project. (Shapefiles that should overlay the geotiffs did not.) gdal 1.7.2 solved those issues and I've been using it ever since without any problems. But I guess I'd better read the blog and see what the issues are with 1.7.
I went with geos 3.1.1 at the same time to resolve some dependency issues that I can't really remember right now.
I'm back where I have internet access now, so I'll try rebuilding with the older versions and see what happens.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.