Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#32558 closed defect (fixed)

mkvtoolnix: error: ‘boost::BOOST_FOREACH’ has not been declared

Reported by: palmer100@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: machsna (J. ‘mach’ Wust), adfernandes (Andrew Fernandes), akimd (Akim Demaille), macports.org@…, lrenaud (Luke)
Port: mkvtoolnix

Description (last modified by ryandesign (Ryan Carsten Schmidt))

sudo port install mkvtoolnix errors out

I've tried switching compilers (gcc and apple gcc) and both of those fail too

I'm using Xcode 4.2.1 on the latest version of MacOSX Lion with MacPorts 2.0.3

Error: Error: Target org.macports.build returned: shell command failed (see log for details)
Log for mkvtoolnix is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/main.log
Error: Status 1 encountered during processing.

Log File Output:

:info:build      CXX src/common/version.cpp
:info:build      CXX src/common/wavpack.cpp
:info:build In file included from src/common/wavpack.cpp:18:
:info:build In file included from src/common/common_pch.h:4:
:info:build In file included from src/common/common.h:22:
:info:build In file included from /opt/local/include/boost/regex.hpp:31:
:info:build In file included from /opt/local/include/boost/regex/v4/regex.hpp:70:
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: warning: equality comparison with extraneous parentheses [-Wparentheses]
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: remove extraneous parentheses around the comparison to silence this warning
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                     ~            ^                             ~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: use '=' to turn this equality comparison into an assignment
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                                  ^~
:info:build                                  =
:info:build In file included from src/common/version.cpp:14:
:info:build In file included from src/common/common_pch.h:4:
:info:build In file included from src/common/common.h:22:
:info:build In file included from /opt/local/include/boost/regex.hpp:31:
:info:build In file included from /opt/local/include/boost/regex/v4/regex.hpp:70:
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34:/opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1116: warning: equality comparison with extraneous parentheses [-Wparentheses]
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build 18:                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: remove extraneous parentheses around the comparison to silence this warning
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                     ~            ^                             ~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: use '=' to turn this equality comparison into an assignment
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                                  ^~
:info:build                                  =
:info:build warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\n'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1117:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\r'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1118:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\f'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1116:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\n'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1117:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\r'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1118:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\f'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1305:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\n'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1306:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\r'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp/opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: warning: equality comparison with extraneous parentheses [-Wparentheses]
:info:build :               if((p->type == syntax_element_recurse))
:info:build                    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: remove extraneous parentheses around the comparison to silence this warning
:info:build                if((p->type == syntax_element_recurse))
:info:build                   ~        ^                        ~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: use '=' to turn this equality comparison into an assignment
:info:build                if((p->type == syntax_element_recurse))
:info:build                            ^~
:info:build                            =
:info:build 1305:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\n'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1306:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\r'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: warning: equality comparison with extraneous parentheses [-Wparentheses]
:info:build                if((p->type == syntax_element_recurse))
:info:build                    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: remove extraneous parentheses around the comparison to silence this warning
:info:build                if((p->type == syntax_element_recurse))
:info:build                   ~        ^                        ~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: use '=' to turn this equality comparison into an assignment
:info:build                if((p->type == syntax_element_recurse))
:info:build                            ^~
:info:build                            =
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:528:13: warning: unused function 'char_less' [-Wunused-function]
:info:build inline bool char_less<char>(char t1, char t2)
:info:build             ^
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:533:13: warning: unused function 'char_less' [-Wunused-function]
:info:build inline bool char_less<signed char>(signed char t1, signed char t2)
:info:build             ^
:info:build In file included from src/common/version.cpp:19:
:info:build In file included from /opt/local/include/boost/property_tree/ptree.hpp:23:
:info:build /opt/local/include/boost/multi_index/sequenced_index.hpp:926:10: error: no member named 'BOOST_FOREACH' in namespace 'boost'
:info:build   boost::foreach::tag)
:info:build   ~~~~~~~^
:info:build src/common/common.h:84:34: note: instantiated from:
:info:build #define foreach                  BOOST_FOREACH
:info:build                                  ^
:info:build In file included from src/common/version.cpp:19:
:info:build In file included from /opt/local/include/boost/property_tree/ptree.hpp:23:
:info:build /opt/local/include/boost/multi_index/sequenced_index.hpp:926:19: error: C++ requires a type specifier for all declarations
:info:build   boost::foreach::tag)
:info:build   ~~~~~           ^
:info:build In file included from src/common/version.cpp:19:
:info:build In file included from /opt/local/include/boost/property_tree/ptree.hpp:24:
:info:build /opt/local/include/boost/multi_index/ordered_index.hpp:1399:10: error: no member named 'BOOST_FOREACH' in namespace 'boost'
:info:build   boost::foreach::tag)
:info:build   ~~~~~~~^
:info:build src/common/common.h:84:34: note: instantiated from:
:info:build #define foreach                  BOOST_FOREACH
:info:build                                  ^
:info:build In file included from src/common/version.cpp:19:
:info:build In file included from /opt/local/include/boost/property_tree/ptree.hpp:24:
:info:build /opt/local/include/boost/multi_index/ordered_index.hpp:1399:19: error: C++ requires a type specifier for all declarations
:info:build   boost::foreach::tag)
:info:build   ~~~~~           ^
:info:build 9 warnings generated.
:info:build      CXX src/common/webm.cpp
:info:build 7 warnings and 4 errors generated.
:info:build In file included from src/common/webm.cpp:14:
:info:build In file included from src/common/common_pch.h:4:
:info:build In file included from src/common/common.h:22:
:info:build In file included from /opt/local/include/boost/regex.hpp:31:
:info:build In file included from /opt/local/include/boost/regex/v4/regex.hpp:70:
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: warning: equality comparison with extraneous parentheses [-Wparentheses]
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: remove extraneous parentheses around the comparison to silence this warning
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                     ~            ^                             ~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: use '=' to turn this equality comparison into an assignment
:info:build             else if((state->type == syntax_element_long_set_rep)) 
:info:build                                  ^~
:info:build                                  =
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1116:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\n'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1117:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\r'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1118:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\f'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1305:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\n'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1306:18: warning: array subscript is of type 'char' [-Wchar-subscripts]
:info:build             l_map['\r'] |= mask;
:info:build                  ^~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: warning: equality comparison with extraneous parentheses [-Wparentheses]
:info:build                if((p->type == syntax_element_recurse))
:info:build                    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: remove extraneous parentheses around the comparison to silence this warning
:info:build                if((p->type == syntax_element_recurse))
:info:build                   ~        ^                        ~
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: use '=' to turn this equality comparison into an assignment
:info:build                if((p->type == syntax_element_recurse))
:info:build                            ^~
:info:build                            =
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:528:13: warning: unused function 'char_less' [-Wunused-function]
:info:build inline bool char_less<char>(char t1, char t2)
:info:build             ^
:info:build /opt/local/include/boost/regex/v4/basic_regex_creator.hpp:533:13: warning: unused function 'char_less' [-Wunused-function]
:info:build inline bool char_less<signed char>(signed char t1, signed char t2)
:info:build             ^
:info:build 9 warnings generated.
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/work/mkvtoolnix-5.0.1" && ./drake default -j2 " returned error 1
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for mkvtoolnix): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for mkvtoolnix is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/main.log

