Error installing ruby gem ibm_db with DB2 client - ruby-on-rails

I am getting the following error:
gem install ibm_db
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing ibm_db:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ibm_db-3.0.4/ext
C:/Ruby21-x64/bin/ruby.exe -r ./siteconf20171018-4480-1i7vx9n.rb extconf.rb
Detected 64-bit Ruby
Detected usage of IBM Data Server Driver package. Ensure you have downloaded 64-bit package of IBM_Data_Server_Driver and retry the 'gem install ibm_db' command
creating gil_release_version
creating unicode_support_version
checking for SQLConnect() in -ldb2cli... yes
checking for gil_release_version... yes
checking for unicode_support_version... yes
creating Makefile
current directory: C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ibm_db-3.0.4/ext
make "DESTDIR=" clean
current directory: C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ibm_db-3.0.4/ext
make "DESTDIR="
generating ibm_db-x64-mingw32.def
compiling ibm_db.c
In file included from C:\Program Files\IBM\SQLLIB/include/sqlcli.h:983:0,
from C:\Program Files\IBM\SQLLIB/include/sqlcli1.h:45,
from ruby_ibm_db_cli.h:52,
from ibm_db.c:27:
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1748:5: error: unknown type name '__in_ecount'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1751:5: error: unknown type name '__out_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1754:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1865:5: error: unknown type name '__in_ecount'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1868:5: error: unknown type name '__out_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1871:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1891:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1894:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1897:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1900:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1907:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1909:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1911:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1913:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1920:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1922:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1927:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1930:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1933:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1936:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1939:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1942:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1952:5: error: unknown type name '__in_ecount'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1954:5: error: unknown type name '__out_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1961:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1971:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1974:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1977:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1983:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1986:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1989:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1992:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:1998:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2001:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2004:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2018:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2021:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2024:5: error: unknown type name '__in_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2031:5: error: unknown type name '__out_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2034:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2036:5: error: unknown type name '__out_ecount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2039:5: error: unknown type name '__out_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2087:5: error: unknown type name '__out'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2128:5: error: unknown type name '__in_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2129:5: error: unknown type name '__out_bcount_opt'
C:\Program Files\IBM\SQLLIB/include/sqlext.h:2130:5: error: unknown type name '__in'
ibm_db.c:104:0: warning: "STRCASECMP" redefined [enabled by default]
In file included from c:/Ruby21-x64/include/ruby-2.1.0/ruby.h:33:0,
from ibm_db.c:21:
c:/Ruby21-x64/include/ruby-2.1.0/ruby/ruby.h:1783:0: note: this is the location of the previous definition
ibm_db.c: In function '_ruby_ibm_db_free_conn_struct':
ibm_db.c:490:7: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
ibm_db.c: In function 'ibm_Ruby_Thread_Call':
ibm_db.c:696:5: warning: implicit declaration of function 'rb_thread_call_without_gvl' [-Wimplicit-function-declaration]
ibm_db.c: In function '_ruby_ibm_db_free_stmt_handle_and_resources':
ibm_db.c:718:7: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
ibm_db.c: In function '_ruby_ibm_db_assign_options':
ibm_db.c:1430:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ibm_db.c:1513:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ibm_db.c: In function '_ruby_ibm_db_connect_helper2':
ibm_db.c:2181:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ibm_db.c:2360:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ibm_db.c: In function '_ruby_ibm_db_connect_helper':
ibm_db.c:2538:26: warning: comparison between pointer and integer [enabled by default]
ibm_db.c: In function 'ibm_db_createDBNX':
ibm_db.c:3255:9: warning: unused variable 'return_value' [-Wunused-variable]
ibm_db.c: In function 'ibm_db_autocommit':
ibm_db.c:3328:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ibm_db.c: In function '_ruby_ibm_db_bind_parameter_helper':
ibm_db.c:6232:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ibm_db.c:6256:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ibm_db.c: In function 'ibm_db_execute':
ibm_db.c:7108:73: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ibm_db.c: In function 'ibm_db_field_type':
ibm_db.c:8415:30: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8438:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8446:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8449:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8452:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8455:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8458:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8461:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8464:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c:8467:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
ibm_db.c: In function 'ibm_db_result_cols':
ibm_db.c:10126:9: warning: unused variable 'ret_val' [-Wunused-variable]
ibm_db.c: In function 'ibm_db_server_info':
ibm_db.c:11252:17: warning: the comparison will always evaluate as 'false' for the address of 'connection' will never be NULL [-Waddress]
ibm_db.c: At top level:
ibm_db.c:48:13: warning: '_ruby_ibm_db_set_decfloat_rounding_mode_client' declared 'static' but never defined [-Wunused-function]
ibm_db.c:49:14: warning: '_ruby_ibm_db_instance_name' defined but not used [-Wunused-variable]
ibm_db.c:2592:12: warning: '_ruby_ibm_db_set_decfloat_rounding_mode_client_helper' defined but not used [-Wunused-function]
ibm_db.c: In function '_ruby_ibm_db_connect_helper2':
ibm_db.c:2433:1: warning: control reaches end of non-void function [-Wreturn-type]
ibm_db.c: In function 'ibm_Ruby_Thread_Call':
ibm_db.c:710:3: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [ibm_db.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ibm_db-3.0.4 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/ibm_db-3.0.4/gem_make.out
I am trying to develop in local Ruby on Rails to a remote DB2 database, I have set global variables pointing to my DB2 cli and db2dsdriver.cfg config file with connection settings.
I have tried also with IBM data server driver package and cli is not detected.
Any advice? How can I install the ibm_db gem and connect to DB2??
======LoG: ===========================================================
gil_release_version is:
/* begin */
1: #ifndef GIL_RELEASE_VERSION
2: #define GIL_RELEASE_VERSION
3: #endif
/* end */
unicode_support_version is:
/* begin */
1: #ifndef UNICODE_SUPPORT_VERSION
2: #define UNICODE_SUPPORT_VERSION
3: #endif
/* end */
have_library: checking for SQLConnect() in -ldb2cli... -------------------- yes
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby21-x64/include/ruby-2.1.0/x64-mingw32 -IC:/Ruby21-x64/include/ruby-2.1.0/ruby/backward -IC:/Ruby21-x64/include/ruby-2.1.0 -I. "-IC:\Program Files\IBM\SQLLIB/include" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby21-x64/lib -L"C:\Program Files\IBM\SQLLIB/lib" -L. -lx64-msvcrt-ruby210 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby21-x64/include/ruby-2.1.0/x64-mingw32 -IC:/Ruby21-x64/include/ruby-2.1.0/ruby/backward -IC:/Ruby21-x64/include/ruby-2.1.0 -I. "-IC:\Program Files\IBM\SQLLIB/include" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby21-x64/lib -L"C:\Program Files\IBM\SQLLIB/lib" -L. -lx64-msvcrt-ruby210 -ldb2cli -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:16:57: error: 'SQLConnect' undeclared (first use in this function)
conftest.c:16:57: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:16:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int main(int argc, char **argv)
9: {
10: if (argc > 1000000) {
11: printf("%p", &t);
12: }
13:
14: return 0;
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))SQLConnect; return 0; }
/* end */
"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby21-x64/include/ruby-2.1.0/x64-mingw32 -IC:/Ruby21-x64/include/ruby-2.1.0/ruby/backward -IC:/Ruby21-x64/include/ruby-2.1.0 -I. "-IC:\Program Files\IBM\SQLLIB/include" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/Ruby21-x64/lib -L"C:\Program Files\IBM\SQLLIB/lib" -L. -lx64-msvcrt-ruby210 -ldb2cli -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
conftest.c: In function 't':
conftest.c:16:1: warning: implicit declaration of function 'SQLConnect' [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5:
6: /*top*/
7: extern int t(void);
8: int main(int argc, char **argv)
9: {
10: if (argc > 1000000) {
11: printf("%p", &t);
12: }
13:
14: return 0;
15: }
16: int t(void) { SQLConnect(); return 0; }
/* end */
--------------------
have_header: checking for gil_release_version... -------------------- yes
"x86_64-w64-mingw32-gcc -E -IC:/Ruby21-x64/include/ruby-2.1.0/x64-mingw32 -IC:/Ruby21-x64/include/ruby-2.1.0/ruby/backward -IC:/Ruby21-x64/include/ruby-2.1.0 -I. "-IC:\Program Files\IBM\SQLLIB/include" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <gil_release_version>
/* end */
--------------------
have_header: checking for unicode_support_version... -------------------- yes
"x86_64-w64-mingw32-gcc -E -IC:/Ruby21-x64/include/ruby-2.1.0/x64-mingw32 -IC:/Ruby21-x64/include/ruby-2.1.0/ruby/backward -IC:/Ruby21-x64/include/ruby-2.1.0 -I. "-IC:\Program Files\IBM\SQLLIB/include" -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <unicode_support_version>
/* end */
--------------------
I am using...
Ruby 2.1.5
Devkit-mingw64-64-4.7.2-20130224-1432-sfx
Gem ibm_db 3.0.4 x86-mingw32
IBM data server client 10.5
Over Windows 10
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.13
- RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [x64-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby21-x64/lib/ruby/gems/2.1.0
- USER INSTALLATION DIRECTORY: C:/Users/mypc/.gem/ruby/2.1.0
- RUBY EXECUTABLE: C:/Ruby21-x64/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby21-x64/bin
- SPEC CACHE DIRECTORY: C:/Users/mypc/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
- RUBYGEMS PLATFORMS:
- ruby
- x64-mingw32
- GEM PATHS:
- C:/Ruby21-x64/lib/ruby/gems/2.1.0
- C:/Users/mypc/.gem/ruby/2.1.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- C:\Program Files (x86)\Intel\iCLS Client\
- C:\Program Files\Intel\iCLS Client\
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0\
- C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
- C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
- C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
- C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
- C:\PROGRA~1\IBM\SQLLIB\BIN
- C:\PROGRA~1\IBM\SQLLIB\FUNCTION
- C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL
- C:\Ruby23-x64\bin
- C:\Ruby24-x64\bin
- C:\Ruby21-x64\bin
- C:\Users\mypc\AppData\Local\Microsoft\WindowsApps

Related

Error in "make" command while installing ruby1.9.3 in Kali

I am running Kali,
Trying to install ruby1.9.3 after having successfully installed SNORT, PULLEDPORK an BARNYARD2
%%%%%% EXECUTING THESE COMMANDS
1) %%% wget https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p551.tar.gz
2) %%% tar -xvzf ruby-1.9.3-p551.tar.gz
3) %%% cd ruby-1.9.3-p551
4) %%% ./configure
5) %%% make
6) %%% make install
1st 3 commands run OK,
getting ERRORS n Warnings on (5) make command.
Output like this:-
root#kali:~/snort_src/ruby-1.9.3-p551# make
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I.
DLDFLAGS =
SOLIBS =
linking miniruby
rbconfig.rb unchanged
generating enc.mk
generating prelude.c
compiling prelude.c
linking static-library libruby-static.a
ar: `u' modifier ignored since `D' is the default (see `U')
generating encdb.h
encdb.h unchanged
making enc
make[1]: Entering directory '/root/snort_src/ruby-1.9.3-p551'
make[1]: Nothing to be done for 'enc'.
.
.
.
compiling ossl_ssl.c
ossl_ssl.c:116:27: error: ‘SSLv3_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3),
^
ossl_ssl.c:106:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:117:27: error: ‘SSLv3_server_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
^
ossl_ssl.c:106:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:118:27: error: ‘SSLv3_client_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
^
ossl_ssl.c:106:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c: In function ‘ossl_sslctx_session_new_cb’:
ossl_ssl.c:382:35: warning: variable ‘ret_obj’ set but not used [-Wunused-but-set-variable]
VALUE ary, ssl_obj, sess_obj, ret_obj;
^
ossl_ssl.c: In function ‘ossl_sslctx_session_remove_cb’:
ossl_ssl.c:431:38: warning: variable ‘ret_obj’ set but not used [-Wunused-but-set-variable]
VALUE ary, sslctx_obj, sess_obj, ret_obj;
^
ossl_ssl.c: In function ‘ssl_servername_cb’:
ossl_ssl.c:508:25: warning: variable ‘ret_obj’ set but not used [-Wunused-but-set-variable]
VALUE ary, ssl_obj, ret_obj;
^
Makefile:269: recipe for target 'ossl_ssl.o' failed
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory '/root/snort_src/ruby-1.9.3-p551/ext/openssl'
exts.mk:126: recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory '/root/snort_src/ruby-1.9.3-p551'
uncommon.mk:178: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
Kindly suggest a way out.

