BY: Derek Graham (mond)
DATE: 2007-06-20 15:16
SUBJECT: Linking problems when installing


Hi Suraj,

When I try to install ruby-vpi via gem and just doing `rake build'
in a freshly untar'd release, I get the following error:

(in /home/dergra01/dl/ruby-vpi-16.0.1)
mkdir -p obj
cd ext
rake
(in /home/dergra01/dl/ruby-vpi-16.0.1/ext)
/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/bin/ruby extconf.rb
--with-cflags= -DSYNOPSYS_VCS --with-ldflags=
checking for pthread_create() in -lpthread... yes
checking for ruby_init() in -lruby... no
checking for ruby_init() in -lruby-static... yes
creating Makefile
make -f Makefile
make: *** Warning: File `Makefile' has modification time in the
future (2007-06-20 15:11:08 > 2007-06-20 15:11:07.826615)
gcc -fPIC -DSYNOPSYS_VCS -I.
-I/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/ruby/1.8/x86_64-linux
-I/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/ruby/1.8/x86_64-linux
-I. -c vlog.c
gcc -fPIC -DSYNOPSYS_VCS -I.
-I/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/ruby/1.8/x86_64-linux
-I/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/ruby/1.8/x86_64-linux
-I. -c main.c
In file included from main.c:14:
swig_wrap.cin: In function `_wrap_vpi_vprintf':
swig_wrap.cin:5935: warning: passing arg 2 of `vpi_vprintf' makes
pointer from integer without a cast
swig_wrap.cin: In function `_wrap_vpi_mcd_vprintf':
swig_wrap.cin:5978: warning: passing arg 3 of `vpi_mcd_vprintf'
makes pointer from integer without a cast
gcc -fPIC -DSYNOPSYS_VCS -I.
-I/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/ruby/1.8/x86_64-linux
-I/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/ruby/1.8/x86_64-linux
-I. -c relay.c
gcc -shared -L'/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib'
-Wl,-R'/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib' -o ruby-vpi.so
vlog.o main.o relay.o -lruby-static -lpthread -ldl -lcrypt -lm -lc
/usr/bin/ld:
/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/libruby-static.a(array.o):
relocation R_X86_64_32 can not be used when making a shared object;
recompile with -fPIC
/arm/tools/ruby/ruby/1.8.4/rhe3-amd64/lib/libruby-static.a: could
not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [ruby-vpi.so] Error 1
rake aborted!
Command failed with status (2): [make -f Makefile...]
/home/dergra01/dl/ruby-vpi-16.0.1/ext/Rakefile:19
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [rake...]
/home/dergra01/dl/ruby-vpi-16.0.1/Rakefile:89
(See full trace by running task with --trace)

I've tried doing:

$ make DLDFLAGS=-fPIC

but I still get the same error.

Some system info:

Red Hat Enterprise Linux WS release 3
ruby 1.8.4 [x86_64-linux]
rubygems 0.9.4

$GEM_HOME = ~/tools/ruby/rubygems/0.9.4/rhe3-amd64/gems/1.8
$GEM_PATH =
~/tools/ruby/rubygems/0.9.4/common/gems/1.8:~/tools/ruby/rubygems/0.9.4/rhe3-amd64/gems/1.8
$RUBYLIB =
~/tools/ruby/rubygems/0.9.4/common/site_ruby/1.8:~/tools/ruby/rubygems/0.9.4/rhe3-amd64


Thanks in advance,

Derek

Reply via email to