Bug 192131

Summary: cad/kicad: build with GCC 4.8 fails with /usr/local/include/c++/v1/string:641:35: error: inlining failed in call to always_inline 'static bool std::__1::char_traits<char>::eq
Product: Ports & Packages Reporter: Gerald Pfeifer <gerald>
Component: Individual Port(s)Assignee: Thierry Thomas <thierry>
Status: Closed FIXED    
Severity: Affects Only Me CC: cmt
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 192025    

Description Gerald Pfeifer freebsd_committer freebsd_triage 2014-07-26 10:28:07 UTC
We are working to change the default version of GCC from 4.7 (which
is end of life) to 4.8.

This port is one of a handful that blocks this migration since it fails
to build on FreeBSD/amd64 10 as follows:

cd /wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common && /usr/local/bin/g++48   -DKICAD_STABLE_VERSION -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D__WXGTK__ -DwxUSE_UNICODE -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/include -I/usr/local/include -DBOOST_HASH_NO_EXTENSIONS -nostdinc++ -isystem /usr/local/include/c++/v1 -Wl,-rpath=/usr/local/lib/gcc48 -fPIC -I/usr/local/include/wx-3.0 -Wno-narrowing -O1 -Wall -DNDEBUG -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/include -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/. -isystem /usr/local/lib/wx/include/gtk2-unicode-3.0 -isystem /usr/local/include/wx-3.0 -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/./dialogs -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/./dialog_about -I/usr/local/include -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/../3d-viewer -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/../pcbnew -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/../polygon -I/wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017 -o CMakeFiles/common.dir/richio.cpp.o -c /wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/richio.cpp
In file included from /wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/include/richio.h:32:0,
                 from /wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/richio.cpp:29:
/usr/local/include/c++/v1/string: In member function 'virtual std::__1::string OUTPUTFORMATTER::Quotes(const string&)':
/usr/local/include/c++/v1/string:641:35: error: inlining failed in call to always_inline 'static bool std::__1::char_traits<char>::eq(std::__1::char_traits<char>::char_type, std::__1::char_traits<char>::char_type) throw ()': indirect function call with a yet undetermined callee
     static _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
                                   ^
In file included from /usr/local/include/c++/v1/string:439:0,
                 from /wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/include/richio.h:32,
                 from /wrkdirs/usr/ports/cad/kicad/work/stable_2013-05-18_BZR4017/common/richio.cpp:29:
/usr/local/include/c++/v1/algorithm:1050:13: error: called from here
             if (__pred(*__first1, *__j))
             ^
*** Error code 1

The full log is at package23.nyi.freebsd.org/data/10amd64-default-PR192025/2014-07-24_23h12m00s/logs/errors/kicad-2013.05.18.b4017,1.log
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-26 10:35:59 UTC
fix title and actually assign the PR.
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2014-08-19 16:55:09 UTC
I must admit that I don't really understand this error... But do you encounter the same error with cad/kicad-devel?

In this case, I have just upgraded Kicad to a newer snapshot.
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2014-08-25 09:24:02 UTC
(In reply to Thierry Thomas from comment #2)
> I must admit that I don't really understand this error... But do you
> encounter the same error with cad/kicad-devel?

The report I got from the -exp run only had cad/kicad, not cad/kicad-devel,
so it appears this has been addressed in newer versions.

> In this case, I have just upgraded Kicad to a newer snapshot.

Great, thank you!  Based on this I think we can close the report and
are one step closer to an update of lang/gcc.