Bug 757385

Summary: Error in boost lexical_cast
Product: [Fedora] Fedora Reporter: Rich Mattes <richmattes>
Component: boostAssignee: Petr Machata <pmachata>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkoz, denis.arnaud_fedora, mnewsome, pertusus, pmachata
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-30 00:45:16 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:
Bug Depends On:    
Bug Blocks: 754865    
Attachments:
Description Flags
Proposed fix none

Description Rich Mattes 2011-11-26 19:15:44 UTC
Description of problem:
There seems to be an issue in the lexical_cast.hpp header that's preventing my package (ompl) from building.

Version-Release number of selected component (if applicable):
boost-devel  1.48.0-1.fc17

How reproducible:
Attempt to build the master branch of the ompl package.

Additional info:
Build output:
[ 89%] Building CXX object src/ompl/CMakeFiles/ompl.dir/extensions/ode/src/ODEStatePropagator.cpp.o
cd /builddir/build/BUILD/ompl-0.9.5-Source/src/ompl && /usr/bin/c++   -Dompl_EXPORTS -DdSINGLE -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -fPIC -I/builddir/build/BUILD/ompl-0.9.5-Source/src    -W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -fPIC -o CMakeFiles/ompl.dir/extensions/ode/src/ODEStatePropagator.cpp.o -c /builddir/build/BUILD/ompl-0.9.5-Source/src/ompl/extensions/ode/src/ODEStatePropagator.cpp
In file included from /builddir/build/BUILD/ompl-0.9.5-Source/src/ompl/extensions/ode/src/ODEEnvironment.cpp:38:0:
/usr/include/boost/lexical_cast.hpp: In static member function 'static Target boost::detail::lexical_cast_do_cast<Target, Source>::lexical_cast_impl(const Source&) [with Target = std::basic_string<char>, Source = dxGeom*]':
/usr/include/boost/lexical_cast.hpp:1916:50:   instantiated from 'Target boost::lexical_cast(const Source&) [with Target = std::basic_string<char>, Source = dxGeom*]'
/builddir/build/BUILD/ompl-0.9.5-Source/src/ompl/extensions/ode/src/ODEEnvironment.cpp:64:53:   instantiated from here
/usr/include/boost/lexical_cast.hpp:1742:25: error: invalid application of 'sizeof' to incomplete type 'removed_ptr_t {aka dxGeom}' 
make[2]: *** [src/ompl/CMakeFiles/ompl.dir/extensions/ode/src/ODEEnvironment.cpp.o] Error 1


Full log at http://koji.fedoraproject.org/koji/taskinfo?taskID=3543662

Comment 1 Petr Machata 2011-11-28 23:14:06 UTC
Reproducer:

#include <boost/lexical_cast.hpp>

struct ble;
typedef struct ble *meh;

int main(int argc, char *argv[])
{
  meh heh;
  return boost::lexical_cast<std::string>(heh);
}

Comment 2 Petr Machata 2011-11-29 00:31:13 UTC
Created attachment 537703 [details]
Proposed fix

To decide whether source type is char, they first ask for whether it's char or wchar, and then compare sizeofs.  I think the same can be achieved by simply asking whether src is char, but I might be missing something.  This patch implements what I propose.  I'll pass it through upstream now.

Comment 3 Petr Machata 2011-11-29 00:53:19 UTC
https://svn.boost.org/trac/boost/ticket/6182 is the upstream ticket.

Comment 4 Petr Machata 2011-11-29 15:22:13 UTC
I built a package that should fix this issue.  Could you please try whether it actually does?

Comment 5 Rich Mattes 2011-11-30 00:45:16 UTC
Looks like your update has taken care of the issue, I was able to build ompl against it.  Thanks for looking at this, I'll go ahead and close this ticket as fixed.

http://koji.fedoraproject.org/koji/buildinfo?buildID=275880