Attachments (1)

main.log (554.0 KB) - added by palmer100@… 13 years ago.
log for mkvtoolnix build

Download all attachments as: .zip

Change History (27)

Changed 13 years ago by palmer100@…

Attachment: main.log added

log for mkvtoolnix build

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: mkvtoolnix removed
Owner: changed from macports-tickets@… to kona8lend@…

Please remember to use WikiFormatting and to Cc the maintainer of the port.

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: mkvtoolnix errors out on installation in Mac OSX Lionmkvtoolnix: error: ‘boost::BOOST_FOREACH’ has not been declared

Not Lion-specific. Probably an incompatibility with the latest boost 1.48.0. Maybe updating mkvtoolnix to 5.1.0 would help?

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Oh right, we discussed this before, mkvtoolnix 5.1.0 requires gcc 4.6 or higher, which makes it undesirable in MacPorts.

comment:4 in reply to:  description ; Changed 13 years ago by Kona8lend@…

Replying to palmer100@…:

sudo port install mkvtoolnix errors out

I've tried switching compilers (gcc and apple gcc) and both of those fail too

I'm using Xcode 4.2.1 on the latest version of MacOSX Lion with MacPorts 2.0.3

This looks like a known boost 1.48.0 bug and has been fixed in boost upstream. Only workarounds I know of is to drop down to boost 1.47.0 or cherry-pick the patch from boost upstream.

