Bug 1258034 - codeblocks FTBFS with Boost 1.59
Summary: codeblocks FTBFS with Boost 1.59
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: codeblocks
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-28 17:35 UTC by Jonathan Wakely
Modified: 2015-09-03 15:12 UTC (History)
2 users (show)

Fixed In Version: codeblocks-13.12-21.fc24
Clone Of:
Environment:
Last Closed: 2015-09-03 14:23:16 UTC
Type: Bug
Embargoed:


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

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.


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