Gem install fails on windows. mkmf.log cannot find -lX11

I am trying to install rmagick gem on for my rails framework.
I have installed imagemagick and set lib and include path in system variables
But when installing gem install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6.7.9-Q8"' i still get errors.
gem command
C:\sites\redmine> gem install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6.7.9-Q8"'
gem.bat : ERROR: While executing gem ... (OptionParser::InvalidOption)
At line:1 char:4
+ gem <<<< install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6
.7.9-Q8"'
+ CategoryInfo : NotSpecified: (ERROR: While e...:InvalidOption)
:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
invalid option: --with-opt-dir=c:\RailsInstaller\ImageMagick-6.7.9-Q8
mkmf.log file says
assert_minimum_ruby_version!: checking for Ruby version >= 1.8.5... -------------------- yes
--------------------
"gcc -o conftest.exe -IC:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/i386-mingw32 -IC:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0/ruby/backward -IC:/RailsInstaller/Ruby2.1.0/include/ruby-2.1.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -LC:/RailsInstaller/Ruby2.1.0/lib -L. -lCORE_RL_magick_ -lX11 -lmsvcrt-ruby210 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
c:/railsinstaller/devkit/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lCORE_RL_magick_
c:/railsinstaller/devkit/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lX11
collect2.exe: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7: return 0;
8: }
/* end */
From log it is clear that devkit is not able to locate ImageMagick
But i have set it PATH = C:\RailsInstaller\ImageMagick-6.7.9-Q8
Have you considered developing with nitrous io? Developing rails in windows is much harder because there are a lot of errors you have to deal with that others don't and there's not a whole lot of documentation/support. Most answers boil down to something like "windows and rails don't mix".

