Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546738 - dev-cpp/libcmis fail to build with gcc-5
Summary: dev-cpp/libcmis fail to build with gcc-5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
: 555982 (view as bug list)
Depends on: 549618
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-04-16 08:37 UTC by Cănărău Constantin
Modified: 2015-07-27 00:43 UTC (History)
6 users (show)

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


Attachments
patch to build with gcc5 (gcc50.patch,440 bytes, patch)
2015-04-16 08:37 UTC, Cănărău Constantin
Details | Diff
Modified libcmis-0.5.0.ebuild (libcmis-0.5.0.ebuild,1.77 KB, text/plain)
2015-05-15 02:31 UTC, Gabriel Marcano
Details
libcmis-0.5.0-fix-boost-configuration-with-gcc-5.patch (libcmis-0.5.0-fix-boost-configuration-with-gcc-5.patch,44.41 KB, patch)
2015-05-15 02:32 UTC, Gabriel Marcano
Details | Diff
libcmis-0.5.0-avoid-use-after-delete.patch (libcmis-0.5.0-avoid-use-after-delete.patch,763 bytes, patch)
2015-05-15 02:33 UTC, Gabriel Marcano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cănărău Constantin 2015-04-16 08:37:19 UTC
dev-cpp/libcmis need -P to preprocessor

Reproducible: Always
Comment 1 Cănărău Constantin 2015-04-16 08:37:52 UTC
Created attachment 401320 [details, diff]
patch to build with gcc5
Comment 2 Andreas Sturmlechner gentoo-dev 2015-04-19 17:32:55 UTC
Could it be that easy? Upstream has the following patch in git:

http://sourceforge.net/p/libcmis/code/ci/645df9a0885931001e0a7afaf56de39cd33f9119/
Comment 3 Cănărău Constantin 2015-04-19 18:04:11 UTC
I think the "big" upstream patch has to do with C++11 standard being forced by gcc5.
For now, in Gentoo dev-libs/boost has:
# Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard.
append-cxxflags -std=gnu++98
When I removed above line from ebuild and recompiled boost my patch was no longer sufficient.
Comment 4 Helmut Jarausch 2015-04-29 11:54:33 UTC
(In reply to Cănărău Constantin from comment #0)
> dev-cpp/libcmis need -P to preprocessor
> 
> Reproducible: Always

Just renaming the ebuild  libcmis-0.5.0.ebuild into
libcmis-9999.ebuild and adding
=dev-cpp/libcmis-9999
to /etc/portage/package.accept_keywords

solves it for me here (gcc-5.1.0).
Comment 5 Mark Wright gentoo-dev 2015-04-30 11:41:05 UTC
(In reply to Cănărău Constantin from comment #1)
> Created attachment 401320 [details, diff] [details, diff]
> patch to build with gcc5

Neat, thanks, I confirm the problem and that this patch allows libcmis-0.5.0 to build with gcc 5.1.0.

There are test failures, from /var/tmp/portage/dev-cpp/libcmis-0.5.0/work/libcmis-0.5.0/qa/libcmis/test-suite.log

==============================================
   libcmis 0.5.0: qa/libcmis/test-suite.log
==============================================

# TOTAL: 8
# PASS:  7
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-ws
=============

.E.E.E.E...E.E.E.E.E..E.E.E.E.E.E..E..E.E.E.E.E.E.E.E.E.E.E....


!!!FAILURES!!!
Test Results:
Run:  36   Failures: 0   Errors: 27


1) test: WSTest::getRepositoriesTest (E) 
uncaught exception of type std::logic_error
- basic_string::_M_construct null not valid

... more similar failures
Comment 6 jospezial 2015-05-13 00:59:45 UTC
upstream fixed version (dev-cpp/libcmis-9999) works at its best.

Upstream devs should do a bump.
Comment 7 Andreas Sturmlechner gentoo-dev 2015-05-14 18:58:22 UTC
So, meanwhile I've tried the patch on a pre-gcc-5 system and it doesn't make things worse (i.e. I can't reproduce the test failure).
Comment 8 Gabriel Marcano 2015-05-15 02:31:28 UTC
Created attachment 403294 [details]
Modified libcmis-0.5.0.ebuild

I did a bit of reading and checking out of what changes upstream did to fix the problem, and noticed they did not apply the -P flag, but rather used a fix included in the boost.m4 file that does... something... with sed to concatenate lines output by gcc after preprocessing. This fix in boost.m4 requires for configure to be re-generated. The way I've gone around the issue is by creating two patches using `git format-patch`. One of the patches has the work they did to fix the gcc5 problem, and the other fixes a bug (probably the one that was failing with tests). With these patches in place, and a modified ebuild to run eautoreconf to update the build scripts, libcmis build fine and tests report no problems. I'll be attaching the patches momentarily.
Comment 9 Gabriel Marcano 2015-05-15 02:32:34 UTC
Created attachment 403296 [details, diff]
libcmis-0.5.0-fix-boost-configuration-with-gcc-5.patch

Both attachments should go in the files directory of the ebuild.
Comment 10 Gabriel Marcano 2015-05-15 02:33:07 UTC
Created attachment 403298 [details, diff]
libcmis-0.5.0-avoid-use-after-delete.patch
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2015-05-16 21:13:40 UTC
The tests pass here anyway, so that's a different problem. 

Compatibility patch (from upstream) added.
Comment 12 Ben Kohler gentoo-dev 2015-07-27 00:43:57 UTC
*** Bug 555982 has been marked as a duplicate of this bug. ***