Compiling qtruby

D

DP

Hi -
I'm trying to compile qtruby and I'm having some issues.
I have tried both compiling from the kdebindings package AND from
the qtruby standalone package and the same error occurs:

The compile process always seems to die on an undefined reference to
some ruby functions. I'm using Fedora Core 2.


This is the last output from make:

/bin/sh ../../libtool --silent --mode=link --tag=CXX g++
-Wnon-virtual-dtor -Wno-long-lo ng -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subsc ripts -Wall -W
-Wpointer-arith -Wwrite-strings -O2 -Wformat-security
-Wmissing-format-att ribute -fno-exceptions -fno-check-new -fno-common
-o qtrubyinit -module -L/usr/lib -L/ usr/lib/qt-3.3/lib
-L/usr/X11R6/lib -version-info 0:0:0 -L../../smoke/qt/ -L/usr/local
/lib qtrubyinit.o -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE
-lpthread -Wl,-R -W l,/usr/local/lib -L/usr/local/lib -L.
.../../smoke/qt/libsmokeqt.la
.../../qtruby/rubylib/ qtruby/libqtrubyinternal.la
libtool: link: warning: `-version-info' is ignored for programs
qtrubyinit.o(.text+0xa): In function `main':
: undefined reference to `ruby_init'
qtrubyinit.o(.text+0x18): In function `main':
: undefined reference to `ruby_script'
qtrubyinit.o(.text+0x25): In function `main':
: undefined reference to `ruby_options'
qtrubyinit.o(.text+0x2a): In function `main':
: undefined reference to `ruby_run'
collect2: ld returned 1 exit status
make[3]: *** [qtrubyinit] Error 1
make[3]: Leaving directory
`/home/davp/downloads/kdebindings-050120/qtruby/bin'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/davp/downloads/kdebindings-050120/qtruby'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/davp/downloads/kdebindings-050120'
make: *** [all] Error 2


Any suggestions?

Thank you,
David
 
A

Alexander Kellett

quick solution:
make -k
make -k install
more useful solution:
could you give me the result of:
ruby -r rbconfig -e
'c=Config::CONFIG;mc=c.keys.map{|str|str.length}.max;puts
c.keys.sort.map {|dom| "#{dom.rjust mc+1} => #{c[dom]}"}.join "\n"'
 
D

Dave

Alexander -
Thank you for the info. Make -k continued compiling but I still could
not get qtruby to work.

Thank you!
David


[davp@parfitt kdebindings-050120]$ ruby -r rbconfig -e
'c=Config::CONFIG;mc=c.keys.map{|str|str.length}.max;puts
c.keys.sort.map {|dom| "#{dom.rjust mc+1} => #{c[dom]}"}.join "\n"'
-e:1: warning: parenthesize argument(s) for future version
ALLOCA =>
AR => ar
ARCHFILE =>
ARCH_FLAG =>
CC => gcc
CCDLFLAGS => -fPIC
CFLAGS => -g -O2 -fPIC
COMMON_HEADERS =>
COMMON_LIBS =>
COMMON_MACROS =>
CPP => gcc -E
CPPFLAGS =>
CPPOUTFILE => -o conftest.i
DESTDIR =>
DLDFLAGS =>
DLDLIBS => -lc
DLEXT => so
DLEXT2 =>
DLLWRAP =>
ECHO_C =>
ECHO_N => -n
ECHO_T =>
EGREP => grep -E
ENABLE_SHARED => yes
EXEEXT =>
EXPORT_PREFIX =>
EXTSTATIC =>
GNU_LD => yes
LDFLAGS => -rdynamic -Wl,-export-dynamic
LDSHARED => gcc -shared
LIBEXT => a
LIBOBJS =>
LIBPATHFLAG => -L'%1$-s'
LIBRUBY => libruby.so.1.8.2
LIBRUBYARG => -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -L.
-lruby
LIBRUBYARG_SHARED => -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -L.
-lruby
LIBRUBYARG_STATIC => -lruby-static
LIBRUBY_A => libruby-static.a
LIBRUBY_ALIASES => libruby.so.1.8 libruby.so
LIBRUBY_DLDFLAGS => -Wl,-soname,libruby.so.1.8
LIBRUBY_LDSHARED => gcc -shared
LIBRUBY_SO => libruby.so.1.8.2
LIBS => -ldl -lcrypt -lm
LINK_SO =>
LN_S => ln -s
LTLIBOBJS =>
MAINLIBS =>
MAJOR => 1
MAKEFILES => Makefile
MANTYPE => doc
MINIRUBY => ./miniruby
MINOR => 8
NM =>
NROFF => /usr/bin/nroff
OBJEXT => o
OUTFLAG => -o
PACKAGE_BUGREPORT =>
PACKAGE_NAME =>
PACKAGE_STRING =>
PACKAGE_TARNAME =>
PACKAGE_VERSION =>
PATH_SEPARATOR => :
PREP =>
RANLIB => ranlib
RDOCTARGET => install-doc
RPATHFLAG => -Wl,-R'%1$-s'
RUBYW_INSTALL_NAME =>
RUBY_INSTALL_NAME => ruby
RUBY_SO_NAME => ruby
SET_MAKE =>
SHELL => /bin/sh
SOLIBS => -ldl -lcrypt -lm
STATIC =>
STRIP => strip -S -x
TEENY => 2
TRY_LINK =>
WINDRES =>
XCFLAGS =>
XLDFLAGS => -L.
YACC => bison -y
abs_builddir => $(ac_abs_builddir)
abs_srcdir => $(ac_abs_srcdir)
abs_top_builddir => $(ac_abs_top_builddir)
abs_top_srcdir => $(ac_abs_top_srcdir)
ac_ct_AR => ar
ac_ct_CC => gcc
ac_ct_DLLWRAP =>
ac_ct_NM =>
ac_ct_RANLIB => ranlib
ac_ct_WINDRES =>
arch => i686-linux
archdir => /usr/local/lib/ruby/1.8/i686-linux
bindir => /usr/local/bin
build => i686-pc-linux-gnu
build_alias =>
build_cpu => i686
build_os => linux-gnu
build_vendor => pc
builddir => $(ac_builddir)
compile_dir => /home/davp/downloads/ruby-1.8.2
configure_args => '--enable-shared' '--enable-install-doc'
datadir => /usr/local/share
exec_prefix => /usr/local
host => i686-pc-linux-gnu
host_alias =>
host_cpu => i686
host_os => linux-gnu
host_vendor => pc
includedir => /usr/local/include
infodir => /usr/local/info
libdir => /usr/local/lib
libexecdir => /usr/local/libexec
localstatedir => /usr/local/var
mandir => /usr/local/man
oldincludedir => /usr/include
prefix => /usr/local
ruby_install_name => ruby
ruby_version => 1.8
rubylibdir => /usr/local/lib/ruby/1.8
rubyw_install_name =>
sbindir => /usr/local/sbin
setup => Setup
sharedstatedir => /usr/local/com
sitearch => i686-linux
sitearchdir => /usr/local/lib/ruby/site_ruby/1.8/i686-linux
sitedir => /usr/local/lib/ruby/site_ruby
sitelibdir => /usr/local/lib/ruby/site_ruby/1.8
srcdir => /home/davp/downloads/ruby-1.8.2
sysconfdir => /usr/local/etc
target => i686-pc-linux-gnu
target_alias =>
target_cpu => i686
target_os => linux
target_vendor => pc
top_builddir => $(ac_top_builddir)
 
