Skip to content

Instantly share code, notes, and snippets.

@joloudov
Created June 29, 2013 18:43
Show Gist options
  • Save joloudov/5892189 to your computer and use it in GitHub Desktop.
Save joloudov/5892189 to your computer and use it in GitHub Desktop.
➭ uname -a Darwin joloudov.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64 ➭ ruby -v jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_51-b11-456-11M4508 [darwin-x86_64] ➭ java -version java version "1.6.0_51" Java(TM) SE Runtime Environment (…
➭ jruby -S gem install eventmachine_httpserver
Building native extensions. This could take a while...
ERROR: Error installing eventmachine_httpserver:
ERROR: Failed to build gem native extension.
/Users/joloudov/.rvm/rubies/jruby-1.7.4/bin/jruby extconf.rb
/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
checking for main() in -lpthread... yes
checking for main() in -lssl... yes
checking for main() in -lcrypto... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
creating Makefile
make
c++ -I. -I. -I/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include/ruby -I. -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DOS_UNIX -DBUILD_FOR_RUBY -DWITH_SSL -fPIC -DTARGET_RT_MAC_CFM=0 -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -arch x86_64 -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -c http.cpp
c++ -I. -I. -I/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include/ruby -I. -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DOS_UNIX -DBUILD_FOR_RUBY -DWITH_SSL -fPIC -DTARGET_RT_MAC_CFM=0 -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -arch x86_64 -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions -c rubyhttp.cpp
c++ -shared -o eventmachine_httpserver.bundle http.o rubyhttp.o -L"." -L"/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib" -arch x86_64 -lcrypto -lssl -lpthread
Undefined symbols for architecture x86_64:
"_rb_define_method", referenced from:
_Init_eventmachine_httpserver in rubyhttp.o
"_rb_define_module", referenced from:
_Init_eventmachine_httpserver in rubyhttp.o
"_rb_define_module_under", referenced from:
_Init_eventmachine_httpserver in rubyhttp.o
"_rb_funcall", referenced from:
RubyHttpConnection_t::SendData(char const*, int) in rubyhttp.o
RubyHttpConnection_t::CloseConnection(bool) in rubyhttp.o
RubyHttpConnection_t::ReceivePostData(char const*, int) in rubyhttp.o
RubyHttpConnection_t::ProcessRequest(char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, int, char const*, char const*, int) in rubyhttp.o
t_receive_data(unsigned long, unsigned long) in rubyhttp.o
t_process_http_request(unsigned long) in rubyhttp.o
"_rb_int2inum", referenced from:
_LONG2NUM in rubyhttp.o
"_rb_intern", referenced from:
RubyHttpConnection_t::CloseConnection(bool) in rubyhttp.o
"_rb_intern2", referenced from:
RubyHttpConnection_t::SendData(char const*, int) in rubyhttp.o
RubyHttpConnection_t::ReceivePostData(char const*, int) in rubyhttp.o
RubyHttpConnection_t::ProcessRequest(char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, int, char const*, char const*, int) in rubyhttp.o
_Init_eventmachine_httpserver in rubyhttp.o
t_receive_data(unsigned long, unsigned long) in rubyhttp.o
t_process_http_request(unsigned long) in rubyhttp.o
"_rb_ivar_get", referenced from:
t_receive_data(unsigned long, unsigned long) in rubyhttp.o
t_unbind(unsigned long) in rubyhttp.o
t_no_environment_strings(unsigned long) in rubyhttp.o
t_dont_accumulate_post(unsigned long) in rubyhttp.o
"_rb_ivar_set", referenced from:
RubyHttpConnection_t::ProcessRequest(char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, int, char const*, char const*, int) in rubyhttp.o
t_post_init(unsigned long) in rubyhttp.o
"_rb_num2int", referenced from:
_NUM2INT in rubyhttp.o
"_rb_num2long", referenced from:
_NUM2LONG in rubyhttp.o
"_rb_str_new", referenced from:
RubyHttpConnection_t::SendData(char const*, int) in rubyhttp.o
RubyHttpConnection_t::ReceivePostData(char const*, int) in rubyhttp.o
RubyHttpConnection_t::ProcessRequest(char const*, char const*, char const*, char const*, char const*, char const*, char const*, char const*, int, char const*, char const*, int) in rubyhttp.o
t_process_http_request(unsigned long) in rubyhttp.o
"_rb_string_value_ptr", referenced from:
t_receive_data(unsigned long, unsigned long) in rubyhttp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [eventmachine_httpserver.bundle] Error 1
Gem files will remain installed in /Users/joloudov/.rvm/gems/jruby-1.7.4@global/gems/eventmachine_httpserver-0.2.1 for inspection.
Results logged to /Users/joloudov/.rvm/gems/jruby-1.7.4@global/gems/eventmachine_httpserver-0.2.1/ext/gem_make.out
SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = .
topdir = /Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include
hdrdir = /Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include/ruby
VPATH = $(srcdir):$(topdir):$(hdrdir)
prefix = $(DESTDIR)
exec_prefix = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4
rubylibprefix = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/ruby
libdir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib
rubylibdir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9
rubysharedlibdir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/ruby/shared
sitedir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9/site_ruby
sitelibdir = $(DESTDIR)/Users/joloudov/.rvm/gems/jruby-1.7.4@global/gems/eventmachine_httpserver-0.2.1/ext/.gem.20130630-2069-y3ndx2
sitearchdir = $(DESTDIR)/Users/joloudov/.rvm/gems/jruby-1.7.4@global/gems/eventmachine_httpserver-0.2.1/ext/.gem.20130630-2069-y3ndx2
archdir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include
datadir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/share
mandir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/man
sysconfdir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/etc
localstatedir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/var
includedir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include
rubyhdrdir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include
bindir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/bin
ridir = $(DESTDIR)/Users/joloudov/.rvm/rubies/jruby-1.7.4/share/ri
CC = cc
LIBRUBY =
LIBRUBY_A =
LIBRUBYARG_SHARED =
LIBRUBYARG_STATIC =
RUBY_EXTCONF_H =
CFLAGS = -fPIC -DTARGET_RT_MAC_CFM=0 -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions $(cflags) $(cflags) -arch x86_64
INCFLAGS = -I. -I. -I/Users/joloudov/.rvm/rubies/jruby-1.7.4/lib/native/include/ruby -I.
DEFS =
CPPFLAGS = -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DOS_UNIX -DBUILD_FOR_RUBY -DWITH_SSL
CXXFLAGS = $(CFLAGS) -fno-omit-frame-pointer -fno-strict-aliasing -fexceptions $(cflags) $(cxxflags) $(cflags) $(cxxflags)
ldflags =
dldflags =
archflag = -arch x86_64
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
LDSHARED = $(CXX) -shared
AR =
EXEEXT =
RUBY_INSTALL_NAME = jruby
RUBY_SO_NAME =
arch = java
sitearch = java
ruby_version = 1.9
ruby = /Users/joloudov/.rvm/rubies/jruby-1.7.4/bin/jruby
RUBY = $(ruby)
RM = rm -f
MAKEDIRS = mkdir -p
INSTALL = install -c
INSTALL_PROG = $(INSTALL) -m 0755
INSTALL_DATA = $(INSTALL) -m 0644
COPY = cp
#### End of system configuration section. ####
preload =
libpath = . $(libdir)
LIBPATH = -L"." -L"$(libdir)"
DEFFILE =
CLEANFILES = mkmf.log
DISTCLEANFILES =
extout =
extout_prefix =
target_prefix =
LOCAL_LIBS =
LIBS = -lcrypto -lssl -lpthread
SRCS = http.cpp rubyhttp.cpp
OBJS = http.o rubyhttp.o
TARGET = eventmachine_httpserver
DLLIB = $(TARGET).bundle
EXTSTATIC =
STATIC_LIB =
BINDIR = $(bindir)
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
TARGET_SO = $(DLLIB)
CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
all: $(DLLIB)
static: $(STATIC_LIB)
.PHONY: all install static install-so install-rb
.PHONY: clean clean-so clean-rb
clean:
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
distclean: clean
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
realclean: distclean
install: install-so install-rb
install-so: $(RUBYARCHDIR)
install-so: $(RUBYARCHDIR)/$(DLLIB)
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
install-rb: pre-install-rb install-rb-default
install-rb-default: pre-install-rb-default
pre-install-rb: Makefile
pre-install-rb-default: Makefile
$(RUBYARCHDIR):
$(MAKEDIRS) $@
site-install: site-install-so site-install-rb
site-install-so: install-so
site-install-rb: install-rb
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
.cc.o:
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
.cxx.o:
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
.cpp.o:
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
.C.o:
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
.c.o:
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
$(DLLIB): $(OBJS) Makefile
@-$(RM) $@
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
$(OBJS):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment