Backport #7205
closedAll symbols of libruby.so get LOCAL/HIDDEN visibility when build on CentOS4
Description
Ruby 1.9.3 build fails on CentOS4 with such errors:
linking ruby
main.o(.text+0x3c): In function main': : undefined reference to
ruby_sysinit'
main.o(.text+0x47): In function main': : undefined reference to
ruby_init_stack'
main.o(.text+0x4c): In function main': : undefined reference to
ruby_init'
main.o(.text+0x5e): In function main': : undefined reference to
ruby_options'
main.o(.text+0x66): In function main': : undefined reference to
ruby_run_node'
I found All symbols of libruby.so get LOCAL/HIDDEN visibility. For example:
$ readelf -a libruby.so|grep ruby_sysinit
6260: 000e01f0 561 FUNC LOCAL HIDDEN 10 ruby_sysinit
I am building on CentOS4 i386 with GCC:
$ gcc --version
gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
Ruby 1.8.7 build is successful.
Files
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
Could you show config.log file?
Updated by cheese (Robin Lee) over 11 years ago
- File config.log config.log added
OK, config.log is attached.
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r37296.
Robin, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
configure.in: no visibility option for older GCC
- configure.in (visibility_option): visibility attribute is not
available before GCC 4, so do not use -fvisibility option in that
case. [ruby-core:48147] [Bug #7205]
Updated by nobu (Nobuyoshi Nakada) over 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 set to usa (Usaku NAKAMURA)
Updated by cheese (Robin Lee) over 11 years ago
OK. Tested. Ruby compiles without '-fvisibility' option with GCC 3.4
Updated by usa (Usaku NAKAMURA) over 11 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r37552.
Robin, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 37296: [Backport #7205]
* configure.in (visibility_option): visibility attribute is not
available before GCC 4, so do not use -fvisibility option in that
case. [ruby-core:48147] [Bug #7205]