Forum: Ruby dt_textrel problem with ruby module

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
jm (Guest)
on 2006-05-27 08:18
(Received via mailing list)
I'm attempting to debug a problem with a ruby module I wrote in C and
am receiving a warning from ld which may be causing the segfault. Does
anyone know what can cause this warning?

.../bin/ld: warning: creating a DT_TEXTREL in object.

ts (Guest)
on 2006-05-27 13:53
(Received via mailing list)
>>>>> "j" == jm  <removed_email_address@domain.invalid> writes:

j> .../bin/ld: warning: creating a DT_TEXTREL in object.

 try to add -fPIC when you compile it.

Guy Decoux
jm (Guest)
on 2006-05-28 08:28
(Received via mailing list)
On 27/05/2006, at 7:51 PM, ts wrote:

>>>>>> "j" == jm  <removed_email_address@domain.invalid> writes:
> j> .../bin/ld: warning: creating a DT_TEXTREL in object.
>  try to add -fPIC when you compile it.

The extconf file already contains directive -fPIC

$ cat extconf.rb
require 'mkmf'

$CFLAGS="-O2 -pipe -fPIC"

The resulting make compile is

$ make
i686-pc-linux-gnu-gcc -fPIC -O2 -pipe -fPIC  -I.
-I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I.   -c
i686-pc-linux-gnu-gcc -shared  -L'/usr/lib' -Wl,-R'/usr/lib' -o Vflow.o  -Wl,-R -Wl,/usr/lib -L/usr/lib -L. -lruby18 -lft -lz
-ldl -lcrypt -lm   -lc
linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.

I'd seen the -FPIC thing in the few web pages I'd manage to find that
mentioned this error. Unfortunately this doesn;t seem to fix the
problem. I'm scratching my head over this one. gcc, glibc and ld have
all been upgraded to the latest.

gcc version 3.3.5-20050130
GNU ld version 2.16.1

This is on a gentoo box. I've also got access to a fedora core 5 box
and the next chance I get I'll be testing there to see if it's a
platform related problem.

If anyone has any advise please speak up. Anyway, thanks for the
suggestion Guy.

jm (Guest)
on 2006-06-03 07:25
(Received via mailing list)
On 28/05/2006, at 2:26 PM, jm wrote:

> platform related problem.
Got around to testing this on a Fedora Core 5 box today and there
doesn't seem to be a problem. This seems to imply that the problem is
platform specific. That gentoo (at least in the version I'm running) is
only platform that is affected. As I've got no idea what is causing
this I'm simple going to avoid it by not running this code on that box.

This reply is more for future reference for anyone else that may
stubble across this problem than anything else.

This topic is locked and can not be replied to.