O
OliverMarchand
Dear Rubyists,
I am encountering trouble compiling with RubyInline. Inside rubyinline
there is a construction of the command to create the library file:
cmd = "#{Config::CONFIG['LDSHARED']} #{flags}
#{Config::CONFIG['CFLAGS']} -I #{hdrdir} -o #{so_name} #{src_name}
#{libs}" [line 368 in inline.rb]
On my machine/installation this command fails with:
Building /users/obroeker/.ruby_inline/Inline_Example_58ed.so with
'/apps/gnu/bin/ld -shared -g -O2 -I
/users/obroeker/lib/ruby/1.8/mips-irix6.5 -o
/users/obroeker/.ruby_inline/Inline_Example_58ed.so
/users/obroeker/.ruby_inline/Inline_Example_58ed.c '
/users/obroeker/.ruby_inline/Inline_Example_58ed.c: file not
recognized: File format not recognized
which seems logical to me, because the construction of the command
includes the src_name of the file and thus assumes that the whole
compilation is also done in this command. If I would have written this,
I would have had two parts: one for compiling, one for linking. Can it
be done in one step with ld? Must be so, otherwise the code would have
never worked. Unfortunately I have found no way by hand to do all at
the same time.
Thanks for any help.
greetings, Oliver
I am encountering trouble compiling with RubyInline. Inside rubyinline
there is a construction of the command to create the library file:
cmd = "#{Config::CONFIG['LDSHARED']} #{flags}
#{Config::CONFIG['CFLAGS']} -I #{hdrdir} -o #{so_name} #{src_name}
#{libs}" [line 368 in inline.rb]
On my machine/installation this command fails with:
Building /users/obroeker/.ruby_inline/Inline_Example_58ed.so with
'/apps/gnu/bin/ld -shared -g -O2 -I
/users/obroeker/lib/ruby/1.8/mips-irix6.5 -o
/users/obroeker/.ruby_inline/Inline_Example_58ed.so
/users/obroeker/.ruby_inline/Inline_Example_58ed.c '
/users/obroeker/.ruby_inline/Inline_Example_58ed.c: file not
recognized: File format not recognized
which seems logical to me, because the construction of the command
includes the src_name of the file and thus assumes that the whole
compilation is also done in this command. If I would have written this,
I would have had two parts: one for compiling, one for linking. Can it
be done in one step with ld? Must be so, otherwise the code would have
never worked. Unfortunately I have found no way by hand to do all at
the same time.
Thanks for any help.
greetings, Oliver