Bug #81593 adapt to gcc 5.3 on solaris
Submitted: 25 May 2016 10:39 Modified: 31 May 2016 14:29
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.7.14 OS:Any
Assigned to: CPU Architecture:Any

[25 May 2016 10:39] Tor Didriksen
Description:
Our cmake scripts tries to hide (visibility=hidden) certain symbols.
The current approach is wrong, and gives link problems with gcc 5.3 on Solaris.

How to repeat:
export PATH=/opt/gcc/bin:$PATH
Then build on Intel Solaris.

Linking CXX shared library libmysqlclient.so
Text relocation remains                      referenced
    against symbol                  offset      in file
TaoCrypt::HASHwithTransform::~HASHwithTransform() 0x52          ../mysys_ssl/libmysys_ssl.a(my_sha1.cc.o)
TaoCrypt::HASHwithTransform::~HASHwithTransform() 0x26          ../mysys_ssl/libmysys_ssl.a(my_sha1.cc.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: error: ld returned 1 exit status

Suggested fix:
Do not compile entire source files with visibility hidden,
that makes *all* symbols in the compilation unit hidden.

Rather: tag the desired symbols with __attribute__((visibility("hidden")))
[31 May 2016 14:29] Paul DuBois
Posted by developer:
 
Noted in 5.7.14 changelog.

The CMake configuration was too agressive in making symbols
invisible, resulting in link problems with GCC 5.3 on Solaris.