Error installing atomic JDK8 required?

I read Error Installing Atomic.
But my problem is different:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
*** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/pills/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
--with-atomic_reference-dir
--without-atomic_reference-dir
--with-atomic_reference-include
--without-atomic_reference-include=${atomic_reference-dir}/include
--with-atomic_reference-lib
--without-atomic_reference-lib=${atomic_reference-dir}/lib
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:712:in `try_run'
from extconf.rb:26:in `<main>'
From atomic web page I read that atomic requires JDK8, I installed it, I am in OS X 10.9.
Some other useful information:
$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
$ /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b114)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b56, mixed mode)
How should I reference JDK8 when installing this gem? is that the issue?
More useful output?
cat /Users/pills/.rvm/gems/ruby-1.9.3-p448/gems/atomic-1.1.14/ext/mkmf.log
"/usr/local/bin/gcc-4.2 -o conftest -I/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/x86_64-darwin12.4.0 -I/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/backward -I/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/pills/.rvm/rubies/ruby-1.9.3-p448/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.1.9.1 -lpthread -ldl -lobjc "
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:48:21: error: string.h: No such file or directory
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:58:21: error: stdint.h: No such file or directory
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:61:23: error: inttypes.h: No such file or directory
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:65:19: error: stdio.h: No such file or directory
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:67,
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/defines.h:29:21: error: stdlib.h: No such file or directory
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:74:20: error: alloca.h: No such file or directory
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:178,
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h:10:25: error: limits.h: No such file or directory
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:1383,
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:36:23: error: sys/types.h: No such file or directory
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:40:22: error: sys/time.h: No such file or directory
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:43,
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:1383,
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/st.h:130: error: expected declaration specifiers or '...' before 'uint32_t'
In file included from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/ruby.h:1383,
from /Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby.h:32,
from conftest.c:1:
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:294: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rb_fdset_t'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:389: error: expected declaration specifiers or '...' before 'fd_set'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:389: error: expected declaration specifiers or '...' before 'fd_set'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:389: error: expected declaration specifiers or '...' before 'fd_set'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:389: warning: 'struct timeval' declared inside parameter list
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:389: warning: its scope is only this definition or declaration, which is probably not what you want
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:390: error: expected declaration specifiers or '...' before 'rb_fdset_t'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:390: error: expected declaration specifiers or '...' before 'rb_fdset_t'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:390: error: expected declaration specifiers or '...' before 'rb_fdset_t'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:390: warning: 'struct timeval' declared inside parameter list
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:391: warning: 'struct timeval' declared inside parameter list
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:563: error: expected declaration specifiers or '...' before 'pid_t'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:581: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rb_fork'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:582: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rb_fork_err'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:584: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rb_waitpid'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:585: error: expected ')' before 'pid'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:586: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rb_spawn'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:587: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rb_spawn_err'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:589: error: expected ')' before 'pid'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:708: error: expected declaration specifiers or '...' before 'uint32_t'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:833: error: expected ')' before 'long'
/Users/pills/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/intern.h:834: error: expected ')' before 'long'
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
I did not require JDK8, I did:
xcode-select --install
gem install atomic -v '1.1.14
And it worked.