R

Richard Dale

DP said:
Hi -
I'm trying to compile qtruby and I'm having some issues.
I have tried both compiling from the kdebindings package AND from
the qtruby standalone package and the same error occurs:

The compile process always seems to die on an undefined reference to
some ruby functions. I'm using Fedora Core 2.


This is the last output from make:

/bin/sh ../../libtool --silent --mode=link --tag=CXX g++
-Wnon-virtual-dtor -Wno-long-lo ng -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subsc ripts -Wall -W
-Wpointer-arith -Wwrite-strings -O2 -Wformat-security
-Wmissing-format-att ribute -fno-exceptions -fno-check-new -fno-common
-o qtrubyinit -module -L/usr/lib -L/ usr/lib/qt-3.3/lib
-L/usr/X11R6/lib -version-info 0:0:0 -L../../smoke/qt/ -L/usr/local
/lib qtrubyinit.o -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE
-lpthread -Wl,-R -W l,/usr/local/lib -L/usr/local/lib -L.
../../smoke/qt/libsmokeqt.la
../../qtruby/rubylib/ qtruby/libqtrubyinternal.la
libtool: link: warning: `-version-info' is ignored for programs
qtrubyinit.o(.text+0xa): In function `main':
: undefined reference to `ruby_init'
qtrubyinit.o(.text+0x18): In function `main':
: undefined reference to `ruby_script'
qtrubyinit.o(.text+0x25): In function `main':
: undefined reference to `ruby_options'
qtrubyinit.o(.text+0x2a): In function `main':
: undefined reference to `ruby_run'
collect2: ld returned 1 exit status
make[3]: *** [qtrubyinit] Error 1
make[3]: Leaving directory
`/home/davp/downloads/kdebindings-050120/qtruby/bin'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/davp/downloads/kdebindings-050120/qtruby'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/davp/downloads/kdebindings-050120'
make: *** [all] Error 2
The shared library 'libruby.so' is missing, so you need to build ruby with
the '--enable-shared' option. But you shouldn't usually need to use the
'qtrubyinit' command line tool anyway.

-- Richard
 
A

Alexander Kellett

The shared library 'libruby.so' is missing, so you need to build ruby
with
the '--enable-shared' option. But you shouldn't usually need to use the
'qtrubyinit' command line tool anyway.

see the following in the other reply:
LIBRUBY => libruby.so.1.8.2
detection seems to be wrong
i *think* there are two possible
options that can have the so name
and we should probably || the
second one just in case the first
isn't set. did this in the past
but reverted as noone else had
the problem. could you revert
the revert richard? (hope i
commited really can't recall)

thanks :)
Alex
 
D

Dave

Hi -
Even by recompiling Ruby 1.8.2 with --enable-shared, I still have the
same problem.

Thanks -
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top