Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650762 - dev-db/mariadb-10.3.5_rc fails with undefined reference to `ib::warn::~warn()`
Summary: dev-db/mariadb-10.3.5_rc fails with undefined reference to `ib::warn::~warn()`
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 650866 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-17 23:25 UTC by Sven Müller
Modified: 2018-04-09 18:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,582.31 KB, text/x-log)
2018-03-17 23:25 UTC, Sven Müller
Details
emerge --info (emerge_info.txt,6.78 KB, text/plain)
2018-03-17 23:26 UTC, Sven Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Müller 2018-03-17 23:25:54 UTC
Created attachment 524230 [details]
build.log

[ 34%] Linking CXX executable mysqlshow
cd /var/tmp/portage/dev-db/mariadb-10.3.5_rc/work/mariadb-10.3.5_rc_build/client && /usr/bin/cmake -E cmake_link_script CMakeFiles/mysqlshow.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++  -march=atom -mcx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -fstack-protector -felide-constructors -fno-strict-aliasing -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-rtti -DNDEBUG -DDBUG_OFF  -Wl,-O1 -Wl,--as-needed CMakeFiles/mysqlshow.dir/mysqlshow.c.o  -o mysqlshow -lpthread ../libmariadb/libmariadb/libmariadbclient.a ../mysys/libmysys.a -lpthread ../dbug/libdbug.a ../mysys_ssl/libmysys_ssl.a ../mysys/libmysys.a ../dbug/libdbug.a ../mysys_ssl/libmysys_ssl.a -lz -lm -lbfd -ldl -lssl -lcrypto ../strings/libstrings.a -lpthread 
CMakeFiles/innochecksum.dir/innochecksum.cc.o: In function `ut_allocate_trace_dontdump(void*, unsigned long, bool, ut_new_pfx_t*, char const*)':
innochecksum.cc:(.text+0x138): undefined reference to `ib::warn::~warn()'
innochecksum.cc:(.text+0x167): undefined reference to `ib::warn::~warn()'
CMakeFiles/innochecksum.dir/innochecksum.cc.o: In function `ut_dodump(void*, unsigned long)':
innochecksum.cc:(.text+0x2bb): undefined reference to `ib::warn::~warn()'
innochecksum.cc:(.text+0x2cf): undefined reference to `ib::warn::~warn()'
CMakeFiles/innochecksum.dir/__/storage/innobase/buf/buf0checksum.cc.o: In function `ut_allocate_trace_dontdump(void*, unsigned long, bool, ut_new_pfx_t*, char const*)':
buf0checksum.cc:(.text+0x138): undefined reference to `ib::warn::~warn()'
CMakeFiles/innochecksum.dir/__/storage/innobase/buf/buf0checksum.cc.o:buf0checksum.cc:(.text+0x167): more undefined references to `ib::warn::~warn()' follow
collect2: error: ld returned 1 exit status
make[2]: *** [extra/CMakeFiles/innochecksum.dir/build.make:261: extra/innochecksum] Error 1

mariadb-10.2.13 compiles fine
Comment 1 Sven Müller 2018-03-17 23:26:18 UTC
Created attachment 524232 [details]
emerge --info
Comment 2 Brian Evans Gentoo Infrastructure gentoo-dev 2018-03-19 12:52:57 UTC
*** Bug 650866 has been marked as a duplicate of this bug. ***
Comment 3 Maurice van der Pot 2018-04-02 07:43:24 UTC
I can confirm this.

I was able to compile this version earlier this month, but not anymore.
Not sure if it's relevant, but I changed my CFLAGS to "-O0 -march=i686 -pipe -ggdb".
Comment 4 Maurice van der Pot 2018-04-08 12:22:33 UTC
Some further testing showed that when compiling innochecksum, the definition of the destructor is excluded (with an #ifndef UNIV_INNOCHECKSUM) while the declaration is still present.

For some reason on my system with -O0 this leads to an undefined reference, while -O2 optimizes it away. However I see that Sven is using -O2.

In any case, I think it should be solved by bringing #ifndef placement in ut0ut.h inline with #ifndef placement in ut0ut.cc.
Comment 5 David Klann 2018-04-09 17:55:07 UTC
Seeing the same error here. USE flags for dev-db/mariadb (from the build log):

  abi_x86_64 amd64 backup elibc_glibc extraengine kernel_linux pam perl server userland_GNU xml

C Flags (also from the log file):

  -march=native -fno-strict-aliasing -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4
Comment 6 Sven Müller 2018-04-09 18:09:07 UTC
(In reply to Maurice van der Pot from comment #4)
> For some reason on my system with -O0 this leads to an undefined reference,
> while -O2 optimizes it away. However I see that Sven is using -O2.

I have to add, that I didn't use -O2 in my CFLags. Just forgot it to add, when I extracted the march=native flags. While it worked for several years, in the last months the number of failed packages have increased. 

And like you mentioned, the error passed away, when I added -O2 to my CFlags. 

So, it has to be decided, if the code should compile without a optimization flag too.