Bug 757385 - Error in boost lexical_cast
Summary: Error in boost lexical_cast
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: rawhide
Hardware: i686
OS: Unspecified
Target Milestone: ---
Assignee: Petr Machata
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 754865
TreeView+ depends on / blocked
Reported: 2011-11-26 19:15 UTC by Rich Mattes
Modified: 2015-05-05 01:36 UTC (History)
5 users (show)

Clone Of:
Last Closed: 2011-11-30 00:45:16 UTC

Attachments (Terms of Use)
Proposed fix (1.38 KB, patch)
2011-11-29 00:31 UTC, Petr Machata
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 760616 None None None Never
Red Hat Bugzilla 783660 None None None Never

Internal Trackers: 760616 783660

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

#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.


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