I was encountering the following errors when installing watir-webdriver gem via command: sudo gem install watir-webdriver. Please help.
Here are the details:
Building native extensions. This could take a while...
ERROR: Error installing watir-webdriver:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... yes
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
checking for ffi_raw_call()... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
make "DESTDIR="
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
Call.c:303:5: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
rbffi_thread_blocking_region(call_blocking_function, data, (void *) -1, NULL);
^
./Thread.h:78:39: note: expanded from macro 'rbffi_thread_blocking_region'
# define rbffi_thread_blocking_region rb_thread_call_without_gvl
^
1 warning generated.
compiling ClosurePool.c
compiling DataConverter.c
DataConverter.c:43:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiling DynamicLibrary.c
compiling ffi.c
compiling Function.c
Function.c:479:33: warning: incompatible pointer types passing 'VALUE (void *)' to parameter of type 'void *(*)(void *)' [-Wincompatible-pointer-types]
rb_thread_call_with_gvl(callback_with_gvl, &cb);
^~~~~~~~~~~~~~~~~
Function.c:102:46: note: passing argument to parameter 'func' here
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
^
Function.c:563:9: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);
^
Function.c:738:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
3 warnings generated.
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByReference.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
linking shared-object ffi_c.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [ffi_c.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3/ext/ffi_c/gem_make.out
This looks like an issue with ffi gem. I see you have Ruby 2.0. Try using ffi's version 1.0.9 which should work fine in this case.
So, execute below command first before installing watir-webdriver.
sudo gem install ffi --version='1.0.9'
Or, if you're using bundle, use following
gem 'ffi', '1.0.9'
Related
Using a Ubuntu 12.04 host, I carefully followed this SO answer here (Recipe for Compiling Binutils and GCC Together) to build GCC and binutils in one tree with all of their dependencies.
Here is the configure line I am doing inside my build directory:
../gcc-4.9.0/configure --target=arm-linux-gnueabi --prefix=/home/mint/cross-arm --disable-werror
The Makefile configures correctly and afterwards I run:
sudo make -j8
I get into the compilation process for some time then eventually it errors out here:
In file included from ../../../gcc-4.9.0/libgcc/gthr.h:148:0,
from ../../../gcc-4.9.0/libgcc/libgcov-interface.c:27:
./gthr-default.h:35:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
make[2]: *** [_gcov_flush.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../../gcc-4.9.0/libgcc/gthr.h:148:0,
from ../../../gcc-4.9.0/libgcc/libgcov-interface.c:27:
./gthr-default.h:35:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
make[2]: *** [_gcov_execlp.o] Error 1
In file included from ../../../gcc-4.9.0/libgcc/gthr.h:148:0,
from ../../../gcc-4.9.0/libgcc/libgcov-interface.c:27:
./gthr-default.h:35:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
In file included from ../../../gcc-4.9.0/libgcc/gthr.h:148:0,
from ../../../gcc-4.9.0/libgcc/libgcov-interface.c:27:
./gthr-default.h:35:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
make[2]: compilation terminated.
*** [_gcov_fork.o] Error 1
make[2]: *** [_gcov_execl.o] Error 1
In file included from ../../../gcc-4.9.0/libgcc/gthr.h:148:0,
from ../../../gcc-4.9.0/libgcc/libgcov-interface.c:27:
./gthr-default.h:35:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
make[2]: *** [_gcov_execle.o] Error 1
make[2]: Leaving directory `/home/mint/Workspaces/src/build/arm-linux-gnueabi/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/mint/Workspaces/src/build'
make: *** [all] Error 2
Am I missing a certain dependency that is preventing this build?
P.S. I installed 'build-essential' via apt-get before the build.
The error suggests some issue with the C library.
For building the GCC compiler, you need prebuilt binutils + prebuilt C library.
In case of cross compiler, one possible route is :
Ensure that you have prebuilt binutils (cross compile build)
Cross compile GCC :
Add Configure option --without-headers. Now compile (see make targets in the link below)
Compile your C library and point to it when compiling your program for the target
See some instructions for cross-compiling gcc here GCC Cross Compiling. Then "install" the appropriate C library (glibc / newlib).
Also, (if you are not already doing it) it may be worthwhile to ensure that the --prefix for bintutils and the gcc cross compile build are the same location.
This is the error that came up when attempting to install Ruby 2.0
Error running 'make -j2',
please read /usr/local/rvm/log/ruby-2.0.0-p247/1372532765_make.log
There has been an error while running make. Halting the installation.
I tried following these steps and it did not work: Can't install Ruby 2.0.0-p0 with RVM. Error running 'make -j8'
Any help on this would be greatly appreciated. I'm not sure what to do...
Here's the log:
[2013-06-29 15:06:05] make
CC = clang
LD = ld
LDSHARED = clang -dynamiclib
CFLAGS = -O3 -I/opt/sm/pkg/active/include -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0.0 -fstack-protector -Wl,-u,_objc_msgSend -fstack-protector -Wl,-u,_objc_msgSend
SOLIBS =
linking miniruby
generating encdb.h
rbconfig.rb updated
generating enc.mk
encdb.h unchanged
generating prelude.c
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
compiling prelude.c
linking static-library libruby.2.0.0-static.a
verifying static-library libruby.2.0.0-static.a
transdb.h unchanged
linking shared-library libruby.2.0.0.dylib
making enc
making trans
make[1]: Nothing to be done for `enc'.
generating makefile exts.mk
make[1]: Nothing to be done for `./enc/trans'.
making encs
configuring -test-/array/resize
configuring -test-/bug-3571
configuring -test-/bug-3662
configuring -test-/bug-5832
configuring -test-/debug
configuring -test-/exception
configuring -test-/fatal
configuring -test-/funcall
configuring -test-/iter
configuring -test-/load/dot.dot
configuring -test-/marshal/compat
configuring -test-/marshal/usr
configuring -test-/method
configuring -test-/num2int
configuring -test-/old_thread_select
configuring -test-/path_to_class
configuring -test-/printf
configuring -test-/st/numhash
configuring -test-/st/update
configuring -test-/string
configuring -test-/symbol
configuring -test-/typeddata
configuring -test-/wait_for_single_fd
configuring -test-/win32/dln
Failed to configure -test-/win32/dln. It will not be installed.
configuring -test-/win32/fd_setsize
Failed to configure -test-/win32/fd_setsize. It will not be installed.
configuring bigdecimal
configuring continuation
configuring coverage
configuring curses
header: ncurses.h
library: ncursesw
configuring date
configuring dbm
header: ndbm.h
library: libc
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
configuring digest/sha1
configuring digest/sha2
configuring dl
configuring dl/callback
configuring dl/win32
Failed to configure dl/win32. It will not be installed.
configuring etc
configuring fcntl
configuring fiber
configuring fiddle
configuring fiddle/win32
Failed to configure fiddle/win32. It will not be installed.
configuring gdbm
Failed to configure gdbm. It will not be installed.
configuring io/console
configuring io/nonblock
configuring io/wait
configuring json
configuring json/generator
configuring json/parser
configuring mathn/complex
configuring mathn/rational
configuring nkf
configuring objspace
configuring openssl
configuring pathname
configuring psych
configuring pty
configuring racc/cparse
configuring readline
configuring ripper
configuring sdbm
configuring socket
configuring stringio
configuring strscan
configuring syslog
configuring tk/tkutil
Failed to configure tk/tkutil. It will not be installed.
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
linking shared-object -test-/array/resize.bundle
linking shared-object -test-/bug-3571/bug.bundle
installing default bug libraries
installing default resize libraries
linking shared-object -test-/bug-5832/bug.bundle
linking shared-object -test-/bug-3662/bug.bundle
installing default bug libraries
installing default bug libraries
linking shared-object -test-/debug.bundle
linking shared-object -test-/exception.bundle
installing default exception libraries
installing default debug libraries
linking shared-object -test-/fatal/rb_fatal.bundle
linking shared-object -test-/funcall/funcall.bundle
installing default funcall libraries
installing default rb_fatal libraries
linking shared-object -test-/iter/break.bundle
linking shared-object -test-/load/dot.dot/dot.dot.bundle
installing default break libraries
installing default dot.dot libraries
linking shared-object -test-/marshal/usr.bundle
linking shared-object -test-/marshal/compat.bundle
installing default compat libraries
installing default usr libraries
linking shared-object -test-/num2int/num2int.bundle
linking shared-object -test-/method.bundle
installing default method libraries
installing default num2int libraries
linking shared-object -test-/path_to_class/path_to_class.bundle
linking shared-object -test-/old_thread_select/old_thread_select.bundle
installing default path_to_class libraries
installing default old_thread_select libraries
linking shared-object -test-/printf.bundle
linking shared-object -test-/st/numhash.bundle
installing default printf libraries
installing default numhash libraries
linking shared-object -test-/st/update.bundle
linking shared-object -test-/string/string.bundle
installing default update libraries
linking shared-object -test-/symbol/symbol.bundle
installing default string libraries
linking shared-object -test-/typeddata/typeddata.bundle
installing default symbol libraries
installing default typeddata libraries
linking shared-object -test-/wait_for_single_fd/wait_for_single_fd.bundle
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
linking shared-object bigdecimal.bundle
installing default wait_for_single_fd libraries
linking shared-object continuation.bundle
installing default bigdecimal libraries
linking shared-object coverage.bundle
installing default continuation libraries
linking shared-object curses.bundle
installing default coverage libraries
installing default curses libraries
linking shared-object date_core.bundle
linking shared-object dbm.bundle
installing default dbm libraries
installing default date_core libraries
linking shared-object digest.bundle
linking shared-object digest/bubblebabble.bundle
installing digest libraries
installing default digest libraries
installing default bubblebabble libraries
linking shared-object digest/md5.bundle
linking shared-object digest/rmd160.bundle
installing default rmd160 libraries
installing default md5 libraries
linking shared-object digest/sha1.bundle
linking shared-object digest/sha2.bundle
installing default sha1 libraries
installing default sha2 libraries
linking shared-object dl/callback.bundle
linking shared-object dl.bundle
installing dl libraries
installing default dl libraries
make[2]: Nothing to be done for `all'.
installing default callback libraries
linking shared-object etc.bundle
linking shared-object fcntl.bundle
installing default etc libraries
linking shared-object fiber.bundle
installing default fcntl libraries
linking shared-object fiddle.bundle
installing default fiber libraries
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
installing default fiddle libraries
linking shared-object io/console.bundle
linking shared-object io/nonblock.bundle
installing default console libraries
installing default nonblock libraries
linking shared-object io/wait.bundle
installing default libraries
linking shared-object json/ext/generator.bundle
installing default wait libraries
linking shared-object json/ext/parser.bundle
installing default generator libraries
installing default parser libraries
linking shared-object mathn/complex.bundle
linking shared-object mathn/rational.bundle
installing default complex libraries
installing default rational libraries
linking shared-object nkf.bundle
linking shared-object objspace.bundle
installing default objspace libraries
compiling openssl_missing.c
installing default nkf libraries
linking shared-object pathname.bundle
installing default pathname libraries
linking shared-object psych.bundle
In file included from openssl_missing.c:22:
./openssl_missing.h:71:6: error: conflicting types for 'HMAC_CTX_copy'
void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
^
/opt/sm/pkg/active/include/openssl/hmac.h:102:5: note: previous declaration is here
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
^
In file included from openssl_missing.c:22:
./openssl_missing.h:95:5: error: conflicting types for 'EVP_CIPHER_CTX_copy'
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
^
/opt/sm/pkg/active/include/openssl/evp.h:502:5: note: previous declaration is here
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
^
openssl_missing.c:26:1: error: conflicting types for 'HMAC_CTX_copy'
HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
^
/opt/sm/pkg/active/include/openssl/hmac.h:102:5: note: previous declaration is here
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
^
openssl_missing.c:121:1: error: conflicting types for 'EVP_CIPHER_CTX_copy'
EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in)
^
/opt/sm/pkg/active/include/openssl/evp.h:502:5: note: previous declaration is here
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
^
4 errors generated.
make[2]: *** [openssl_missing.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default psych libraries
make: *** [build-ext] Error 2
Spent a lot of time trying to find the answer and looked around and this seemed to work
CC=clang rvm install 2.0.0 -C --enable-shared, --with-openssl-dir=`brew --prefix openssl`
Had a similar problem just now running arch. It worked fine after
rvm get stable
and cleaning up per instruction given by the installer.
Seems like you don't have properly configured ssl.
Try doing it again with --with-openssl-dir=/usr/bin (instead of /usr/bin you may put your actual path, but that's the most probable path).
This is my first time using Ruby. I became aware not to use sudo to install Gems so I followed this tutotrial (http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac) to install RVM so that I could update my version of Ruby and then install Middleman (http://middlemanapp.com/).
RVM installation worked, but when installing Ruby 1.9.3 at the '#compiling' stage I get the following error:
Error running 'make', please read
/Users/Mark/.rvm/log/ruby-1.9.3-p385/make.log There has been an error
while running make. Halting the installation.
I opened the log file and unlike a lot of other issues I've seen, the file doesn't contain references to 'readline' but to 'compiling' which I assume relates to the '#compiling' stage of the Ruby install. Below is the output to make.log:
[2013-02-12 09:04:26] make
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/Mark/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
bignum.c:2732:26: warning: while loop has empty body [-Wempty-body]
while (--ny && !zds[ny]); ++ny;
^
bignum.c:2732:26: note: put the semicolon on a separate line to silence this warning
1 warning generated.
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
gc.c:3060:1: warning: unused function 'chain_finalized_object' [-Wunused-function]
chain_finalized_object(st_data_t key, st_data_t val, st_data_t arg)
^
1 warning generated.
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
If I run 'make --version' I get the following output:
GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This
is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
This program built for i386-apple-darwin11.3.0
I'm struggling to find an exact matching issue, so if anyone could help that would be great.
Cheers,
Mark.
I followed some of the advice here and in other posts linked and Googled, but in the end, updating GCC via Homebrew is what finally got the Ruby installation to complile and complete.
Specific link I used for updating GCC: Installing Ruby on Mac OS X 10.8.2
So thanks for all the help, I can't be sure if it was a combination of all the updates and cleanup as well as GCC or just GCC, but I'm up and running.
Although you don't see the error it is in fact caused by readline. As mentioned by atmosx I'd remove the default MAC OS X install of ruby and follow the process from the beginning.
Or following this https://rvm.io/packages/readline/ to help resolve readline. Also for reference look at this previous question: Error running make when installing Ruby 1.8.7-p302 via RVM on Mac OS 10.5.8
So complete steps are:
rvm pkg install readline
rvm remove 1.8.7
rvm cleanup all
rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr
Thanks to Andrew at http://anlek.com/2011/01/rvm-install-1-8-7-p330-fails/ for the pointer.
I've been having some problems installing Ruby 1.9.3 (or any version after 1.8.7 for that matter).
See below for error log:
[2012-10-26 19:26:24] make
CC = clang
LD = ld
LDSHARED = clang -dynamiclib
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -I/Users/username/.rvm/usr/include -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin10.8.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/username/.rvm/rubies/ruby-1.9.3-p286/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling time.c
compiling transcode.c
compiling util.c
compiling variable.c
compiling compile.c
compiling debug.c
compiling iseq.c
compiling vm.c
In file included from vm.c:25:
In file included from ./vm_exec.c:106:
insns.def:634:9: warning: explicitly assigning a variable of type 'VALUE' (aka 'unsigned long') to itself [-Wself-assign]
val = val;
~~~ ^ ~~~
In file included from vm.c:27:
./vm_method.c:102:85: warning: unused variable 'prev_ume' [-Wunused-variable]
struct unlinked_method_entry_list_entry *ume = vm->unlinked_method_entry_list, *prev_ume = 0, *curr_ume;
^
./vm_method.c:102:100: warning: unused variable 'curr_ume' [-Wunused-variable]
struct unlinked_method_entry_list_entry *ume = vm->unlinked_method_entry_list, *prev_ume = 0, *curr_ume;
^
3 warnings generated.
compiling vm_dump.c
compiling thread.c
compiling cont.c
compiling ./enc/ascii.c
compiling ./enc/us_ascii.c
compiling ./enc/unicode.c
compiling ./enc/utf_8.c
compiling newline.c
compiling ./missing/setproctitle.c
linking miniruby
rbconfig.rb updated
generating enc.mk
compiling dln.c
compiling encoding.c
generating prelude.c
compiling prelude.c
linking static-library libruby.1.9.1-static.a
linking shared-library libruby.1.9.1.dylib
generating encdb.h
encdb.h unchanged
making enc
compiling ./enc/encdb.c
linking encoding encdb.bundle
compiling ./enc/big5.c
linking encoding big5.bundle
compiling ./enc/cp949.c
linking encoding cp949.bundle
compiling ./enc/emacs_mule.c
linking encoding emacs_mule.bundle
compiling ./enc/euc_jp.c
linking encoding euc_jp.bundle
compiling ./enc/euc_kr.c
linking encoding euc_kr.bundle
compiling ./enc/euc_tw.c
linking encoding euc_tw.bundle
compiling ./enc/gb2312.c
linking encoding gb2312.bundle
compiling ./enc/gb18030.c
linking encoding gb18030.bundle
compiling ./enc/gbk.c
linking encoding gbk.bundle
compiling ./enc/iso_8859_1.c
linking encoding iso_8859_1.bundle
compiling ./enc/iso_8859_2.c
linking encoding iso_8859_2.bundle
compiling ./enc/iso_8859_3.c
linking encoding iso_8859_3.bundle
compiling ./enc/iso_8859_4.c
linking encoding iso_8859_4.bundle
compiling ./enc/iso_8859_5.c
linking encoding iso_8859_5.bundle
compiling ./enc/iso_8859_6.c
linking encoding iso_8859_6.bundle
compiling ./enc/iso_8859_7.c
linking encoding iso_8859_7.bundle
compiling ./enc/iso_8859_8.c
linking encoding iso_8859_8.bundle
compiling ./enc/iso_8859_9.c
linking encoding iso_8859_9.bundle
compiling ./enc/iso_8859_10.c
linking encoding iso_8859_10.bundle
compiling ./enc/iso_8859_11.c
linking encoding iso_8859_11.bundle
compiling ./enc/iso_8859_13.c
linking encoding iso_8859_13.bundle
compiling ./enc/iso_8859_14.c
linking encoding iso_8859_14.bundle
compiling ./enc/iso_8859_15.c
linking encoding iso_8859_15.bundle
compiling ./enc/iso_8859_16.c
linking encoding iso_8859_16.bundle
compiling ./enc/koi8_r.c
linking encoding koi8_r.bundle
compiling ./enc/koi8_u.c
linking encoding koi8_u.bundle
compiling ./enc/shift_jis.c
linking encoding shift_jis.bundle
compiling ./enc/utf_16be.c
linking encoding utf_16be.bundle
compiling ./enc/utf_16le.c
linking encoding utf_16le.bundle
compiling ./enc/utf_32be.c
linking encoding utf_32be.bundle
compiling ./enc/utf_32le.c
linking encoding utf_32le.bundle
compiling ./enc/windows_1251.c
linking encoding windows_1251.bundle
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
making trans
compiling ./enc/trans/transdb.c
linking transcoder transdb.bundle
compiling ./enc/trans/big5.c
linking transcoder big5.bundle
compiling ./enc/trans/chinese.c
linking transcoder chinese.bundle
compiling ./enc/trans/emoji.c
linking transcoder emoji.bundle
compiling ./enc/trans/emoji_iso2022_kddi.c
linking transcoder emoji_iso2022_kddi.bundle
compiling ./enc/trans/emoji_sjis_docomo.c
linking transcoder emoji_sjis_docomo.bundle
compiling ./enc/trans/emoji_sjis_kddi.c
linking transcoder emoji_sjis_kddi.bundle
compiling ./enc/trans/emoji_sjis_softbank.c
linking transcoder emoji_sjis_softbank.bundle
compiling ./enc/trans/escape.c
linking transcoder escape.bundle
compiling ./enc/trans/gb18030.c
linking transcoder gb18030.bundle
compiling ./enc/trans/gbk.c
linking transcoder gbk.bundle
compiling ./enc/trans/iso2022.c
linking transcoder iso2022.bundle
compiling ./enc/trans/japanese.c
linking transcoder japanese.bundle
compiling ./enc/trans/japanese_euc.c
linking transcoder japanese_euc.bundle
compiling ./enc/trans/japanese_sjis.c
linking transcoder japanese_sjis.bundle
compiling ./enc/trans/korean.c
linking transcoder korean.bundle
compiling ./enc/trans/single_byte.c
linking transcoder single_byte.bundle
compiling ./enc/trans/utf8_mac.c
linking transcoder utf8_mac.bundle
compiling ./enc/trans/utf_16_32.c
linking transcoder utf_16_32.bundle
making encs
configuring -test-/add_suffix
configuring -test-/array/resize
configuring -test-/bug-3571
configuring -test-/bug-3662
configuring -test-/funcall
configuring -test-/load/dot.dot
configuring -test-/old_thread_select
configuring -test-/st/numhash
configuring -test-/string
configuring -test-/wait_for_single_fd
configuring -test-/win32/dln
Failed to configure -test-/win32/dln. It will not be installed.
configuring -test-/win32/fd_setsize
Failed to configure -test-/win32/fd_setsize. It will not be installed.
configuring bigdecimal
configuring continuation
configuring coverage
configuring curses
configuring date
configuring dbm
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
configuring digest/sha1
configuring digest/sha2
configuring dl
configuring dl/callback
configuring dl/win32
Failed to configure dl/win32. It will not be installed.
configuring etc
configuring fcntl
configuring fiber
configuring fiddle
configuring gdbm
Failed to configure gdbm. It will not be installed.
configuring iconv
configuring io/console
configuring io/nonblock
configuring io/wait
configuring json
configuring json/generator
configuring json/parser
configuring mathn/complex
configuring mathn/rational
configuring nkf
configuring objspace
configuring openssl
configuring pathname
configuring psych
configuring pty
configuring racc/cparse
configuring readline
configuring ripper
configuring sdbm
configuring socket
configuring stringio
configuring strscan
configuring syck
configuring syslog
configuring tk
check functions.........
check struct members..
check libraries....
Use ActiveTcl libraries (if available).
Search tclConfig.sh and tkConfig.sh....................................
Valid [tclConfig.sh, tkConfig.sh] are found in [["/System/Library/Frameworks/Tcl.framework", "/System/Library/Frameworks/Tk.framework"], ["/usr/lib", "/usr/lib"], ["/System/Library/Frameworks/Tcl.framework/Versions/Current", "/System/Library/Frameworks/Tk.framework/Versions/Current"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.5", "/System/Library/Frameworks/Tk.framework/Versions/8.5"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.4", "/System/Library/Frameworks/Tk.framework/Versions/8.4"]]
Use [tclConfig.sh, tkConfig.sh] == ["/System/Library/Frameworks/Tcl.framework/tclConfig.sh", "/System/Library/Frameworks/Tk.framework/tkConfig.sh"]
Use MacOS X Frameworks.
Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
configuring tk/tkutil
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
Failed to configure zlib. It will not be installed.
linking shared-object -test-/add_suffix/bug.bundle
installing default bug libraries
compiling resize.c
linking shared-object -test-/array/resize.bundle
installing default resize libraries
compiling bug.c
linking shared-object -test-/bug-3571/bug.bundle
installing default bug libraries
compiling bug.c
linking shared-object -test-/bug-3662/bug.bundle
installing default bug libraries
compiling passing_block.c
linking shared-object -test-/funcall/funcall.bundle
installing default funcall libraries
compiling dot.dot.c
linking shared-object -test-/load/dot.dot/dot.dot.bundle
installing default dot.dot libraries
linking shared-object -test-/old_thread_select/old_thread_select.bundle
installing default old_thread_select libraries
compiling numhash.c
linking shared-object -test-/st/numhash.bundle
installing default numhash libraries
compiling cstr.c
compiling ellipsize.c
compiling enc_associate.c
compiling init.c
compiling modify.c
compiling set_len.c
linking shared-object -test-/string/string.bundle
installing default string libraries
linking shared-object -test-/wait_for_single_fd/wait_for_single_fd.bundle
installing default wait_for_single_fd libraries
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
linking shared-object bigdecimal.bundle
installing default bigdecimal libraries
compiling continuation.c
linking shared-object continuation.bundle
installing default continuation libraries
compiling coverage.c
linking shared-object coverage.bundle
installing default coverage libraries
compiling curses.c
linking shared-object curses.bundle
installing default curses libraries
linking shared-object date_core.bundle
installing default date_core libraries
compiling dbm.c
dbm.c:818:16: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
if (val.dsize == (int)RSTRING_LEN(valstr) &&
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
1 warning generated.
linking shared-object dbm.bundle
installing default dbm libraries
compiling digest.c
linking shared-object digest.bundle
installing digest libraries
installing default digest libraries
compiling bubblebabble.c
linking shared-object digest/bubblebabble.bundle
installing default bubblebabble libraries
compiling md5init.c
linking shared-object digest/md5.bundle
ld: warning: ignoring file /usr/local/lib/libz.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture
x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../.ext/x86_64-darwin10.8.0/digest/md5.bundle] Error 1
make[1]: *** [ext/digest/md5/all] Error 2
make: *** [build-ext] Error 2
I'm trying to install through RVM but just installing Ruby from source isn't helping. I can't seem to figure out what's going on. I tried appending --with-gcc=clang and env ARCHFLAGS="-arch x86_64"
Any advice is much appreciated! Thanks.
You have an incompatibly-built version of libz installed in /usr/local/lib, perhaps from Homebrew, probably a 32-bit only version where now you need a 64-bit or universal version. You could just delete it at the risk of breaking something else you have installed or you could update it. A safer option: temporarily mv it to another location before you install ruby and then mv it back. You shouldn't need it as OS X supplies a version of libz.
I am giving it a go at compiling lsyncd on Mac OS X (Lion) and I got a little stuck at my configure script not being able to locate my lua libraries:-
calvin$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking pkg-config is at least version 0.9.0... yes
checking for LUA... no
checking for LUA... no
checking for LUA... no
checking for LUA... no
configure: error: Package requirements (lua >= 5.1.3) were not met:
No package 'lua' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LUA_CFLAGS
and LUA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I do have lua installed via macports.
calvin$ lua -v
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
calvin$ which lua
/opt/local/bin/lua
UPDATE
I know for sure that the lua.pc file is located in:
calvin$ sudo find /opt/local -name "lua.pc"
/opt/local/lib/pkgconfig/lua.pc
and so, gone to the extent of explicitly specifying the PKG_CONFIG and PKG_CONFIG_PATH environment variables in my .bashrc file and sourcing it. Like this:
export PKG_CONFIG="/opt/local/lib/pkgconfig:$PKG_CONFIG"
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
What do I need to do to set the correct PKG_CONFIG_PATH environment variable so that my configure script can find lua?
UPDATE #2
So I added in
export LUA_CFLAGS="/opt/local/include"
export LUA_LIBS="/opt/local/lib"
in my .bashrc file, and with that done, I can now run ./configure --without-inotify successfully, with the following output:-
calvin$ ./configure --without-inotify
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking pkg-config is at least version 0.9.0... yes
checking for LUA... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/inotify.h usability... no
checking sys/inotify.h presence... no
checking for sys/inotify.h... no
compiling without inotify
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Unfortunately, running make doesn't work as it seems that the lsyncd.h header file is unable to include lua.h.
calvin$ make
make all-am
gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall /opt/local/include -MT lsyncd.o -MD -MP -MF .deps/lsyncd.Tpo -c -o lsyncd.o lsyncd.c
In file included from lsyncd.c:16:
lsyncd.h:27:17: error: lua.h: No such file or directory
In file included from lsyncd.c:16:
lsyncd.h:52: error: expected ‘)’ before ‘*’ token
lsyncd.h:55: error: expected ‘)’ before ‘*’ token
lsyncd.h:88: error: expected ‘)’ before ‘*’ token
lsyncd.h:115: error: expected ‘)’ before ‘*’ token
lsyncd.h:118: error: expected ‘;’ before ‘void’
lsyncd.h:130: error: expected ‘)’ before ‘*’ token
lsyncd.h:131: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
lsyncd.c:44:20: error: lualib.h: No such file or directory
lsyncd.c:45:21: error: lauxlib.h: No such file or directory
lsyncd.c:64:3: error: #error "need at least one notifcation system. please rerun ./configure"
lsyncd.c:175:3: warning: #warning having to use old style realpath()
lsyncd.c:337: error: expected ‘)’ before ‘*’ token
lsyncd.c:432: error: expected ‘)’ before ‘*’ token
lsyncd.c: In function ‘pipe_tidy’:
lsyncd.c:453: error: ‘struct observance’ has no member named ‘extra’
lsyncd.c: At top level:
lsyncd.c:522: error: expected ‘)’ before ‘*’ token
lsyncd.c:564: error: expected ‘)’ before ‘*’ token
lsyncd.c:565: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
lsyncd.c: In function ‘nonobserve_fd’:
lsyncd.c:650: error: ‘struct observance’ has no member named ‘tidy’
lsyncd.c: At top level:
lsyncd.c:662: error: expected ‘)’ before ‘*’ token
lsyncd.c:689: error: expected ‘)’ before ‘*’ token
lsyncd.c:730: error: expected ‘)’ before ‘*’ token
lsyncd.c:731: error: expected ‘)’ before ‘*’ token
lsyncd.c:740: error: expected ‘)’ before ‘*’ token
lsyncd.c:800: error: expected ‘)’ before ‘*’ token
lsyncd.c:821: error: expected ‘)’ before ‘*’ token
lsyncd.c:968: error: expected ‘)’ before ‘*’ token
lsyncd.c:1011: error: expected ‘)’ before ‘*’ token
lsyncd.c:1045: error: expected ‘)’ before ‘*’ token
lsyncd.c:1097: error: expected ‘)’ before ‘*’ token
lsyncd.c:1111: error: expected ‘)’ before ‘*’ token
lsyncd.c:1186: error: expected ‘)’ before ‘*’ token
lsyncd.c:1241: error: expected ‘)’ before ‘*’ token
lsyncd.c:1268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lsyncdlib’
lsyncd.c:1286: error: expected ‘)’ before ‘*’ token
lsyncd.c:1309: error: expected ‘)’ before ‘*’ token
lsyncd.c:1334: error: expected ‘)’ before ‘*’ token
lsyncd.c:1346: error: expected ‘)’ before ‘*’ token
lsyncd.c:1358: error: expected ‘)’ before ‘*’ token
lsyncd.c:1371: error: expected ‘)’ before ‘*’ token
lsyncd.c:1423: error: expected ‘)’ before ‘*’ token
lsyncd.c:1449: error: expected ‘)’ before ‘*’ token
lsyncd.c:1497: error: expected ‘)’ before ‘*’ token
lsyncd.c: In function ‘main1’:
lsyncd.c:1669: error: ‘lua_State’ undeclared (first use in this function)
lsyncd.c:1669: error: (Each undeclared identifier is reported only once
lsyncd.c:1669: error: for each function it appears in.)
lsyncd.c:1669: error: ‘L’ undeclared (first use in this function)
lsyncd.c:1677: warning: implicit declaration of function ‘lua_open’
lsyncd.c:1678: warning: implicit declaration of function ‘luaL_openlibs’
lsyncd.c:1683: warning: implicit declaration of function ‘lua_getglobal’
lsyncd.c:1684: warning: implicit declaration of function ‘luaL_checkstring’
lsyncd.c:1684: warning: assignment makes pointer from integer without a cast
lsyncd.c:1693: warning: implicit declaration of function ‘lua_pop’
lsyncd.c:1710: warning: implicit declaration of function ‘printlogf0’
lsyncd.c:1717: warning: implicit declaration of function ‘register_lsyncd’
lsyncd.c:1754: warning: implicit declaration of function ‘luaL_loadfile’
lsyncd.c:1755: warning: implicit declaration of function ‘lua_tostring’
lsyncd.c:1762: warning: implicit declaration of function ‘luaL_loadbuffer’
lsyncd.c:1776: warning: implicit declaration of function ‘lua_pcall’
lsyncd.c:1776: error: ‘LUA_MULTRET’ undeclared (first use in this function)
lsyncd.c:1780: warning: implicit declaration of function ‘lua_pushlightuserdata’
lsyncd.c:1782: warning: implicit declaration of function ‘lua_insert’
lsyncd.c:1784: warning: implicit declaration of function ‘lua_settable’
lsyncd.c:1784: error: ‘LUA_REGISTRYINDEX’ undeclared (first use in this function)
lsyncd.c:1789: warning: implicit declaration of function ‘lua_gettable’
lsyncd.c:1790: warning: implicit declaration of function ‘lua_pushstring’
lsyncd.c:1792: warning: implicit declaration of function ‘lua_remove’
lsyncd.c:1800: warning: assignment makes pointer from integer without a cast
lsyncd.c:1831: warning: implicit declaration of function ‘load_runner_func’
lsyncd.c:1847: warning: implicit declaration of function ‘lua_newtable’
lsyncd.c:1849: warning: implicit declaration of function ‘lua_pushnumber’
lsyncd.c:1866: warning: assignment makes pointer from integer without a cast
lsyncd.c:1930: warning: implicit declaration of function ‘lua_pushboolean’
lsyncd.c:1935: warning: implicit declaration of function ‘masterloop’
lsyncd.c:1943: error: ‘struct observance’ has no member named ‘tidy’
lsyncd.c:1965: warning: implicit declaration of function ‘lua_close’
make[1]: *** [lsyncd.o] Error 1
make: *** [all] Error 2
Any suggestions?
SOLVED IT
./configure --without-inotify --with-fsevents CFLAGS="-I /Users/calvin/xnu-1699.24.23/" LUA_CFLAGS="-I /opt/local/include" LUA_LIBS="/opt/local/lib/liblua.a"
Dependencies are:
XNU corresponding to the version of Mac OS X, http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/ for my scenario
asciidoc (which I installed through macports)
some minor syntax error in lsyncd, I have sent a pull request to the lsyncd developer https://github.com/axkibe/lsyncd
and a minor change in Makefile (after Makefile is generated from configure) from
this
doc/lsyncd.1: doc/lsyncd.1.xml
xsltproc -o $# -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<
to
doc/lsyncd.1: doc/lsyncd.1.xml
xsltproc -o $# -nonet /opt/local/etc/asciidoc/docbook-xsl/manpage.xsl $<
Then run
make
And lsyncd should be successfully compiled.