comment:5 in reply to:  4 ; Changed 13 years ago by gmendoza@…

Replying to Kona8lend@…:

This looks like a known boost 1.48.0 bug and has been fixed in boost upstream. Only workarounds I know of is to drop down to boost 1.47.0 or cherry-pick the patch from boost upstream.


Downgrading boost helped me out. I was getting the same error. Thanks.

$ port installed boost
The following ports are currently installed:
  boost @1.46.1_0
  boost @1.47.0_0
  boost @1.48.0_2 (active)

$ sudo port activate boost @1.47.0_0
--->  Computing dependencies for boost
--->  Deactivating boost @1.48.0_2
--->  Cleaning boost
--->  Activating boost @1.47.0_0
--->  Cleaning boost

$ sudo port install mkvtoolnix
--->  Computing dependencies for mkvtoolnix
--->  Building mkvtoolnix
--->  Staging mkvtoolnix into destroot
--->  Installing mkvtoolnix @5.0.1_0
--->  Activating mkvtoolnix @5.0.1_0
--->  Cleaning mkvtoolnix

comment:6 in reply to:  5 ; Changed 13 years ago by gmendoza@…

Replying to gmendoza@…:


Downgrading boost helped me out. I was getting the same error. Thanks.

But of course, mkvmerge doesn't run after downgrading boost. Doh!

$ mkvmerge
dyld: Library not loaded: /opt/local/lib/libicuuc.46.dylib
  Referenced from: /opt/local/lib/libboost_regex-mt.dylib
  Reason: image not found
Trace/BPT trap: 5

Downgrading boost and icu results in a segfault when running mkvmerge. Had to downgrade mkvtoolnix as well. The following is the only working combo for me.

$ port installed boost icu mkvtoolnix
The following ports are currently installed:
  boost @1.46.1_0
  boost @1.47.0_0 (active)
  boost @1.48.0_2
  icu @4.6.1_0 (active)
  icu @4.8.1_0
  mkvtoolnix @4.6.0_0
  mkvtoolnix @4.7.0_0
  mkvtoolnix @4.8.0_0 (active)
  mkvtoolnix @5.0.1_0

comment:7 Changed 13 years ago by machsna (J. ‘mach’ Wust)

Cc: j_mach_wust@… added

Cc Me!

comment:8 in reply to:  6 Changed 13 years ago by machsna (J. ‘mach’ Wust)

Replying to gmendoza@…:

But of course, mkvmerge doesn't run after downgrading boost. Doh!

I have been able to build mkvtoolnix @5.0.1_0 after downgrading boost to @1.47.0_2 (Xcode 4.2.1, Mac OS X 10.7.2, MacPorts 2.0.3), and mkvmerge seems to be running just fine.

comment:9 Changed 13 years ago by adfernandes (Andrew Fernandes)

Cc: adfernandes@… added

Cc Me!

comment:10 Changed 13 years ago by adfernandes (Andrew Fernandes)

I've added the cherry-picked patches suggested in #32443 in r88202. Upstream these are https://svn.boost.org/trac/boost/ticket/6131 and https://svn.boost.org/trac/boost/changeset/75540.

Please let me know if this ticket can be closed.

comment:11 Changed 13 years ago by machsna (J. ‘mach’ Wust)

You guys are the best! With boost @1.48.0_3, mkvtoolnix @5.0.1_0 works just fine for me.

comment:12 Changed 13 years ago by adfernandes (Andrew Fernandes)

Resolution: fixed
Status: newclosed

