Opened 14 years ago

Closed 14 years ago

#2084 closed Bugs (fixed)

Boost trunk will not build on a NetBSD machine.

Reported by: brook@… Owned by: John Maddock
Milestone: Boost 1.36.0 Component: config
Version: Boost Development Trunk Severity: Showstopper
Keywords: NetBSD installation Cc:

Description

There are at least two problems with boost-trunk that prevent it from building on a NetBSD machine. One (libdl need not be linked against) is already documented in ticket #2029, which still applies to the trunk. A patch for the other is attached. Like modern FreeBSD, NetBSD has support for wide characters.

Attachments (2)

patch (405 bytes ) - added by brook@… 14 years ago.
patch boost/config/platform/bsd.hpp for NetBSD wchar support
patch.2 (906 bytes ) - added by anonymous 14 years ago.
Correct patch for bsd.hpp to account for the NetBSD version of gcc and a necessary (for now) macro definition.

Download all attachments as: .zip

Change History (6)

by brook@…, 14 years ago

Attachment: patch added

patch boost/config/platform/bsd.hpp for NetBSD wchar support

comment:1 by René Rivera, 14 years ago

Component: buildconfig
Owner: changed from Vladimir Prus to John Maddock

comment:2 by John Maddock, 14 years ago

Status: newassigned

Hi there, do you know which NetBSD version introduced wide character support - in particular from which value of NetBSD does the change apply?

Thanks, John Maddock.

by anonymous, 14 years ago

Attachment: patch.2 added

Correct patch for bsd.hpp to account for the NetBSD version of gcc and a necessary (for now) macro definition.

comment:3 by brook@…, 14 years ago

I have added a new patch that works at least on a NetBSD/i386 system, but should work on others as well. The value of NetBSD is simply a boolean flag and is 1 for any NetBSD system. Thus, it cannot be used to detect the version of NetBSD. In this case, the issue is not about the version of NetBSD, but about the version of gcc. As far as I can tell from the gnu website, gcc 2.95.3 (which is the earliest one they describe) has wide character support, so I have chosen that as the condition. That version was imported into NetBSD many years ago, so it probably doesn't matter in practice that the conditional is more specific than just NetBSD.

More importantly, the boolean expression in the original patch was mistaken and this one adds a critical macro definition that unfortunately is not provided by the NetBSD version of gcc but is required to provide a std::swprintf declaration (required by Boost).

I believe this to be ready to commit, together with ticket:2029.

comment:4 by John Maddock, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [47853]) Fixes #2084.

Note: See TracTickets for help on using tickets.