BY: Derek Graham (mond)
DATE: 2007-06-25 10:25
SUBJECT: RE: Linking problems when installing


$ pwd
/home/dergra01/dl/ruby-vpi-16.0.1

$ rake clobber build CFLAGS=-fPIC
(in /home/dergra01/dl/ruby-vpi-16.0.1)
cd ext
rake clean
/home/dergra01/tools/ruby/rubygems/0.9.4/rhe3-amd64/gems/1.8/bin/rake:9:in
`require': no such file to load -- rubygems (LoadError)
from
/home/dergra01/tools/ruby/rubygems/0.9.4/rhe3-amd64/gems/1.8/bin/rake:9
rake aborted!
Command failed with status (1): [rake clean...]
/home/dergra01/dl/ruby-vpi-16.0.1/Rakefile:61
(See full trace by running task with --trace)

But,

$ cd ext
$ rake clobber
(in /home/dergra01/dl/ruby-vpi-16.0.1/ext)
rm -r Makefile
rm -r mkmf.log
rm -r vlog.o
rm -r main.o
rm -r relay.o

`rake build' doesn't work here so,

$ cd ..
$ rake build CFLAGS=-fPIC LDFLAGS=-fPIC
(in /home/dergra01/dl/ruby-vpi-16.0.1)
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=-fPIC -DICARUS_VERILOG --with-ldflags=-fPIC
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
gcc -fPIC -fPIC -DICARUS_VERILOG -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 -fPIC -DICARUS_VERILOG -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 -fPIC -DICARUS_VERILOG -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 -fPIC -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)


:(

-- 
Derek

Reply via email to