[MDEV-9298] build failure with binutils 2.25.1 Created: 2015-12-16  Updated: 2016-01-08  Resolved: 2016-01-08

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5.48, 10.0.24, 10.1.11

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Sprint: 10.2.0-3

 Description   

As reported on IRC: using gcc-5.3 and binutils-2.25.1 on gentoo, compilation fails with errors from ar like

/var/tmp/portage/dev-db/mariadb-10.1.9-r1/work/mysql-abi_x86_32.x86/libmysql/libmysql_exports_file.cc:38:15: error: function 'mysql_get_client_version' redeclared as variable



 Comments   
Comment by Brian Evans [ 2015-12-17 ]

My Gentoo install builds fine with MariaDB 10.1.9, binutils 2.25.1 and gcc 5.3

Comment by Vladislav Vaintroub [ 2015-12-17 ]

We have not seen this compile error either. But someone reported the mentioned build error on IRC.

Comment by Vladislav Vaintroub [ 2016-01-06 ]

Can reproduce the error with -flto. This is likely how the user has compiled, it is a linker that reports error

MySQL's bug is here https://bugs.mysql.com/bug.php?id=67790

Comment by Vladislav Vaintroub [ 2016-01-08 ]

Fixed by using -fno-lto for the generated file, if -flto is set in compile flags

Generated at Thu Feb 08 07:33:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.