Difficulty building a Ruby gem with C extension on 10.0
Christian Campbell
dcamp at alumni.ufl.edu
Sun May 18 02:18:54 UTC 2014
I've been having trouble installing a Ruby gem, rqr, which builds a C
extension. (Also, I had to export MAKE=make to get Ruby itself to build.)
The gem built fine on 9.something, but I haven't been able to figure it out
on 10.0-RELEASE. Any ideas? Here are some of my attempts:
% uname -a
FreeBSD rekha.dccjr.com 10.0-RELEASE-p3 FreeBSD 10.0-RELEASE-p3 #2: Wed May
14 13:52:35 EDT 2014 root at rekha.dccjr.com:/usr/obj/usr/src/sys/REKHA
amd64
% cat conftest.c
#include "ruby.h"
int main(int argc, char **argv)
{
return 0;
}
% cc -o conftest
-I/home/dcamp/.rbenv/versions/1.9.3-p545/include/ruby-1.9.1/x86_64-freebsd10.0
-I/home/dcamp/.rbenv/versions/1.9.3-p545/include/ruby-1.9.1/ruby/backward
-I/home/dcamp/.rbenv/versions/1.9.3-p545/include/ruby-1.9.1 -I.
-I/home/dcamp/.rbenv/versions/1.9.3-p545/include
-I/home/dcamp/.rbenv/versions/1.9.3-p545/include -O3
-Wno-error=shorten-64-to-32 conftest.c -L.
-L/home/dcamp/.rbenv/versions/1.9.3-p545/lib
-Wl,-R/home/dcamp/.rbenv/versions/1.9.3-p545/lib -L.
-L/home/dcamp/.rbenv/versions/1.9.3-p545/lib -rdynamic -lsupc++ -Wl,-R
-Wl,/home/dcamp/.rbenv/versions/1.9.3-p545/lib
-L/home/dcamp/.rbenv/versions/1.9.3-p545/lib -lruby-static -lthr -lrt
-lcrypt -lm -lc -Wl,--verbose
GNU ld 2.17.50 [FreeBSD] 2007-07-03
Supported emulations:
elf_x86_64_fbsd
elf_i386_fbsd
using internal linker script:
==================================================
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd",
"elf64-x86-64-freebsd")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
</snip>
==================================================
attempt to open /usr/lib/crt1.o succeeded
/usr/lib/crt1.o
attempt to open /usr/lib/crti.o succeeded
/usr/lib/crti.o
attempt to open /usr/lib/crtbegin.o succeeded
/usr/lib/crtbegin.o
attempt to open /tmp/conftest-ISTIH0.o succeeded
/tmp/conftest-ISTIH0.o
attempt to open ./libsupc++.so failed
attempt to open ./libsupc++.a failed
attempt to open /home/dcamp/.rbenv/versions/1.9.3-p545/lib/libsupc++.so
failed
attempt to open /home/dcamp/.rbenv/versions/1.9.3-p545/lib/libsupc++.a
failed
attempt to open ./libsupc++.so failed
attempt to open ./libsupc++.a failed
attempt to open /home/dcamp/.rbenv/versions/1.9.3-p545/lib/libsupc++.so
failed
attempt to open /home/dcamp/.rbenv/versions/1.9.3-p545/lib/libsupc++.a
failed
attempt to open /home/dcamp/.rbenv/versions/1.9.3-p545/lib/libsupc++.so
failed
attempt to open /home/dcamp/.rbenv/versions/1.9.3-p545/lib/libsupc++.a
failed
attempt to open /usr/lib/libsupc++.so failed
attempt to open /usr/lib/libsupc++.a failed
attempt to open /usr/bin/../libdata/libsupc++.so failed
attempt to open /usr/bin/../libdata/libsupc++.a failed
attempt to open /lib/libsupc++.so failed
attempt to open /lib/libsupc++.a failed
attempt to open /usr/lib/libsupc++.so failed
attempt to open /usr/lib/libsupc++.a failed
/usr/bin/ld: cannot find -lsupc++
Adding two lines to libmap.conf resulted in the same output:
% cat /etc/libmap.conf
# $FreeBSD: release/10.0.0/etc/libmap.conf 253853 2013-08-01 05:50:42Z jlh $
includedir /usr/local/etc/libmap.d
libsupc++.so.1 libcxxrt.so.1
libsupc++.so libcxxrt.so
More information about the freebsd-questions
mailing list