Project

General

Profile

Actions

Backport #6709

closed

building ruby-1.9.3-p194 on AIX 6.1 TL05 SP06

Added by Anonymous over 11 years ago. Updated almost 11 years ago.

Status:
Closed
[ruby-core:46248]

Description

I am just now starting to debug this but hoped someone has already blazed this trail.

I'm getting:

make[2]: Entering directory `/usr/work/build/ruby-1.9.3-p194/ext/-test-/load/dot.dot'
compiling /usr/work/src/ruby-1.9.3-p194/ext/-test-/load/dot.dot/dot.dot.c
linking shared-object -test-/load/dot.dot/dot.dot.so
ld: 0711-327 WARNING: Entry point not found: Init_dot.dot
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
collect2: ld returned 8 exit status
make[2]: *** [../../../../.ext/powerpc-aix6.1.0.0/-test-/load/dot.dot/dot.dot.so] Error 1

I'm using gcc (GCC) 4.5.2.

Is this a test just for extconf.rb?

Thank you,
Perry


Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #6768: Changes for r36338 are not completeClosed07/22/2012Actions
Related to Backport193 - Backport #8170: dot.dot Makefile references wrong TARGETClosedusa (Usaku NAKAMURA)03/27/2013Actions

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Category set to build
  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)
  • Target version set to 2.0.0
  • ruby -v set to trunk

Seems BeOS/Haiku have same issue.

Updated by Anonymous over 11 years ago

On Jul 8, 2012, at 12:58 PM, Perry Smith wrote:

On Jul 8, 2012, at 10:07 AM, Perry Smith wrote:

On Jul 8, 2012, at 9:56 AM, Yutaka Kanemoto wrote:

Hi Perry

Is it possible for you to try latest SP like SP8 (for TL5)? SP5 is a
bit old. I have ever seen similar error before, and it was disappeared
after applying latest SP.

Yea. I can try that. But trying to understand this code, it confuses me. It is looking for an entry point of Init_dot.dot but the code is simply:

void Init_dot(void) {}

So, I don't see how the linker is going to be happy.

I tracked down that this is a test for a feature to "ignore rest from first dot" but I don't have enough context to figure out what that means.

FYI: I moved to another host running at 6.1 TL07 SP03 and get the same issue.

I could remove it from the build sequence but I'm guessing there is a test that depends upon it and that test will fail.

Let me know your thoughts..

Well... I found the context. Revision 30464[1] and Revision 30480[2]. I think [2] is incomplete. Maybe?

I have not figured out how all this works yet but I did track it back to this line in my rbconfig.rb file:

CONFIG["DLDFLAGS"] = "-eInit_$(TARGET)"

As I'm guessing, the feature is so people can have a file, in this case dot.dot.c, and create a ruby extension but the init entry point will be called Init_dot instead of Init_dot.dot. I can't say that (assuming that much is correct) how or why that would be desired but that is another matter.

That line, it appears, comes from configure:

aix*) :
    : ${LDSHARED='$(CC)'}
                    LDSHARED="$LDSHARED ${linker_flag}-G"

! DLDFLAGS='-eInit_$(TARGET)'
XLDFLAGS="${linker_flag}"'-bE:$(ARCHFILE)'" ${linker_flag}-brtl"
XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
: ${ARCHFILE="ruby.imp"}

I'm trying different GNU Make fixes but so far it isn't working. That same construct also goes into the ruby-1.9.pc. On a tangential note, I had to remove pkg-config from my path because it complained about Variable TARGET is undefined. The two may be related -- I don't know.

[1] http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/30464
[2] http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/30480

Actions #3

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36338.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


mkmf.rb: add TARGET_NAME

  • configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
    instead of TARGET which may contain non-identifer characters.
  • lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
    part consists of only word characters. [ruby-core:46248][Bug #6709]

Updated by kanemoto (Yutaka Kanemoto) over 11 years ago

Hi Perry,

Sorry for the confusing. What I suggested is only for compilation error:

ld: 0711-244 ERROR: No csects or exported symbols have been saved.

For entry point issue, nobu-san has already commited a patch as
r36338, but it still has some other issue, so I will let him know the
result.

--
Yutaka KANEMOTO
http://d.hatena.ne.jp/kinpoco/

Updated by Anonymous over 11 years ago

On Jul 9, 2012, at 7:50 AM, Yutaka Kanemoto wrote:

Hi Perry,

Sorry for the confusing. What I suggested is only for compilation error:

ld: 0711-244 ERROR: No csects or exported symbols have been saved.

For entry point issue, nobu-san has already commited a patch as
r36338, but it still has some other issue, so I will let him know the
result.

I tried incorporating r36338 and I didn't get very far. I may have mistyped something.
I have not had time to double check it.

Perry

Updated by Anonymous over 11 years ago

On Jul 9, 2012, at 8:42 PM, Perry Smith wrote:

On Jul 9, 2012, at 7:50 AM, Yutaka Kanemoto wrote:

For entry point issue, nobu-san has already commited a patch as
r36338, but it still has some other issue, so I will let him know the
result.

I tried incorporating r36338 and I didn't get very far. I may have mistyped something.
I have not had time to double check it.

For now, I'm avoiding the problem with dot.dot by just editing the Makefile and fixing the entry point name.

I bumped into a new issue -- a simple one. AIX uses LIBPATH (not SHLIB_PATH). In configure, I believe this needs to be changed:

aix*) :
: ${LDSHARED='$(CC)'}
LDSHARED="$LDSHARED ${linker_flag}-G"
DLDFLAGS='-eInit_$(TARGET)'
XLDFLAGS="${linker_flag}"'-bE:$(ARCHFILE)'" ${linker_flag}-brtl"
XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
: ${ARCHFILE="ruby.imp"}
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'

   	: ${LIBPATHENV=SHLIB_PATH}
		RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"

I now pass all but one test -- #921.

I'd like to try and debug this mostly just to educate myself and also make sure my gdb and other tools are working. I'm building servers for Ruby on Rails and with my current set of servers, I can't debug low level problems like core dumps, etc. I can't (couldn't) get gdb and other stuff to work. But right now, I've upgraded everything and so I'd like to try and figure out those issues as well.

The first step would be to learn how to run just this testcase. How is that done?

Thank you,
Perry

Updated by Anonymous over 11 years ago

On Jul 10, 2012, at 9:27 PM, Perry Smith wrote:

On Jul 9, 2012, at 8:42 PM, Perry Smith wrote:

On Jul 9, 2012, at 7:50 AM, Yutaka Kanemoto wrote:

For entry point issue, nobu-san has already commited a patch as
r36338, but it still has some other issue, so I will let him know the
result.

I tried incorporating r36338 and I didn't get very far. I may have mistyped something.
I have not had time to double check it.

For now, I'm avoiding the problem with dot.dot by just editing the Makefile and fixing the entry point name.

I bumped into a new issue -- a simple one. AIX uses LIBPATH (not SHLIB_PATH). In configure, I believe this needs to be changed:

aix*) :
: ${LDSHARED='$(CC)'}
LDSHARED="$LDSHARED ${linker_flag}-G"
DLDFLAGS='-eInit_$(TARGET)'
XLDFLAGS="${linker_flag}"'-bE:$(ARCHFILE)'" ${linker_flag}-brtl"
XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
: ${ARCHFILE="ruby.imp"}
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'

  	: ${LIBPATHENV=SHLIB_PATH}
 	RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"

I now pass all but one test -- #921.

I'd like to try and debug this mostly just to educate myself and also make sure my gdb and other tools are working. I'm building servers for Ruby on Rails and with my current set of servers, I can't debug low level problems like core dumps, etc. I can't (couldn't) get gdb and other stuff to work. But right now, I've upgraded everything and so I'd like to try and figure out those issues as well.

The first step would be to learn how to run just this testcase. How is that done?

Should I open a bug on changing SHLIB_PATH to LIBPATH?

Can someone point me to how to run single testcases?

Thank you,
Perry

Updated by kosaki (Motohiro KOSAKI) over 11 years ago

On Thu, Jul 12, 2012 at 7:03 PM, Perry Smith wrote:

On Jul 10, 2012, at 9:27 PM, Perry Smith wrote:

On Jul 9, 2012, at 8:42 PM, Perry Smith wrote:

On Jul 9, 2012, at 7:50 AM, Yutaka Kanemoto wrote:

For entry point issue, nobu-san has already commited a patch as
r36338, but it still has some other issue, so I will let him know the
result.

I tried incorporating r36338 and I didn't get very far. I may have mistyped something.
I have not had time to double check it.

For now, I'm avoiding the problem with dot.dot by just editing the Makefile and fixing the entry point name.

I bumped into a new issue -- a simple one. AIX uses LIBPATH (not SHLIB_PATH). In configure, I believe this needs to be changed:

aix*) :
: ${LDSHARED='$(CC)'}
LDSHARED="$LDSHARED ${linker_flag}-G"
DLDFLAGS='-eInit_$(TARGET)'
XLDFLAGS="${linker_flag}"'-bE:$(ARCHFILE)'" ${linker_flag}-brtl"
XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
: ${ARCHFILE="ruby.imp"}
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'

               : ${LIBPATHENV=SHLIB_PATH}
                  RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"

I now pass all but one test -- #921.

I'd like to try and debug this mostly just to educate myself and also make sure my gdb and other tools are working. I'm building servers for Ruby on Rails and with my current set of servers, I can't debug low level problems like core dumps, etc. I can't (couldn't) get gdb and other stuff to work. But right now, I've upgraded everything and so I'd like to try and figure out those issues as well.

The first step would be to learn how to run just this testcase. How is that done?

Should I open a bug on changing SHLIB_PATH to LIBPATH?

Yes, please. We are sorry, unfortunately, a lot of maintainer is very busy and
e-mail is enough to track an issue.

Can someone point me to how to run single testcases?

make test-all TESTS="-n PATTERN"

make test-all TESTS="--help" is your frind. :)

Actions #9

Updated by usa (Usaku NAKAMURA) almost 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Category deleted (build)
  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to usa (Usaku NAKAMURA)
  • Target version deleted (2.0.0)
Actions #10

Updated by usa (Usaku NAKAMURA) almost 11 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r40093.
, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 36338: [Backport #6709]

* configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
  instead of TARGET which may contain non-identifer characters.

* lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
  part consists of only word characters.  [ruby-core:46248][Bug #6709]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0