Bug 1258034 - codeblocks FTBFS with Boost 1.59
codeblocks FTBFS with Boost 1.59
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: codeblocks (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 13:35 EDT by Jonathan Wakely
Modified: 2015-09-03 11:12 EDT (History)
2 users (show)

See Also:
Fixed In Version: codeblocks-13.12-21.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-03 10:23:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
build log from scratch build with --target f24-boost (3.62 MB, text/plain)
2015-08-28 13:35 EDT, Jonathan Wakely
no flags Details

  None (edit)
Description Jonathan Wakely 2015-08-28 13:35:41 EDT
Created attachment 1068107 [details]
build log from scratch build with --target f24-boost

See https://koji.fedoraproject.org/koji/taskinfo?taskID=10861434
(log attached)

/usr/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'

It works if I add LIBS=-boost_system to %configure in the spec file, but I don't know if everything needs to link to libboost_system or just some files (the error comes from something in src/plugins)
Comment 1 Jonathan Wakely 2015-08-28 13:36:10 EDT
> It works if I add LIBS=-boost_system to %configure in the spec file

Sorry, that should be LIBS=-lboost_system
Comment 2 Jens Lody 2015-08-29 07:01:44 EDT
The only component of C::B that uses boost is the NassiShneiderman-plugin.
So proper fix would be to add it in NassiShneiderman's Makefile.am.
But this would force another patch for Fedora.

I will look into it and see if I can fix it upstream.
So it will not slip into next release (hopefully coming this year).

Jens
Comment 3 Jens Lody 2015-08-29 07:04:04 EDT
By the way: I just build the actual trunk in copr without problems:
https://copr.fedoraproject.org/coprs/jenslody/codeblocks/build/111911/

Jens
Comment 4 Jonathan Wakely 2015-08-29 07:43:35 EDT
(In reply to Jens Lody from comment #3)
> By the way: I just build the actual trunk in copr without problems:
> https://copr.fedoraproject.org/coprs/jenslody/codeblocks/build/111911/

This used boost-devel-1.58.0-9.fc24.x86_64

It fails with boost-1.59.0, if you do:

fedpkg scratch-build --target f24-boost
Comment 5 Jens Lody 2015-08-29 09:44:18 EDT
Adding "-DBOOST_SYSTEM_NO_DEPRECATED" to the AM_CPPFLAGS in "src/plugins/contrib/NassiShneiderman/Makefile.am" fixes the error.
It should also work if it is set globally in the spec-file as additional cxxflag.
No other parts of Code::Blocks use boost, so it should not have any negative effect, and it is the easiest way to fix the build for Fedora.
Anyway: I will commit it upstream, if it does not break anything in other builds.

Note: I could not test C::B, just building works fine.

Jens
Comment 6 Jens Lody 2015-08-29 17:38:08 EDT
I committed a fix for this.
I a also tested it 
Setting the define in the spec-file also works and should be the easiest solution for Fedora until the new codeblocks release is comming.
Comment 7 Jonathan Wakely 2015-09-03 09:37:40 EDT
Boost 1.59 is now in rawhide, so codeblocks needs to be rebuilt.

It seems that an alternative fix for the linker error is to add  this before the %configure command:

export CPPFLAGS=-DBOOST_ERROR_CODE_HEADER_ONLY
Comment 8 Dan Horák 2015-09-03 09:43:09 EDT
thanks guys, will submit a new build ASAP
Comment 9 Jens Lody 2015-09-03 11:12:21 EDT
(In reply to Jens Lody from comment #6)
> Setting the define in the spec-file also works and should be the easiest
> solution for Fedora until the new codeblocks release is comming.

(In reply to Jonathan Wakely from comment #7)
> Boost 1.59 is now in rawhide, so codeblocks needs to be rebuilt.
> 
> It seems that an alternative fix for the linker error is to add  this before
> the %configure command:
> 
> export CPPFLAGS=-DBOOST_ERROR_CODE_HEADER_ONLY

That is exactly what I did to test it without the need to patch Makefile.am's .
Sorry, that I did not post the exact fix.

Note You need to log in before you can comment on or make changes to this bug.