kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Proplems building on Ubuntu 12.10 server 64bit
@ 2012-11-21 22:28 stuart
  2012-11-21 23:14 ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: stuart @ 2012-11-21 22:28 UTC (permalink / raw)
  To: kgio

Hi, 

I'm having trouble building kgio 2.7.4 on Ubuntu 12.10 x86_64 with JRuby installed by RVM 

It appears that tryopen.c needs #include <errno.h> otherwise I get the error build log below.

Is this a problem for anyone else, or just on my system?

Thanks, 
Stuart 

This is the build log: 

/home/stuart/.rvm/rubies/jruby-1.7.0/bin/jruby extconf.rb 
/home/stuart/.rvm/rubies/jruby-1.7.0/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config. 
checking for CLOCK_MONOTONIC in time.h... yes 
checking for clockid_t in time.h... yes 
checking for clock_gettime() in -lrt... yes 
checking for t_open() in -lnsl... no 
checking for socket() in -lsocket... no 
checking for poll() in poll.h... checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... yes 
checking for getnameinfo() in sys/types.h,sys/socket.h,netdb.h... yes 
checking for struct sockaddr_storage in sys/types.h,sys/socket.h... yes 
checking for accept4() in sys/socket.h... yes 
checking for sys/select.h... yes 
checking for ruby/io.h... no 
checking for OpenFile in ruby.h,rubyio.h... yes 
checking for OpenFile.f in ruby.h,rubyio.h... yes 
checking for OpenFile.f2 in ruby.h,rubyio.h... no 
checking for OpenFile.mode in ruby.h,rubyio.h... yes 
checking for OpenFile.path in ruby.h,rubyio.h... no 
checking for rb_fdopen()... no 
checking for struct RFile in ruby.h,rubyio.h... no 
checking for struct RObject... no 
checking size of int... 4 
checking for rb_io_ascii8bit_binmode()... no 
checking for rb_update_max_fd()... no 
checking for rb_fd_fix_cloexec()... no 
checking for rb_cloexec_open()... no 
checking for rb_thread_blocking_region()... checking for rb_thread_io_blocking_region()... no 
checking for rb_str_set_len()... checking for rb_time_interval()... no 
checking for rb_wait_for_single_fd()... no 
checking for struct RFile in ruby.h,rubyio.h... no 
checking for struct RObject... no 
checking size of int... 4 
checking for rb_io_ascii8bit_binmode()... no 
checking for rb_update_max_fd()... no 
checking for rb_fd_fix_cloexec()... no 
checking for rb_cloexec_open()... no 
checking for rb_thread_blocking_region()... checking for rb_thread_io_blocking_region()... no 
checking for rb_str_set_len()... checking for rb_time_interval()... no 
checking for rb_wait_for_single_fd()... no 
creating Makefile 


make 
cc -I. -I. -I/home/stuart/.rvm/rubies/jruby-1.7.0/lib/native/include/ruby -I. -DHAVE_TYPE_CLOCKID_T -DHAVE_POLL -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DHAVE_TYPE_STRUCT_SOCKADDR_STORAGE -DHAVE_ACCEPT4 -DHAVE_SYS_SELECT_H -DHAVE_TYPE_OPENFILE -DHAVE_ST__ -DHAVE_ST_MODE -DSIZEOF_INT=4 -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_STR_SET_LEN -D_GNU_SOURCE -DPOSIX_C_SOURCE=1-D_POSIX_C_SOURCE=200112L -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -m64 -c poll.c 
cc -I. -I. -I/home/stuart/.rvm/rubies/jruby-1.7.0/lib/native/include/ruby -I. -DHAVE_TYPE_CLOCKID_T -DHAVE_POLL -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DHAVE_TYPE_STRUCT_SOCKADDR_STORAGE -DHAVE_ACCEPT4 -DHAVE_SYS_SELECT_H -DHAVE_TYPE_OPENFILE -DHAVE_ST__ -DHAVE_ST_MODE -DSIZEOF_INT=4 -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_STR_SET_LEN -D_GNU_SOURCE -DPOSIX_C_SOURCE=1-D_POSIX_C_SOURCE=200112L -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -m64 -c tryopen.c 
tryopen.c: In function ‘s_tryopen’: 
tryopen.c:107:7: error: ‘errno’ undeclared (first use in this function) 
tryopen.c:107:7: note: each undeclared identifier is reported only once for each function it appears in 
tryopen.c:107:16: error: ‘EMFILE’ undeclared (first use in this function) 
tryopen.c:107:35: error: ‘ENFILE’ undeclared (first use in this function) 
tryopen.c:107:54: error: ‘ENOMEM’ undeclared (first use in this function) 
make: *** [tryopen.o] Error 1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Proplems building on Ubuntu 12.10 server 64bit
  2012-11-21 22:28 Proplems building on Ubuntu 12.10 server 64bit stuart
