Bug 1258034

Summary: codeblocks FTBFS with Boost 1.59
Product: [Fedora] Fedora Reporter: Jonathan Wakely <jwakely>
Component: codeblocksAssignee: Dan Horák <dan>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan, fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: codeblocks-13.12-21.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-03 14:23:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
build log from scratch build with --target f24-boost none

Description Jonathan Wakely 2015-08-28 17:35:41 UTC
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 17:36:10 UTC
> 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 11:01:44 UTC
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 11:04:04 UTC
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 11:43:35 UTC
(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 13:44:18 UTC
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 21:38:08 UTC
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 13:37:40 UTC
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 13:43:09 UTC
thanks guys, will submit a new build ASAP

Comment 9 Jens Lody 2015-09-03 15:12:21 UTC
(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.