Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619698 - =media-libs/libcaca-0.99_beta19 does not build with gcc-5.4.0 and >=dev-util/cppunit-1.14
Summary: =media-libs/libcaca-0.99_beta19 does not build with gcc-5.4.0 and >=dev-util/...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-25 21:04 UTC by Bertrand Jacquin
Modified: 2018-03-05 14:18 UTC (History)
5 users (show)

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


Attachments
emerge --info (info.log,16.26 KB, text/x-log)
2017-05-25 21:05 UTC, Bertrand Jacquin
Details
build.log (build.log,165.82 KB, text/x-log)
2017-05-25 21:05 UTC, Bertrand Jacquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2017-05-25 21:04:37 UTC
=media-libs/libcaca-0.99_beta19 does not build with 5.4.0 as:

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/libcaca-0.99_beta19/work/libcaca-0.99.beta19/test -I..  -I/var/tmp/portage/media-libs/libcaca-0.99_beta19/work/libcaca-0.99.beta19 -I/var/tmp/portage/media-libs/libcaca-0.99_beta19/work/libcaca-0.99.beta19/caca -I../caca   -march=native -O2 -pipe -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -c -o caca_test-dirty.o `test -f 'dirty.cpp' || echo '/var/tmp/portage/media-libs/libcaca-0.99_beta19/work/libcaca-0.99.beta19/test/'`dirty.cpp
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
                 from /usr/include/cppunit/tools/StringHelper.h:7,
                 from /usr/include/cppunit/TestAssert.h:8,
                 from /usr/include/cppunit/TestCase.h:6,
                 from /usr/include/cppunit/TestCaller.h:5,
                 from /usr/include/cppunit/extensions/HelperMacros.h:9,
                 from /var/tmp/portage/media-libs/libcaca-0.99_beta19/work/libcaca-0.99.beta19/test/canvas.cpp:15:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^

emerge --info and build.log attached

Reproducible: Always
Comment 1 Bertrand Jacquin 2017-05-25 21:05:19 UTC
Created attachment 474316 [details]
emerge --info
Comment 2 Bertrand Jacquin 2017-05-25 21:05:36 UTC
Created attachment 474318 [details]
build.log
Comment 3 Sebastian Bobrecki 2017-05-31 11:33:29 UTC
I have similar issue:

...
libtool: link: x86_64-pc-linux-gnu-g++ -m32 -O2 -pipe -march=native -fomit-frame-pointer -fgcse-after-reload -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -Wl,-O1 -o .libs/caca-test caca_test-caca-test.o caca_test-canvas.o caca_test-dirty.o caca_test-driver.o caca_test-export.o  -Wl,--as-needed ../caca/.libs/libcaca.so -L/usr/lib32 -lncursesw -lX11 -lGL -lGLU -lglut -lz -lcppunit
caca_test-caca-test.o: In function `main':
caca-test.cpp:(.text.startup+0x4c): undefined reference to `CppUnit::TestFactoryRegistry::getRegistry(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
caca-test.cpp:(.text.startup+0x9a): undefined reference to `CppUnit::TextTestRunner::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool)'
caca_test-canvas.o: In function `CppUnit::ConcretTestFixtureFactory<CanvasTest>::makeFixture()':
canvas.cpp:(.text._ZN7CppUnit25ConcretTestFixtureFactoryI10CanvasTestE11makeFixtureEv[_ZN7CppUnit25ConcretTestFixtureFactoryI10CanvasTestE11makeFixtureEv]+0x40): undefined reference to `CppUnit::TestCase::TestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
...
Comment 4 Louis Sautier (sbraz) gentoo-dev 2017-06-05 23:13:38 UTC
This issue does not happen with cppunit 1.13 or without cppunit installed. It seems that there are two separate problems here:
- libcaca tries compiling its tests even when we pass it --disable-cppunit
- compiling theses tests with cppunit 1.14 or later requires -std=c++11

I don't know where the first problem comes from but the second one can easily be fixed by adding "append-cxxflags -std=c++11" before the call to econf.

I have opened an issue upstream for the CXXFLAGS problem: https://github.com/cacalabs/libcaca/issues/26
Comment 5 Sebastian Bobrecki 2017-06-08 14:28:20 UTC
For me it builds after: revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc
Comment 6 Ivan Iraci 2017-09-12 09:34:42 UTC
(In reply to Louis Sautier (sbraz) from comment #4)

> I don't know where the first problem comes from but the second one can
> easily be fixed by adding "append-cxxflags -std=c++11" before the call to
> econf.

Same problem and same fix for me.
Comment 7 Pacho Ramos gentoo-dev 2017-11-08 16:53:07 UTC
Is this invalid then?
Title: GCC 5 Defaults to the New C++11 ABI
Author: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain
Posted: 2015-10-22
Revision: 2
News-Item-Format: 1.0
Display-If-Installed: >=sys-devel/gcc-5

GCC 5 uses the new C++ ABI by default.  When building new code, you might run
into link time errors that include lines similar to:
...: undefined reference to '_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17'

Or you might see linkage failures with "std::__cxx11::string" in the output.

These are signs that you need to rebuild packages using the new C++ ABI.
You can quickly do so by using revdep-rebuild (from gentoolkit).

For gentoolkit-0.3.1 or higher:
# revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc

For previous versions of gentoolkit:
# revdep-rebuild --library 'libstdc\+\+\.so\.6' -- --exclude gcc

For more details, feel free to peruse:
https://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/
https://blogs.gentoo.org/blueness/2015/03/10/the-c11-abi-incompatibility-problem-in-gentoo/
Comment 8 Andreas Sturmlechner gentoo-dev 2017-11-10 11:47:11 UTC
Please confirm.
Comment 9 tt_1 2017-11-22 21:50:01 UTC
I can confirm this for x86 and gcc-5.4.0-r3, will try to pass append-cxxflags -std=c++11
Comment 10 tt_1 2017-11-22 22:34:18 UTC
(In reply to Louis Sautier (sbraz) from comment #4)
> This issue does not happen with cppunit 1.13 or without cppunit installed.
> It seems that there are two separate problems here:
> - libcaca tries compiling its tests even when we pass it --disable-cppunit
> - compiling theses tests with cppunit 1.14 or later requires -std=c++11
> 
> I don't know where the first problem comes from but the second one can
> easily be fixed by adding "append-cxxflags -std=c++11" before the call to
> econf.
> 
> I have opened an issue upstream for the CXXFLAGS problem:
> https://github.com/cacalabs/libcaca/issues/26

Confirmed, I masked =dev-util/cppunit-1.14.0 and libcaca-0.99_beta19 compiles fine with gcc-5.4.0-r3

I ran into this is an old machine, which wasn't upgraded for a long time. The annoying thing is, this happend during the mandantory rebuild of c++ stuff after gcc upgrade vom 4.x to 5.x via 

revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc

therefore, followed the upgrade path, and still ended up here. 

Please consider to patch the ebuild, upstream patch could take a while I guess.
Comment 11 Allan Bjorklund 2017-11-26 16:11:58 UTC
It looks like it may just be the gcc-5.x series.  I ran into this issue and since I had gcc-6.4.0 on my system, I decided to give it a try and switched to it.

The emerge of libcaca-0.99_beta18-r2 then completed successfully.