Struggling to install pg gem on OSX Lion - "missing required architecture x86_64 in file for architecture x86_64"

I'm having trouble installing the PostgreSQL gem on OSX Lion. After running gem install pg I get the following output after the makefile is created:
make
/usr/bin/gcc-4.2 -I. -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/include -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o compat.o -c compat.c
/usr/bin/gcc-4.2 -I. -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/include -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o pg.o -c pg.c
pg.c: In function ‘pgconn_exec’:
pg.c:947: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c:986: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_prepare’:
pg.c:1052: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_exec_prepared’:
pg.c:1143: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c:1173: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_s_escape’:
pg.c:1317: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c:1324: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_send_query’:
pg.c:1497: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c:1536: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_send_prepare’:
pg.c:1601: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_send_query_prepared’:
pg.c:1690: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c:1721: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_wait_for_notify’:
pg.c:2096: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_put_copy_data’:
pg.c:2166: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘pgconn_block’:
pg.c:2579: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c:2585: warning: format not a string literal and no format arguments
pg.c:2600: warning: format not a string literal and no format arguments
pg.c: In function ‘pgconn_locreate’:
pg.c:2863: warning: implicit conversion shortens 64-bit value into a 32-bit value
pg.c: In function ‘find_or_create_johab’:
pg.c:3933: warning: comparison between signed and unsigned
pg.c:3939: warning: comparison between signed and unsigned
pg.c: In function ‘pgconn_get_client_encoding_as_rb_encoding’:
pg.c:3967: warning: comparison between signed and unsigned
pg.c: In function ‘pgconn_get_rb_encoding_as_pg_encname’:
pg.c:3999: warning: comparison between signed and unsigned
pg.c: In function ‘pgconn_internal_encoding_set’:
pg.c:4058: warning: comparison between signed and unsigned
pg.c: In function ‘pgconn_external_encoding’:
pg.c:4114: warning: comparison between signed and unsigned
/usr/bin/gcc-4.2 -dynamic -bundle -o pg_ext.bundle compat.o pg.o -L. -L/Users/Stuart/.rvm/rubies/ruby-1.9.2-p290/lib -L. -L/usr/local/lib -L/usr/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpq -lpthread -ldl -lobjc
ld: in /usr/local/lib/libssl.0.9.8.dylib, missing required architecture x86_64 in file for architecture x86_64
collect2: ld returned 1 exit status
make: *** [pg_ext.bundle] Error 1
Any ideas? I've not used Postgre on OSX before, so may be an issue with my install?
It looks like you are trying to install a 64-bit version on a 32-bit machine. Check to make sure that you downloaded the right version for your OS.
I had this exact same problem on OS Lion. I solved it by entering the following (after checking out the postgresql requirements):
rm Gemfile.lock
brew install readline (I'm not sure if this is needed here, but it is a dependency for postgresql and I already had the most up-to-date version of ossp-uuid)
brew unlink postgresql
brew install postgresql (this took about 4 minutes to execute)
bundle install
I hope this helps you out!

Rails 2.3.8 won't run on Passenger after upgrade to Ruby EE - iconv error

I just installed Ruby EE 11.01. I had a Rails 2.3.8 application that was running against Passenger 3.0.2 on Apache2. Now, my application will not come up. The error is:
no such file to load -- iconv
I am on Mac OS X 10.6.4. I installed Ruby EE with:
sudo ./installer -c --with-openssl-dir=/opt/local -c --with-readline-dir=/opt/local -c --with-iconv-dir=/opt/local
"which iconv" yields:
/opt/local/bin/iconv
Attempting to install gem iconv yields:
Building native extensions. This could take a while...
ERROR: Error installing iconv:
ERROR: Failed to build gem native extension.
/opt/ruby-enterprise-1.8.7-2011.01/bin/ruby extconf.rb
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... 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.
is my iconv path wrong in the install line? Help!
EDIT:
Looking in the log file above I see this:
checked program was:
/* begin */
1: #include <iconv.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))iconv; return 0; }
/* end */
"gcc -o conftest -I. -I/opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/1.8/i686-darwin10.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -g -O2 -pipe -fno-common conftest.c -L. -L/opt/ruby-enterprise-1.8.7-2011.01/lib -L. - lruby-static -ldl -lobjc "
conftest.c: In function 't':
conftest.c:5: error: too few arguments to function 'libiconv'
checked program was:
/* begin */
1: #include <iconv.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { iconv(); return 0; }
/* end */
--------------------
have_library: checking for iconv() in -liconv... -------------------- no
"gcc -o conftest -I. -I/opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/1.8/i686-darwin10.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -g -O2 -pipe -fno-common conftest.c -L. -L/opt/ruby-enterprise-1.8.7-2011.01/lib -L. - lruby-static -liconv -ldl -lobjc "
Undefined symbols:
"_libiconv", referenced from:
_t in ccxx7BhR.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <iconv.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))iconv; return 0; }
/* end */
"gcc -o conftest -I. -I/opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/1.8/i686-darwin10.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -g -O2 -pipe -fno-common conftest.c -L. -L/opt/ruby-enterprise-1.8.7-2011.01/lib -L. - lruby-static -liconv -ldl -lobjc "
conftest.c: In function 't':
conftest.c:5: error: too few arguments to function 'libiconv'
checked program was:
/* begin */
1: #include <iconv.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { iconv(); return 0; }
/* end */
--------------------
I highly recommend using RVM on Mac OS. It's extremely easy to install and it handles downloading and compiling the environment with readline, iconv, openssl, zlib, etc. I can't tell you how many hours it's saved me.
http://rvm.beginrescueend.com/
Back to your question - did you try gem install iconv -- --with-iconv-dir=/opt/local ?

Resources