Issue #6734 has been updated by nobu (Nobuyoshi Nakada).

File extdldflags.diff added
Category set to build
Status changed from Open to Feedback
ruby -v set to 2.0.0

I think -e option should not appear in ruby.pc file, because the option is for extension libraries and used by mkmf.rb which never use pc file, and pc file is for other libraries/applications and -e option seems not useful but harmful.

Attached a patch to move the option from DLDFLAGS to EXTDLDFLAGS.
----------------------------------------
Bug #6734:  pkg-config on aix
https://bugs.ruby-lang.org/issues/6734#change-28169

Author: Anonymous
Status: Feedback
Priority: Normal
Assignee: 
Category: build
Target version: 
ruby -v: 2.0.0


 I put pkg-config back into my path and tried to build ruby.  I'm building ruby-1.9.3-p194 on AIX 6100-07-03-1207.   The configure pass ends with this error:
 
 > Variable 'TARGET' not defined in './ruby.tmp.pc'
 
 
 The ruby.tmp.pc file for AIX ends up with this line:
 
 > DLDFLAGS=-eInit_${TARGET}
 
 
 This is related to the other question(s) I had but in this case, I don't see a way to fix this at all.  I don't know pkg-config much but I'm not seeing a way to get target dependent variables into the pkg-config .pc file.
 
 I moved up to pkg-config 0.27. I tried 0.25 before with the same result.
 
 I tried not using pkg-config but when I try to build a ruby extension, (event machine in this case), the mkmf is confused.  It is doing a static link but looking for the shared library -lruby.  In that case, ld will look for libruby.a but there is not one.  I could create one by hand but I'm trying to understand the direction the ruby project is trying to take.
 
 So that is why I decided to put pkg-config back into my path and see if I can make it work that way.  But, so far, I can't.
 
 I got shared libraries working with ruby 1.9.2 but all those tricks are not working with 1.9.3 at this point.
 
 Can someone help me understand how this is intended to work?
 
 Thank you,
 Perry Smith


-- 
http://bugs.ruby-lang.org/