B
Brian Candler
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I am building ruby-1.8.2p2 under FreeBSD-5.2.1, but I am unable to get the
gdbm and iconv modules built. I have gdbm-1.8.3 and libiconv-1.9.1 installed
from ports. This is what I'm doing:
export LDFLAGS="-L/usr/local/lib"
export CPPFLAGS="-I/usr/local/include"
./configure
make
However, the modules iconv and gdbm are skipped over. ext/gdbm/mkmf.log and
ext/iconv/mkmf.log are attached.
As far as I can see:
- gdbm is skipped because -L/usr/local/lib is missing from the command line
it passes to gcc when testing for its existence (although
-I/usr/local/linclude *is* passed in).
- iconv is skipped for a similar reason, although it first tries to call
iconv() with the wrong set of arguments.
rbconfig.rb contains these two lines:
CONFIG["LDFLAGS"] = "-L/usr/local/lib -rdynamic"
CONFIG["configure_args"] = " 'CPPFLAGS=-I/usr/local/include' 'LDFLAGS=-L/usr/local/lib'"
so I think my LDFLAGS setting was picked up OK.
Is this a bug in mkmf? Or is there something else I need to do to make these
modules compile?
Thanks...
Brian Candler.
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mkmf.log"
have_library: checking for gdbm_open() in -lgdbm... -------------------- no
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lgdbm -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lgdbm
checked program was:
/* begin */
/*top*/
int main() { return 0; }
int t() { gdbm_open(); return 0; }
/* end */
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lgdbm -lcrypt -lm -lc"
conftest.c: In function `t':
conftest.c:5: error: `gdbm_open' undeclared (first use in this function)
conftest.c:5: error: (Each undeclared identifier is reported only once
conftest.c:5: error: for each function it appears in.)
checked program was:
/* begin */
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))gdbm_open; return 0; }
/* end */
--------------------
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mkmf.log"
have_func: checking for iconv()... -------------------- no
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lcrypt -lm -lc"
conftest.c: In function `t':
conftest.c:5: error: too few arguments to function `libiconv'
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { iconv(); return 0; }
/* end */
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lcrypt -lm -lc"
/var/tmp//ccvG6OM4.o: In function `t':
/v/build/ruby-1.8.2/ext/iconv/conftest.c:6: undefined reference to `libiconv'
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))iconv; return 0; }
/* end */
--------------------
have_library: checking for iconv() in -liconv... -------------------- no
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -liconv -lcrypt -lm -lc"
conftest.c: In function `t':
conftest.c:4: error: too few arguments to function `libiconv'
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { iconv(); return 0; }
/* end */
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -liconv -lcrypt -lm -lc"
/usr/bin/ld: cannot find -liconv
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))iconv; return 0; }
/* end */
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I am building ruby-1.8.2p2 under FreeBSD-5.2.1, but I am unable to get the
gdbm and iconv modules built. I have gdbm-1.8.3 and libiconv-1.9.1 installed
from ports. This is what I'm doing:
export LDFLAGS="-L/usr/local/lib"
export CPPFLAGS="-I/usr/local/include"
./configure
make
However, the modules iconv and gdbm are skipped over. ext/gdbm/mkmf.log and
ext/iconv/mkmf.log are attached.
As far as I can see:
- gdbm is skipped because -L/usr/local/lib is missing from the command line
it passes to gcc when testing for its existence (although
-I/usr/local/linclude *is* passed in).
- iconv is skipped for a similar reason, although it first tries to call
iconv() with the wrong set of arguments.
rbconfig.rb contains these two lines:
CONFIG["LDFLAGS"] = "-L/usr/local/lib -rdynamic"
CONFIG["configure_args"] = " 'CPPFLAGS=-I/usr/local/include' 'LDFLAGS=-L/usr/local/lib'"
so I think my LDFLAGS setting was picked up OK.
Is this a bug in mkmf? Or is there something else I need to do to make these
modules compile?
Thanks...
Brian Candler.
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mkmf.log"
have_library: checking for gdbm_open() in -lgdbm... -------------------- no
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lgdbm -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lgdbm
checked program was:
/* begin */
/*top*/
int main() { return 0; }
int t() { gdbm_open(); return 0; }
/* end */
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lgdbm -lcrypt -lm -lc"
conftest.c: In function `t':
conftest.c:5: error: `gdbm_open' undeclared (first use in this function)
conftest.c:5: error: (Each undeclared identifier is reported only once
conftest.c:5: error: for each function it appears in.)
checked program was:
/* begin */
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))gdbm_open; return 0; }
/* end */
--------------------
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mkmf.log"
have_func: checking for iconv()... -------------------- no
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lcrypt -lm -lc"
conftest.c: In function `t':
conftest.c:5: error: too few arguments to function `libiconv'
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { iconv(); return 0; }
/* end */
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -lcrypt -lm -lc"
/var/tmp//ccvG6OM4.o: In function `t':
/v/build/ruby-1.8.2/ext/iconv/conftest.c:6: undefined reference to `libiconv'
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))iconv; return 0; }
/* end */
--------------------
have_library: checking for iconv() in -liconv... -------------------- no
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -liconv -lcrypt -lm -lc"
conftest.c: In function `t':
conftest.c:4: error: too few arguments to function `libiconv'
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { iconv(); return 0; }
/* end */
"gcc -o conftest -I/v/build/ruby-1.8.2 -I/v/build/ruby-1.8.2 -I/usr/local/include -g -O2 conftest.c -L"/v/build/ruby-1.8.2" -lruby-static -liconv -lcrypt -lm -lc"
/usr/bin/ld: cannot find -liconv
checked program was:
/* begin */
#include <iconv.h>
/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))iconv; return 0; }
/* end */