Hi,
I’m trying to compile libxml-ruby under FreeBSD, and it won’t
compile. One of the notes with the gem says I should use gcc 4.0 to
compile – I installed gcc 4.0, but not as my native compiler, so I
need to somehow specify my new compiler, when I install libxml-ruby.
I’m sure there is a way to do this, but I can’t find any documentation
for this.
Charlie
On Wed, 15 Aug 2007, charlie caroff wrote:
Hi,
I’m trying to compile libxml-ruby under FreeBSD, and it won’t
compile. One of the notes with the gem says I should use gcc 4.0 to
compile – I installed gcc 4.0, but not as my native compiler, so I
need to somehow specify my new compiler, when I install libxml-ruby.
I’m sure there is a way to do this, but I can’t find any documentation
for this.
Have you tried (sh syntax): CC=/my/compiler/bin/gcc ; export CC,
or (csh syntax): setenv CC /my/compiler/bin/gcc
to see if that gets picked up?
Charlie
Hugh
That works, thanks. Still not compiling, though. I’m getting this
error when I try to install libxml-ruby from gems:
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i386-freebsd6.2 -I. -I/usr/local/
include/libxml2 -DRUBY_EXTCONF_H=“extconf.h” -fPIC -g -O2 -Wall -I. -
I/usr/local/lib/ruby/1.8/i386-freebsd6.2 -I. -I/usr/local/include/
libxml2 -c ruby_xml_xpath.c
In file included from /usr/local/include/libxml2/libxml/parser.h:796,
from libxml.h:19,
from ruby_xml_xpath.c:5:
/usr/local/include/libxml2/libxml/encoding.h:28:19: iconv.h: No such
file or directory
In file included from /usr/local/include/libxml2/libxml/parser.h:796,
from libxml.h:19,
from ruby_xml_xpath.c:5:
/usr/local/include/libxml2/libxml/encoding.h:135: error: syntax error
before “ifdef”
/usr/local/include/libxml2/libxml/encoding.h:139: warning: no
semicolon at end of struct or union
*** Error code 1
Stop in /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4/ext/xml.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/
libxml-ruby-0.3.8.4 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/libxml-
ruby-0.3.8.4/ext/xml/gem_make.out
################
I have iconv installed from FreeBSD ports – i’m stumped