Bug 760616

Summary: [FTBFS][fusecompress] Error in boost lexical_cast
Product: [Fedora] Fedora Reporter: Denis Arnaud <denis.arnaud_fedora>
Component: fusecompressAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bkoz, denis.arnaud_fedora, lkundrak, lmacken, pertusus, pmachata
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-14 20:24:59 UTC Type: ---
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
Compile against system boost::math
none
Spec file fixes none

Description Denis Arnaud 2011-12-06 16:22:24 UTC
Description of problem:
fusecompress fails to build from source (FTBFS) on Fedora Rawhide, due to an error related to Boost.Lexical_Cast.

Version-Release number of selected component (if applicable):
fusecompress-2.6-12.20110801git913897f4 and boost-1.48.0-4 (patched version to fix another related issue: #757385) on Fedora Rawhide

How reproducible:
Always

Additional info:
Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3569887 (in particular, the build logs are here: http://koji.fedoraproject.org/koji/getfile?taskID=3569898&name=build.log)

-----------
g++ -DHAVE_CONFIG_H -I. -I..  -D_GNU_SOURCE -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -Wno-long-long -Wall -fpermissive -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -DNDEBUG  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic   -c -o main_offline.o main_offline.cpp
In file included from /usr/include/boost/lexical_cast.hpp:44:0,
                 from ./boost/archive/portable_binary_iarchive.hpp:58,
                 from Compress.cpp:41:
/usr/include/boost/math/special_functions/sign.hpp:35:34: error: 'generic_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:35:45: error: expected ',' or '...' before '<' token
/usr/include/boost/math/special_functions/sign.hpp:41:34: error: 'generic_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:41:45: error: expected ',' or '...' before '<' token
/usr/include/boost/math/special_functions/sign.hpp:41:16: error: redefinition of 'template<class T> int boost::math::detail::signbit_impl(T, int)'
/usr/include/boost/math/special_functions/sign.hpp:35:16: error: 'template<class T> int boost::math::detail::signbit_impl(T, int)' previously declared here
/usr/include/boost/math/special_functions/sign.hpp:47:34: error: 'ieee_copy_all_bits_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:57:34: error: 'ieee_copy_leading_bits_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:57:16: error: redefinition of 'template<class T> int boost::math::detail::signbit_impl(T, const int&)'
/usr/include/boost/math/special_functions/sign.hpp:47:16: error: 'template<class T> int boost::math::detail::signbit_impl(T, const int&)' previously declared here
/usr/include/boost/math/special_functions/sign.hpp:70:37: error: 'generic_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:70:48: error: expected ',' or '...' before '<' token
/usr/include/boost/math/special_functions/sign.hpp:76:37: error: 'generic_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:76:48: error: expected ',' or '...' before '<' token
/usr/include/boost/math/special_functions/sign.hpp:76:15: error: redefinition of 'template<class T> T boost::math::detail::changesign_impl(T, int)'
/usr/include/boost/math/special_functions/sign.hpp:70:15: error: 'template<class T> T boost::math::detail::changesign_impl(T, int)' previously declared here
/usr/include/boost/math/special_functions/sign.hpp:83:35: error: 'ieee_copy_all_bits_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:95:37: error: 'ieee_copy_leading_bits_tag' has not been declared
/usr/include/boost/math/special_functions/sign.hpp:95:15: error: redefinition of 'template<class T> T boost::math::detail::changesign_impl(T, const int&)'
/usr/include/boost/math/special_functions/sign.hpp:83:14: error: 'template<class T> T boost::math::detail::changesign_impl(T, const int&)' previously declared here
main_offline.cpp: In function 'int compress(const char*, const stat*, int, FTW*)':
main_offline.cpp:199:30: warning: invalid conversion from 'bool (*)(const string&) {aka bool (*)(const std::basic_string<char>&)}' to 'boost::enable_if_c<true, void>::type* {aka void*}' [-fpermissive]
main_offline.cpp: In function 'int main(int, char**)':
main_offline.cpp:421:43: warning: invalid conversion from 'bool (*)(const string&) {aka bool (*)(const std::basic_string<char>&)}' to 'boost::enable_if_c<true, void>::type* {aka void*}' [-fpermissive]
main_offline.cpp:435:39: warning: invalid conversion from 'bool (*)(const string&) {aka bool (*)(const std::basic_string<char>&)}' to 'boost::enable_if_c<true, void>::type* {aka void*}' [-fpermissive]
-----------

Comment 1 Petr Machata 2011-12-07 01:07:44 UTC
The fusecompress sources contain what seems like partial version of boost.  iarchive is included, as is math, but lexical cast is not.  So when we request boost lexical_cast, we go to the system boost library.  That in turn requests boost math, but that has already been satisfied before by including the embedded library, except that library doesn't define generic_tag (and perhaps others), presumably because it's outdated.

My guess on why embedded boost is shipped is that there's a bunch of stream filters that don't seem to be available in mainline boost: lzma, lxo, xor.  Perhaps dropping the embedded boost math library would work?  Or does this also diverge from upstream?

Alternatively, I guess we might just sed through the include guards of the embedded boost and rename them.

Comment 2 Petr Machata 2011-12-07 01:29:40 UTC
Created attachment 541647 [details]
Compile against system boost::math

This removes boost math files from Makefile.am and fixes include paths in boost archive.

Comment 3 Petr Machata 2011-12-07 01:30:47 UTC
Created attachment 541648 [details]
Spec file fixes

This patches the spec file so that boost::math is dropped and the previous patch used.

Comment 4 Denis Arnaud 2011-12-10 00:14:09 UTC
(In reply to comment #2)
> Created attachment 541647 [details]
> Compile against system boost::math

Thanks for the patch. It works, in principle.

But for whatever reason, the version of source code you used is slightly different from upstream. Nevertheless, the patch I use is the one in the pull request/upstream ticket: https://github.com/tex/fusecompress/pull/7 => https://github.com/fedorapackaging/fusecompress/commit/e736b865475a4d0f270dbf7bcab17acbd5e20d6c (and I checked that it corresponds to the version used by the Fedora packaging, i.e., https://github.com/fedorapackaging/fusecompress/commit/913897f424af319a0fa67d5356454de1512efeae, as seen in the specification file: http://pkgs.fedoraproject.org/gitweb/?p=fusecompress.git;a=blob_plain;f=fusecompress.spec;hb=HEAD)

------------------
Successful Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3576462