Opened 10 years ago

Closed 8 years ago

#7454 closed Bugs (fixed)

Compilation error using gcc 4.1.2 (free not in std namespace)

Reported by: anonymous Owned by: Jürgen Hunold
Milestone: To Be Determined Component: units
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc: josh.davidson@…

Description

Error /home/davidsj2/include/boost/units/detail/utility.hpp: In function 'std::string boost::units::detail::demangle(const char*)': /home/davidsj2/include/boost/units/detail/utility.hpp:48: error: 'mm_free' is not a member of 'std'

On that line, you'll find:

std::free(realname);

In order to get the software to build, I had to change to:

free(realname);

Environment [davidsj2@optimus ~]$ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-52) [davidsj2@optimus ~]$ uname -a Linux optimus 2.6.18-275.7.1.el5.572g0000 #1 SMP Mon Oct 31 19:15:23 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [davidsj2@optimus ~]$ tail /home/davidsj2/include/boost/version.hpp

BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION but as a *string* in the form "x_y[_z]" where x is the major version number, y is the minor version number, and z is the patch level if not 0. This is used by <config/auto_link.hpp> to select which library version to link to.

#define BOOST_LIB_VERSION "1_51"

#endif

Change History (4)

comment:1 by josh.davidson@…, 10 years ago

Cc: josh.davidson@… added

comment:2 by anonymous, 10 years ago

Same issue w/ gcc 4.4.x and 4.6.x

comment:3 by Jürgen Hunold, 8 years ago

Owner: changed from Matthias Schabel to Jürgen Hunold
Status: newassigned

comment:4 by Jürgen Hunold, 8 years ago

Resolution: fixed
Status: assignedclosed
Version: Boost 1.52.0Boost 1.57.0

This is fixed with #10116. We now use Boost.Core implementation of demangle.

Note: See TracTickets for help on using tickets.