@ 2012-11-21 23:14 ` Eric Wong
  2012-11-21 23:19   ` Eric Wong
  2012-11-22  0:02   ` stuart
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Wong @ 2012-11-21 23:14 UTC (permalink / raw)
  To: kgio

stuart <stuart@stuartk.com> wrote:
> I'm having trouble building kgio 2.7.4 on Ubuntu 12.10 x86_64 with JRuby installed by RVM 
> 
> It appears that tryopen.c needs #include <errno.h> otherwise I get the error build log below.

Yes, patch coming.

> Is this a problem for anyone else, or just on my system?

kgio is only supported under MRI and Rubinius.

Does JRuby 1.7 support C extensions at all?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Proplems building on Ubuntu 12.10 server 64bit
  2012-11-21 23:14 ` Eric Wong
@ 2012-11-21 23:19   ` Eric Wong
  2012-11-22  0:02   ` stuart
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Wong @ 2012-11-21 23:19 UTC (permalink / raw)
  To: kgio

Eric Wong <normalperson@yhbt.net> wrote:
> stuart <stuart@stuartk.com> wrote:
> > I'm having trouble building kgio 2.7.4 on Ubuntu 12.10 x86_64 with JRuby installed by RVM 
> > 
> > It appears that tryopen.c needs #include <errno.h> otherwise I get the error build log below.
> 
> Yes, patch coming.

Pushed to master on git://bogomips.org/kgio

>From 8b4df8ece93ddc4e2fb685905461c1ed27b22295 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Wed, 21 Nov 2012 23:16:00 +0000
Subject: [PATCH] tryopen: include errno.h header just in case

errno.h is not guaranteed to be included in existing headers,
so we need to #include it to ensure errno and friends are
usable.

Thanks to stuart on the kgio mailing list for noticing
ref: <062571308.133355.1353536890665.JavaMail.sas1@172.29.251.236>
---
 ext/kgio/tryopen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ext/kgio/tryopen.c b/ext/kgio/tryopen.c
index f8044a5..0ee6a54 100644
--- a/ext/kgio/tryopen.c
+++ b/ext/kgio/tryopen.c
@@ -14,6 +14,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <errno.h>
 #include "set_file_path.h"
 #include "ancient_ruby.h"
 
-- 
Eric Wong


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Proplems building on Ubuntu 12.10 server 64bit
  2012-11-21 23:14 ` Eric Wong
  2012-11-21 23:19   ` Eric Wong
@ 2012-11-22  0:02   ` stuart
  1 sibling, 0 replies; 4+ messages in thread
From: stuart @ 2012-11-22  0:02 UTC (permalink / raw)
  To: kgio

---- On Wed, 21 Nov 2012 15:14:03 -0800 Eric Wong<normalperson@yhbt.net> wrote ---- 
 >  
 > Yes, patch coming. 
 >  

Great, thanks

 >  
 > kgio is only supported under MRI and Rubinius. 
 >  
 > Does JRuby 1.7 support C extensions at all? 

Yep, with cext.enabled=true in ~/.jrubyrc



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-22  0:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21 22:28 Proplems building on Ubuntu 12.10 server 64bit stuart
2012-11-21 23:14 ` Eric Wong
2012-11-21 23:19   ` Eric Wong
2012-11-22  0:02   ` stuart

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kgio.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).