comment:13 Changed 13 years ago by akimd (Akim Demaille)

Resolution: fixed
Status: closedreopened

Because of that fix, it is no longer possible to have a workaround common to all the Boost versions! It was trivial to fix 1.48 by define the macro *before* including the header:

/// \def foreach
/// \brief A shortcut for \a BOOST_FOREACH.
///
/// Not to be confused with libport::for_each.

// No redefinition if already defined by other libraries.
//
// It would seem saner to declare this macro *after* having included
// the definition of BOOST_FOREACH, but BOOST_FOREACH is actually
// buggy, and uses the identifier "foreach" as a namespace on
// occasion.  And unfortunately, this shows (see
// http://thread.gmane.org/gmane.comp.lib.boost.user/71410, and
// https://svn.boost.org/trac/boost/ticket/6131).
//
// Luckily, Boost.Foreach is header-only, so one way out is to
// make sure we use BOOST_FOREACH consistently *everywhere*, so define
// foreach before including the header.
//
// And never use boost/foreach.hpp, only libport/foreach.hh.
#ifndef foreach
# define foreach BOOST_FOREACH
#endif

/// \def rforeach
/// \brief Shortcut for \a BOOST_REVERSE_FOREACH
# define rforeach BOOST_REVERSE_FOREACH

# include <libport/system-warning-push.hh>
#  include <boost/foreach.hpp>
# include <libport/system-warning-pop.hh>

Now this simple fix which was common to all the architectures will not work on MacPorts! How the heck am I supposed to have code that works properly via CPP now???

Fixing a library such as Boost seems wrong to me, too much entropy pushed on the users.

comment:14 in reply to:  13 Changed 13 years ago by akimd (Akim Demaille)

Replying to akim.demaille@…:

Because of that fix, it is no longer possible to have a workaround common to all the Boost versions! It was trivial to fix 1.48 by define the macro *before* including the header:

Now:

distcc[34515] ERROR: compile /Users/akim/.ccache/tmp/backtrace.tmp.padam.local.34511.ii on localhost failed
In file included from ../../../../sdk-remote/libport/include/libport/foreach.hh:46,
                 from ../../../../sdk-remote/libport/include/libport/containers.hh:29,
                 from ../../../../sdk-remote/libport/lib/libport/backtrace.cc:17:
/opt/local/include/boost/foreach.hpp:125: error: redefinition of 'struct boost::BOOST_FOREACH::is_lightweight_proxy<T>'
/opt/local/include/boost/foreach_fwd.hpp:63: error: previous definition of 'struct boost::BOOST_FOREACH::is_lightweight_proxy<T>'
/opt/local/include/boost/foreach.hpp:135: error: redefinition of 'struct boost::BOOST_FOREACH::is_noncopyable<T>'
/opt/local/include/boost/foreach_fwd.hpp:68: error: previous definition of 'struct boost::BOOST_FOREACH::is_noncopyable<T>'
/opt/local/include/boost/foreach_fwd.hpp: In instantiation of 'boost::BOOST_FOREACH::is_noncopyable<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >':

of course.

comment:15 Changed 13 years ago by akimd (Akim Demaille)

Cc: akim.demaille@… added

Cc Me!

comment:16 in reply to:  13 ; Changed 13 years ago by adfernandes (Andrew Fernandes)

Now this simple fix which was common to all the architectures will not work on MacPorts! How the heck am I supposed to have code that works properly via CPP now???

Fixing a library such as Boost seems wrong to me, too much entropy pushed on the users.

As a long-time boost user, I understand your frustration. However, this sort of thing is typical of Boost; the "official" way of handling this is to check boost versions or some-such.

The main problem is that the patches that I committed are Already part of boost, so they will have to be dealt with at some point.

The horrible truth is that most packages I've seen usually include a private copy of boost that they build and test, precisely to avoid this sort of thing.

If I remove the patches as suggested, the port will simply break in a couple of months when the next release of boost comes out.

comment:17 in reply to:  16 Changed 13 years ago by akimd (Akim Demaille)

Replying to adfernandes@…:

The main problem is that the patches that I committed are Already part of boost, so they will have to be dealt with at some point.

