# Problem compiling gtksourceview bindings?

**URL:** <https://www.ruby-forum.com/t/problem-compiling-gtksourceview-bindings/109225>\
**Category:** Ruby-Gnome 2\
**Created:** [July 12, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/problem-compiling-gtksourceview-bindings/109225 "2007-07-12T15:41:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [July 12, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/problem-compiling-gtksourceview-bindings/109225/1 "2007-07-12T15:41:16Z")

</div>

Hi there,  
not sure why but gtksourceview seems to give me slight problems. The  
other ruby-gnome bindings work well, i.e. buttons etc… are all working,  
just not getting ruby-gtksourceview to compile.

Maybe one of you has a hint that can help me.

For the record, I am using latest CVS checkout of ruby-gnome module.

In /usr/lib I have these gktsourceview relevant files:

libgtksourceview-1.0.la libgtksourceview-1.0.so.0  
libgtksourceview-2.0.la libgtksourceview-2.0.so.0  
libgtksourceview-1.0.so libgtksourceview-1.0.so.0.0.0  
libgtksourceview-2.0.so libgtksourceview-2.0.so.0.0.0

In /usr/include I have both gtksourceview-1.0 and gtksourceview-2.0.  
Removing gtksourceview-2.0 from  
/usr/lib and /usr/include does not influence anything.

My Gcc Version is: gcc 4.2.0

Now to the error of the rubygnome binding, running the following in  
gtksourceview/ directory:  
ruby extconf.rb

Results into:

checking for GCC… yes  
checking for rb\_define\_alloc\_func()… yes  
checking for rb\_block\_proc()… yes  
checking for new allocation framework… yes  
checking for attribute assignment… aliayes  
checking for gtksourceview-1.0… no  
\*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.

Here the log of mkmf.log

cat mkmf.log  
“gcc -I. -I/Programs/Ruby/1.8.6/lib/ruby/1.8/i686-linux -I.  
-I/usr/include -O2 -march=i686 -fPIC -c conftest.c”  
checked program was:  
/\* begin _/  
1: /top/  
2: #ifndef **GNUC**  
3: # error  
4: \>\>\>\>\>\> **GNUC** undefined \<\<\<\<\<\<  
5: #endif  
/_ end \*/

have\_func: checking for rb\_define\_alloc\_func()… --------------------  
yes

“gcc -o conftest -I. -I/Programs/Ruby/1.8.6/lib/ruby/1.8/i686-linux -I.  
-I/usr/include -I/Programs/Ruby/1.8.6/lib/ruby/site\_ruby/1.8/i686-linux  
-O2 -march=i686 -fPIC -Wall conftest.c -L’/Programs/Ruby/1.8.6/lib’  
-Wl,-R’/Programs/Ruby/1.8.6/lib’ -rdynamic -Wl,-export-dynamic  
-lruby-static -ldl -lcrypt -lm -lc”  
conftest.c: In function ‘t’:  
conftest.c:3: error: ‘rb\_define\_alloc\_func’ undeclared (first use in  
this function)  
conftest.c:3: error: (Each undeclared identifier is reported only once  
conftest.c:3: error: for each function it appears in.)  
checked program was:  
/\* begin _/  
1: /top/  
2: int main() { return 0; }  
3: int t() { void ((volatile p)()); p = (void  
(()()))rb\_define\_alloc\_func; return 0; }  
/_ end \*/

“gcc -o conftest -I. -I/Programs/Ruby/1.8.6/lib/ruby/1.8/i686-linux -I.  
-I/usr/include -I/Programs/Ruby/1.8.6/lib/ruby/site\_ruby/1.8/i686-linux  
-O2 -march=i686 -fPIC -Wall conftest.c -L’/Programs/Ruby/1.8.6/lib’  
-Wl,-R’/Programs/Ruby/1.8.6/lib’ -rdynamic -Wl,-export-dynamic  
-lruby-static -ldl -lcrypt -lm -lc”  
conftest.c: In function ‘t’:  
conftest.c:3: warning: implicit declaration of function  
‘rb\_define\_alloc\_func’  
checked program was:  
/\* begin _/  
1: /top/  
2: int main() { return 0; }  
3: int t() { rb\_define\_alloc\_func(); return 0; }  
/_ end \*/

* * *

have\_func: checking for rb\_block\_proc()… -------------------- yes

“gcc -o conftest -I. -I/Programs/Ruby/1.8.6/lib/ruby/1.8/i686-linux -I.  
-I/usr/include -I/Programs/Ruby/1.8.6/lib/ruby/site\_ruby/1.8/i686-linux  
-O2 -march=i686 -fPIC -Wall conftest.c -L’/Programs/Ruby/1.8.6/lib’  
-Wl,-R’/Programs/Ruby/1.8.6/lib’ -rdynamic -Wl,-export-dynamic  
-lruby-static -ldl -lcrypt -lm -lc”  
conftest.c: In function ‘t’:  
conftest.c:3: error: ‘rb\_block\_proc’ undeclared (first use in this  
function)  
conftest.c:3: error: (Each undeclared identifier is reported only once  
conftest.c:3: error: for each function it appears in.)  
checked program was:  
/\* begin _/  
1: /top/  
2: int main() { return 0; }  
3: int t() { void ((volatile p)()); p = (void (()()))rb\_block\_proc;  
return 0; }  
/_ end \*/

“gcc -o conftest -I. -I/Programs/Ruby/1.8.6/lib/ruby/1.8/i686-linux -I.  
-I/usr/include -I/Programs/Ruby/1.8.6/lib/ruby/site\_ruby/1.8/i686-linux  
-O2 -march=i686 -fPIC -Wall conftest.c -L’/Programs/Ruby/1.8.6/lib’  
-Wl,-R’/Programs/Ruby/1.8.6/lib’ -rdynamic -Wl,-export-dynamic  
-lruby-static -ldl -lcrypt -lm -lc”  
conftest.c: In function ‘t’:  
conftest.c:3: warning: implicit declaration of function ‘rb\_block\_proc’  
checked program was:  
/\* begin _/  
1: /top/  
2: int main() { return 0; }  
3: int t() { rb\_block\_proc(); return 0; }  
/_ end \*/

* * *

“gcc -I. -I/Programs/Ruby/1.8.6/lib/ruby/1.8/i686-linux -I.  
-I/usr/include -I/Programs/Ruby/1.8.6/lib/ruby/site\_ruby/1.8/i686-linux  
-O2 -march=i686 -fPIC -Wall -c conftest.c”  
checked program was:  
/\* begin _/  
1: #include “ruby.h”  
2: #include “node.h”  
3: int node\_attrasgn = (int)NODE\_ATTRASGN;  
/_ end \*/

=

–  
Powered by Outblaze

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [July 13, 2007, 3:02pm UTC](https://www.ruby-forum.com/t/problem-compiling-gtksourceview-bindings/109225/2 "2007-07-13T15:02:29Z")

</div>

Hi,

On Thu, 12 Jul 2007 14:33:42 +0100  
“Roebe XXX” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> necessary libraries and/or headers. Check the mkmf.log file for more  
> details. You may need configuration options.

You may need to install a dev package of gtksourceview.  
What the result of pkg-config ?

$ pkg-config gtksourceview-1.0 --libs --cflags --modversion

If it returns error messages, check it carefully.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
