FXRuby on Solaris 9

Well, I obviously picked a bad week to quit sniffing glue. I had modified
the wrong intern.h file!

Once I did that, I got further, but am now stuck with this:

opengl_wrap.cpp: In function VALUE FXGLViewer_readPixels(FXGLViewer*, int, int, int, int)': opengl_wrap.cpp:677: alloca’ undeclared (first use this function)
opengl_wrap.cpp:677: (Each undeclared identifier is reported only once
for each function it appears in.)
gmake: *** [opengl_wrap.o] Error 1
setup failed
‘system gmake’ failed
try ‘ruby install.rb --help’ for usage

I didn’t see this one mentioned in the docs

Regards,

Dan

···

-----Original Message-----
From: ts [mailto:decoux@moulon.inra.fr]

But, it still doesn’t work. :frowning:

Have you tried to change the declarations in

/opt/sfw/lib/ruby/1.6/sparc-solaris2.9/intern.h

void rb_thread_wait_for(struct timeval);
void rb_gc_mark(VALUE);

opengl_wrap.cpp: In function `VALUE FXGLViewer_readPixels(FXGLViewer*, int,
int, int, int)':
opengl_wrap.cpp:677: `alloca' undeclared (first use this function)
opengl_wrap.cpp:677: (Each undeclared identifier is reported only once
for each function it appears in.)

Strange, this is a 2.8

g++ -fPIC -g -O2 -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/sparc-solaris2.8 -I/usr/home/msys/decoux/ruby/FXRuby-1.0.12/ext/fox -I/usr/local/include -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/home/msys/decoux/local/fox/include/fox -I/usr/local/include -c -o opengl_wrap.o opengl_wrap.cpp

g++ -fPIC -g -O2 -O0 -Iinclude -I. -I/usr/local/lib/ruby/1.6/sparc-solaris2.8 -I/usr/home/msys/decoux/ruby/FXRuby-1.0.12/ext/fox -I/usr/local/include -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/home/msys/decoux/local/fox/include/fox -I/usr/local/include -c -o ui_wrap.o ui_wrap.cpp

Do you have ?

nasun% locate alloca.h
/usr/include/alloca.h
nasun%

Normally it's included by ruby.h

if defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
#include <alloca.h>
#endif

Guy Decoux

Berger, Daniel wrote:

Well, I obviously picked a bad week to quit sniffing glue. I had modified
the wrong intern.h file!

A good “Airplane” quote always helps to lift one’s spirits :wink:

Once I did that, I got further, but am now stuck with this:

opengl_wrap.cpp: In function VALUE FXGLViewer_readPixels(FXGLViewer*, int, int, int, int)': opengl_wrap.cpp:677: alloca’ undeclared (first use this function)
opengl_wrap.cpp:677: (Each undeclared identifier is reported only once
for each function it appears in.)
gmake: *** [opengl_wrap.o] Error 1
setup failed
‘system gmake’ failed
try ‘ruby install.rb --help’ for usage

I didn’t see this one mentioned in the docs

No, that’s a new one for me too. That line of opengl_wrap.cpp is making
use of the macro ALLOCA_N which is defined in “ruby.h”, but the macro
just turns around and calls the alloca() function (a semi-standard C
library function). And for some reason it hasn’t seen a declaration of
alloca() by that point in the compilation.

Let’s see, what would be good to know…

When it’s compiling this file (opengl_wrap.cpp) do you see
“-DHAVE_ALLOCA_H” in the compiler flags?