Hi!

Thanks for your answer. My point is that with "pure" Boost releases, it's very easy to deal with the release: just depend on BOOST_VERSION to select whether you first need to include <foreach.hpp> or to define foreach. My code is already ready for 1.49. But in this case, even if BOOST_VERSION tells me this is 1.48, it is actually not. So now I have a very weak workaround where I depend on both __APPLE__ and BOOST_VERSION to decide which order to use. The very fragile heuristics is based on the idea that on OS X, this Boost is probably the MacPorts' one.

What would really be extremely helpful is that MacPorts' Boost enrich <boost/version.hpp> with some MACPORTS_BOOST_VERSION on which to safely depend.

comment:18 Changed 13 years ago by adfernandes (Andrew Fernandes)

Resolution: fixed
Status: reopenedclosed

Huh. I see your logic; macports really can't/shouldn't patch boost's functionality, only the build and install. :-( Sigh.

I'm backing out r88202 so we have a "pure" 1.48.0, and the standard boost headers can be used for version-checking and work-arounds.

Dang; another boost-build cycle.

Thanks for the feedback, BTW - it is very easy to get lost between fixing bugs in boost and the horrific boost-build, and the macports installation!

Committed in r88683.

comment:19 in reply to:  18 Changed 13 years ago by akimd (Akim Demaille)

Replying to adfernandes@…:

Huh. I see your logic; macports really can't/shouldn't patch boost's functionality, only the build and install. :-( Sigh.

I'm backing out r88202 so we have a "pure" 1.48.0, and the standard boost headers can be used for version-checking and work-arounds.

Thanks!

Thanks for the feedback, BTW - it is very easy to get lost between fixing bugs in boost and the horrific boost-build, and the macports installation!

I sure understand you're in a tough position!

Happy new year!

comment:20 Changed 13 years ago by macports.org@…

Resolution: fixed
Status: closedreopened

So what is the solution for mkvtoolnix now? Currently, with boost @1.48.0_4, mkvtoolnix @5.0.1_0, the reported compilation error is fully present again.

Should I patch my local boost portfile just to get mkvtoolnix to work?

comment:21 Changed 13 years ago by macports.org@…

My work-around is to downgrade to boost 1.47.0 rev 2 for now:

svn co http://svn.macports.org/repository/macports/trunk/dports/devel/boost@85591
cd boost
sudo port install
sudo port clean mkvtoolnix
sudo port install mkvtoolnix

Presumably we'll have to wait for boost 1.49.0 for this bug to be properly resolved? Or can mkvtoolnix be patched to check BOOST_VERSION and include foreach.hpp conditionally, as akim.demaille@… suggests? I am no C++ (let alone boost) developer, so I am but a layman when it comes to this issue.

comment:22 Changed 13 years ago by Kona8lend@…

It's a mistake to kill a bonafide fix to save an inflexible hack.

re: macro hack listed above: To make the hack co-exist with r88202 the hack must be improved. Why must it be header-only? Use a configure-time check. Yes it's not as easy as header-only, but at least it doesn't throw mkvtoolnix (and others) under the bus.

...and with pure 1.48.0 any ports that use boost foreach sans hack are also broken. And they'll stay broken until someone fixes them or another lengthy boost release cycle and port bump.

So why strive to keep 1.48.0 "pure" to please 1 (external?) project at the expense of at least 1 (internal) port. There's more reason to keep unhacked-ports working than there is to keep a hacked-port etched in stone.

btw, I should be taken off as owner of this ticket. thanks.

comment:23 Changed 13 years ago by macports.org@…

Cc: macports.org@… added

Cc Me!

comment:24 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from kona8lend@… to macports-tickets@…
Status: reopenednew

comment:25 Changed 13 years ago by ecronin (Eric Cronin)

Resolution: fixed
Status: newclosed

r88909 should work around this until the next boost release is made. Tested on Lion and Snow Leopard.

comment:26 Changed 13 years ago by lrenaud (Luke)

Cc: luke.renaud@… added

Cc Me!

Note: See TracTickets for help on using tickets.