Project

General

Profile

Actions

Bug #16179

closed

ruby binaries generate "already initialized constant" warnings on AIX 6.1

Added by Reshma (Reshma Kumar) over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.6.3
[ruby-core:95072]
Tags:

Description

We are building ruby 2.6.3(both 32 and 64bit) on AIX 6.1.
The build options used for 64bit build are:-

export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/usr/lib:/lib"

and for 32bit build are:-

export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000"

After successful build and installation of the package, 64bit and 32bit libraries are installed in /opt/freeware/lib64 and /opt/freeware/lib respectively. There are ruby scripts which are shipped in both /opt/freeware/lib and /opt/freeware/lib64.

Execution of irb(both 64bit and 32bit) generates warnings as mentioned below.

# irb
/opt/freeware/lib/ruby/2.6.0/uri/common.rb:17: warning: already initialized constant URI::REGEXP
/opt/freeware/lib64/ruby/2.6.0/uri/common.rb:17: warning: previous definition of REGEXP was here
/opt/freeware/lib/ruby/2.6.0/uri/common.rb:18: warning: already initialized constant URI::Parser
/opt/freeware/lib64/ruby/2.6.0/uri/common.rb:18: warning: previous definition of Parser was here

Any ideas why this could be happening?


Files

ruby_output.log.docx (13.2 KB) ruby_output.log.docx Reshma (Reshma Kumar), 09/26/2019 06:58 AM

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

Could you show what ruby -e 'puts $:' print, and is it same as in irb?

Actions #2

Updated by Reshma (Reshma Kumar) over 4 years ago

  • Status changed from Feedback to Open

Updated by Reshma (Reshma Kumar) over 4 years ago

Yes, it is same as that in irb.
I have attached a log of the output.

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Subject changed from ruby binaries generate "already initialized constant" warnings to ruby binaries generate "already initialized constant" warnings on AIX 6.1
  • Status changed from Open to Feedback

Here's the results of $: extracted from the uploaded .docx log:

/opt/freeware/lib64/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib
/opt/freeware/lib64/ruby/site_ruby/2.6.0
/opt/freeware/lib64/ruby/site_ruby/2.6.0/powerpc-aix6.1.0.0
/opt/freeware/lib64/ruby/site_ruby
/opt/freeware/lib64/ruby/vendor_ruby/2.6.0
/opt/freeware/lib64/ruby/vendor_ruby/2.6.0/powerpc-aix6.1.0.0
/opt/freeware/lib64/ruby/vendor_ruby
/opt/freeware/lib64/ruby/2.6.0
/opt/freeware/lib64/ruby/2.6.0/powerpc-aix6.1.0.0

In the future, please only upload plain text files (or just inline small amounts of text), uploading files in Word format can make it much more difficult to get access to the information.

Can you show the full configure options you are using for both 32bit and 64bit builds?

Updated by Reshma (Reshma Kumar) over 4 years ago

64bit

./configure
--host=powerpc-ibm-aix6.1.0.0 --target=powerpc-ibm-aix6.1.0.0 --build=powerpc-ibm-aix6.1.0.0
--prefix=/opt/freeware
--libdir=/opt/freeware/lib64
--libexecdir=/opt/freeware/lib64
--disable-rpath
--enable-pthread
--enable-shared
--disable-static

32bit

./configure
--host=powerpc-ibm-aix6.1.0.0 --target=powerpc-ibm-aix6.1.0.0 --build=powerpc-ibm-aix6.1.0.0
--prefix=/opt/freeware
--libdir=/opt/freeware/lib
--libexecdir=/opt/freeware/lib
--disable-rpath
--enable-pthread
--enable-shared
--disable-static

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

Try using a different --prefix for the 32bit and 64bit versions, and please report whether that fixes the issues.

Actions #7

Updated by jeremyevans0 (Jeremy Evans) almost 4 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0