LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-30-2010, 02:43 PM   #1
DonaldUK
Member
 
Registered: Apr 2004
Posts: 93

Rep: Reputation: 15
QGIS and geos


Hello,

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
 
Old 01-30-2010, 04:37 PM   #2
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware 13.37
Posts: 137
Blog Entries: 4

Rep: Reputation: 131Reputation: 131
Hi!

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.
 
Old 01-30-2010, 06:24 PM   #3
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware 13.37
Posts: 137
Blog Entries: 4

Rep: Reputation: 131Reputation: 131
*GOT* it.

The geos configure script determines the ruby include directory with

RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts Config::CONFIG["archdir"]'`

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

RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"]'`

Presumably geos isn't the only package affected...
 
Old 01-31-2010, 08:59 AM   #4
DonaldUK
Member
 
Registered: Apr 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Many thanks. Lucky for me you were around.

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.

Thanks again,
Don
 
Old 01-31-2010, 11:09 AM   #5
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware 13.37
Posts: 137
Blog Entries: 4

Rep: Reputation: 131Reputation: 131
Oh glory. You are right, it gets further but crashes to a halt with loads of these:

geos_wrap.cxx:2123:43: warning: invoking macro CONST_ID_CACHE argument 1: empty macro arguments are undefined in ISO C90 and ISO C++98

and these:

geos_wrap.cxx:2101: error: statement-expressions are not allowed outside functions nor in template-argument lists

Googling brings us here

http://sourceforge.net/tracker/index.php?func=detail&aid=2859614&group_id=1645&atid=101645


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'

Well, a bit more googling brings us to

http://jgarber.lighthouseapp.com/pro...be-rarray_lenx

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.
 
Old 07-16-2010, 09:21 AM   #6
hammack
LQ Newbie
 
Registered: Jul 2010
Location: Huntsville, AL USA
Distribution: Slackware 13.1 32-bit
Posts: 7

Rep: Reputation: 1
All,

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
>
 
Old 07-16-2010, 09:51 AM   #7
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 13.37 & Slackware64_13.37
Posts: 1,099
Blog Entries: 28

Rep: Reputation: 112Reputation: 112
That clipping behavior is a massive bug if it can be confirmed.

I'm using QGIS 1.4 on Slackware64_13 and I'm not seeing this problem. I'm using the clip tool that came with the fTools plugin.

Is there another way to clip?

Regards,
 
Old 07-16-2010, 01:01 PM   #8
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware 13.37
Posts: 137
Blog Entries: 4

Rep: Reputation: 131Reputation: 131
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.
 
Old 07-19-2010, 11:47 AM   #9
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 13.37 & Slackware64_13.37
Posts: 1,099
Blog Entries: 28

Rep: Reputation: 112Reputation: 112
Quick related question:

What is the difference between clipping polygons with GEOS and doing the same task with fTools?

Regards,
 
Old 07-22-2010, 11:12 AM   #10
hammack
LQ Newbie
 
Registered: Jul 2010
Location: Huntsville, AL USA
Distribution: Slackware 13.1 32-bit
Posts: 7

Rep: Reputation: 1
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.

Thanks,
Jim
 
Old 07-22-2010, 02:41 PM   #11
hammack
LQ Newbie
 
Registered: Jul 2010
Location: Huntsville, AL USA
Distribution: Slackware 13.1 32-bit
Posts: 7

Rep: Reputation: 1
clipping problem resolved

I rebuilt QGIS 1.5 with geos 3.0.4 and now everything works properly. (Changing to gdal 1.6.3 had no effect.)

Thanks for the help.
 
  


Reply

Tags
ruby


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any advice for building QGIS for Slackware 12.1? Lufbery Slackware 13 08-10-2008 07:43 PM
installed the qgis package but - I can't find it in the KDE menu Greebstreebling Debian 1 05-01-2008 01:29 PM
HAving dependency problems in installing QGIS on Fedora Core 1 linux_accd Linux - Newbie 1 09-19-2005 07:27 AM
Installing QGIS 0.6 on Fedora Core1 linux_accd Linux - Software 0 09-19-2005 06:03 AM
Grass and qGIS problem (version 6.0 on suse 9.2) oldforce Linux - Software 0 03-31-2005 02:26 AM


All times are GMT -5. The time now is 09:59 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration