Bug 697328 - BOOST_IOSTREAMS_USE_DEPRECATED does not work
Summary: BOOST_IOSTREAMS_USE_DEPRECATED does not work
Keywords:
Status: CLOSED DUPLICATE of bug 667294
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Benjamin Kosnik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-17 19:32 UTC by Rob Riggs
Modified: 2013-08-09 05:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-22 14:58:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rob Riggs 2011-04-17 19:32:21 UTC
Description of problem:
BOOST_IOSTREAMS_USE_DEPRECATED appears to have not been defined when the boost libraries were built. This is defined by default when built with Jam according to this post:
http://permalink.gmane.org/gmane.comp.lib.boost.devel/208456

This prevents the use of this define by client code.  When building code that is compiled with this define, the linker reports undefined symbols:

undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(int, bool)'

Version-Release number of selected component (if applicable):
boost-1.44.0-7

How reproducible:
Always

Steps to Reproduce:
1. Use the following code as iostreams.C:
#define BOOST_IOSTREAMS_USE_DEPRECATED

#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <iostream>

int main()
{
    namespace io = boost::iostreams;
    io::file_descriptor_sink fds(1, true);
    io::filtering_ostream my_cout(fds);
    my_cout << "Hello, world." << std::endl;
    return EXIT_SUCCESS;
}

2. Build with "make LDFLAGS=-lboost_iostreams iostreams"
3. Note the build results.
  
Actual results:
g++ -g  -Wall -lboost_iostreams  iostreams.C   -o iostreams
/tmp/ccstARDG.o: In function `main':
/home/rob/iostreams.C:11: undefined reference to `boost::iostreams::file_descriptor_sink::file_descriptor_sink(int, bool)'
collect2: ld returned 1 exit status
make: *** [iostreams] Error 1


Expected results:
A successful compile and link phase, resulting in an executable.

Additional info:
This bug does not exist in Fedora 15's boost-1.46.0 package so maybe it was fixed there and needs to be backported?

This apparently was introduced while trying to resolve 667294

Comment 1 Rob Riggs 2011-04-17 19:51:47 UTC
OK... I did not read through 667294 well enough.  I see that this was reported in that thread.  I have upgraded to boost-1.44.0-8.fc14 and all is well.

Please push to stable.  I've added my vote for that package.

Please close this report or merge into 667294.

Comment 2 Denis Arnaud 2011-04-22 14:58:36 UTC

*** This bug has been marked as a duplicate of bug 667294 ***


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