Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

Amit Kulkarni-5
> > It seems openscad & pokerth are still broken even after the

>  > > update/followup commits:
> > > /usr/local/include/boost/type_traits/detail/has_binary_operator.hp:50:
> > > Parse error at "BOOST_JOIN"
> > >
> > > monotone fails with:
> > > keys.cc:47: error: 'boost::shared_dynamic_cast' has not been declared
> > > keys.cc: In function 'boost::shared_ptr<Botan::RSA_PrivateKey>
> > > get_private_key(lua_hooks&, const rsa_keypair_id&, const
> > > base64<rsa_priv_key>&, bool)':
> > > keys.cc:266: error: 'shared_dynamic_cast' was not declared in this
> scope
> > >
> > > Landry
> > >
> > >
> > Sorry for the breakage. I will take a look tonight. In the meantime, can
> > you please mark them as broken?
>
> The breakage is now known & reproducible, and it's been broken for 5
> days - no point in marking it BROKEN if it's fixed soon imo. I think BROKEN
> is more for 'permanent' failures.
>
>
I didn't know about it till you pointed this out to me in this email. I now
understand your other comment in the commit.

To reproduce this: I wiped out everything yesterday and left the machine
building the affected ports pokerth/openscad from scratch. I had shadowed
openbsd-wip in PORTS_DIR /etc/mk.conf, and I removed it. I have no idea why
I didn't see this particular error before.

The parse BOOST_JOIN error is due to automoc.
https://bugreports.qt-project.org/browse/QTBUG-22829

Can this be fixed in x11/qt4? like shown here
http://pkgs.fedoraproject.org/cgit/qt.git/tree/qt-everywhere-opensource-src-4.8.0-rc1-moc-boost148.patch?id=f0ce6564e29e22eac504c538698517bdcef80061;id2=060db3c767b670dc1e168252644c937abc9fe607

diff -ur qt-everywhere-opensource-src-4.8.0/src/tools/moc/main.cpp
qt-everywhere-opensource-src-4.8.0-moc-boost148/src/tools/moc/main.cpp
--- qt-everywhere-opensource-src-4.8.0/src/tools/moc/main.cpp 2011-10-04
05:44:32.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.0-moc-boost148/src/tools/moc/main.cpp 2011-12-04
00:11:25.000000000 +0100
@@ -187,6 +187,7 @@
     Moc moc;
     pp.macros["Q_MOC_RUN"];
     pp.macros["__cplusplus"];
+    pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"]; // rh#756395
     QByteArray filename;
     QByteArray output;
     FILE *in = 0;


Vadim used the same workaround in devel/automoc, and for some reason I have
yet to figure out, automoc was not being explicitly used in
pokerth/openscad.

I will try to upgrade devel/monotone to 1.0, it is at 0.39 currently. That
is something I missed completely, my fault. If you come across any other
build failures please let me know, and I will fix it ASAP.
Reply | Threaded
Open this post in threaded view
|

Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

Amit Kulkarni-5
>
> > > > update/followup commits:
> > > > /usr/local/include/boost/type_traits/detail/has_binary_operator.hp:50:
> > > > Parse error at "BOOST_JOIN"

attached is a fix for cad/openscad. i could not fix the compile failures using the workarounds mentioned in previous email. will take a look at games/pokerth tomorrow. i swear i packaged it successfully otherwise how could i get a PLIST? puzzled as to what changed in the interim.

thanks

The Makefile has a dummy line feed to force it to show the port where this patch should apply.

Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/openscad/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile 10 Mar 2013 23:04:45 -0000 1.5
+++ Makefile 13 Mar 2013 02:59:18 -0000
@@ -24,6 +24,7 @@ MASTER_SITES = https://openscad.googlec
 DISTFILES = openscad-${V}.src.tar.gz
 
 MODULES = x11/qt4
+
 BUILD_DEPENDS = devel/bison \
  devel/flex \
  math/eigen2
Index: patches/patch-src_value_h
===================================================================
RCS file: patches/patch-src_value_h
diff -N patches/patch-src_value_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_value_h 13 Mar 2013 02:59:18 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+https://github.com/openscad/openscad/commit/660301589762048cd33ff54b9b1ea586be8062f2
+
+--- src/value.h.orig Tue Mar 12 21:56:50 2013
++++ src/value.h Tue Mar 12 21:57:15 2013
+@@ -3,8 +3,11 @@
+
+ #include <vector>
+ #include <string>
++
++#ifndef Q_MOC_RUN
+ #include <boost/variant.hpp>
+ #include <boost/lexical_cast.hpp>
++#endif
+
+ class QuotedString : public std::string
+ {

Reply | Threaded
Open this post in threaded view
|

Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

Brad Smith-14
On Tue, Mar 12, 2013 at 10:00:07PM -0500, Amit Kulkarni wrote:

> >
> > > > > update/followup commits:
> > > > > /usr/local/include/boost/type_traits/detail/has_binary_operator.hp:50:
> > > > > Parse error at "BOOST_JOIN"
>
> attached is a fix for cad/openscad. i could not fix the compile failures using the workarounds mentioned in previous email. will take a look at games/pokerth tomorrow. i swear i packaged it successfully otherwise how could i get a PLIST? puzzled as to what changed in the interim.
>
> thanks
>
> The Makefile has a dummy line feed to force it to show the port where this patch should apply.

No, I don't want to go down this route. I'm still building Qt4 but I want to
patch Moc as that is where the issue is. Moc in Qt5 has already been fixed
of its deficiency. That just leaves monotone left and someone had posted an
update. You need something newer than 1.0 though.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

Amit Kulkarni-5
> > > > > > update/followup commits:
> > > > > > /usr/local/include/boost/type_traits/detail/has_binary_operator.hp:50:
> > > > > > Parse error at "BOOST_JOIN"
> >
> > attached is a fix for cad/openscad. i could not fix the compile failures using the workarounds mentioned in previous email. will take a look at games/pokerth tomorrow. i swear i packaged it successfully otherwise how could i get a PLIST? puzzled as to what changed in the interim.
> >
> > thanks
> >
> > The Makefile has a dummy line feed to force it to show the port where this patch should apply.
>
> No, I don't want to go down this route. I'm still building Qt4 but I want to
> patch Moc as that is where the issue is. Moc in Qt5 has already been fixed
> of its deficiency. That just leaves monotone left and someone had posted an
> update. You need something newer than 1.0 though.


Attached is a patch for qt4, which fixes cad/openscad and games/pokerth. It fixes the compile errors, it also lists where the bugfix is lifted from. I cleaned everything and then built qt4 with the patch. Obviously this needs to go in a bulk before its committed.

The second line BOOST_LEXICAL_CAST_INCLUDED is also needed, at least when I tested it on amd64.

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt4/Makefile,v
retrieving revision 1.109
diff -u -p -r1.109 Makefile
--- Makefile 11 Mar 2013 11:46:15 -0000 1.109
+++ Makefile 14 Mar 2013 17:52:45 -0000
@@ -24,7 +24,7 @@ PKGNAME-debug = qt4-debug-${PKGVERSION}
 FULLPKGNAME-html = qt4-html-${PKGVERSION}
 FULLPKGPATH-html = ${BASE_PKGPATH},-html
 
-REVISION-main= 5
+REVISION-main= 6
 REVISION-mysql= 0
 REVISION-postgresql= 0
 REVISION-examples= 0
Index: patches/patch-src_tools_moc_main_cpp
===================================================================
RCS file: patches/patch-src_tools_moc_main_cpp
diff -N patches/patch-src_tools_moc_main_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_tools_moc_main_cpp 14 Mar 2013 17:52:45 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Fix for the BOOST_JOIN parse error in games/pokerth & cad/openscad + other places...
+
+--- src/tools/moc/main.cpp.orig Wed Mar 13 11:20:37 2013
++++ src/tools/moc/main.cpp Wed Mar 13 11:22:12 2013
+@@ -187,6 +187,12 @@ int runMoc(int _argc, char **_argv)
+     Moc moc;
+     pp.macros["Q_MOC_RUN"];
+     pp.macros["__cplusplus"];
++
++    // http://pkgs.fedoraproject.org/cgit/qt.git/commit/?id=22f92f680b88a10f179eaa121b367446a6c80f7a
++
++    pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
++    pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
++
+     QByteArray filename;
+     QByteArray output;
+     FILE *in = 0;

Reply | Threaded
Open this post in threaded view
|

Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

Brad Smith-14
On Thu, Mar 14, 2013 at 12:58:32PM -0500, Amit Kulkarni wrote:

> > > > > > > update/followup commits:
> > > > > > > /usr/local/include/boost/type_traits/detail/has_binary_operator.hp:50:
> > > > > > > Parse error at "BOOST_JOIN"
> > >
> > > attached is a fix for cad/openscad. i could not fix the compile failures using the workarounds mentioned in previous email. will take a look at games/pokerth tomorrow. i swear i packaged it successfully otherwise how could i get a PLIST? puzzled as to what changed in the interim.
> > >
> > > thanks
> > >
> > > The Makefile has a dummy line feed to force it to show the port where this patch should apply.
> >
> > No, I don't want to go down this route. I'm still building Qt4 but I want to
> > patch Moc as that is where the issue is. Moc in Qt5 has already been fixed
> > of its deficiency. That just leaves monotone left and someone had posted an
> > update. You need something newer than 1.0 though.
>
>
> Attached is a patch for qt4, which fixes cad/openscad and games/pokerth. It fixes the compile errors, it also lists where the bugfix is lifted from. I cleaned everything and then built qt4 with the patch. Obviously this needs to go in a bulk before its committed.
>
> The second line BOOST_LEXICAL_CAST_INCLUDED is also needed, at least when I tested it on amd64.

I had sent a diff to landry@ to run through a bulk build but this should be
tested instead with the one additional entry.


> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/qt4/Makefile,v
> retrieving revision 1.109
> diff -u -p -r1.109 Makefile
> --- Makefile 11 Mar 2013 11:46:15 -0000 1.109
> +++ Makefile 14 Mar 2013 17:52:45 -0000
> @@ -24,7 +24,7 @@ PKGNAME-debug = qt4-debug-${PKGVERSION}
>  FULLPKGNAME-html = qt4-html-${PKGVERSION}
>  FULLPKGPATH-html = ${BASE_PKGPATH},-html
>  
> -REVISION-main= 5
> +REVISION-main= 6
>  REVISION-mysql= 0
>  REVISION-postgresql= 0
>  REVISION-examples= 0
> Index: patches/patch-src_tools_moc_main_cpp
> ===================================================================
> RCS file: patches/patch-src_tools_moc_main_cpp
> diff -N patches/patch-src_tools_moc_main_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_tools_moc_main_cpp 14 Mar 2013 17:52:45 -0000
> @@ -0,0 +1,19 @@
> +$OpenBSD$
> +
> +Fix for the BOOST_JOIN parse error in games/pokerth & cad/openscad + other places...
> +
> +--- src/tools/moc/main.cpp.orig Wed Mar 13 11:20:37 2013
> ++++ src/tools/moc/main.cpp Wed Mar 13 11:22:12 2013
> +@@ -187,6 +187,12 @@ int runMoc(int _argc, char **_argv)
> +     Moc moc;
> +     pp.macros["Q_MOC_RUN"];
> +     pp.macros["__cplusplus"];
> ++
> ++    // http://pkgs.fedoraproject.org/cgit/qt.git/commit/?id=22f92f680b88a10f179eaa121b367446a6c80f7a
> ++
> ++    pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
> ++    pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
> ++
> +     QByteArray filename;
> +     QByteArray output;
> +     FILE *in = 0;
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: boost 1.53.0 related breakage (WAS Re: CVS: cvs.openbsd.org: ports)

Amit Kulkarni-5
In reply to this post by Brad Smith-14
> of its deficiency. That just leaves monotone left and someone had posted an
> update. You need something newer than 1.0 though.

afaik, there is no devel/monotone release after 1.0

found some botan configure errors for monotone 1.0, the update can come later from interested porters.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/monotone/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 11 Mar 2013 10:50:11 -0000 1.7
+++ Makefile 14 Mar 2013 20:13:44 -0000
@@ -17,7 +17,7 @@ WANTLIB += c m stdc++ z
 MASTER_SITES= ${HOMEPAGE}downloads/${VERSION}/
 
 MODULES= devel/gettext
-BUILD_DEPENDS= devel/boost
+BUILD_DEPENDS= devel/boost>=1.53.0
 
 USE_GMAKE= Yes
 CONFIGURE_STYLE=gnu
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/monotone/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo 3 Apr 2008 07:47:45 -0000 1.3
+++ distinfo 14 Mar 2013 20:13:44 -0000
@@ -1,5 +1,2 @@
-MD5 (monotone-0.39.tar.gz) = UiyQyZ4Yo1wx49+l+EmQNA==
-RMD160 (monotone-0.39.tar.gz) = 1VnDGOGPgBUToXCTb7VrbhrEEjU=
-SHA1 (monotone-0.39.tar.gz) = s0x+JYcd3/HjDRW3M8HzKD7Bbek=
 SHA256 (monotone-0.39.tar.gz) = d6Po7CmlXHOltgDQlUCCARgAAmVrRqF10jVPdoN0tOw=
 SIZE (monotone-0.39.tar.gz) = 5332200
Index: patches/patch-keys_cc
===================================================================
RCS file: patches/patch-keys_cc
diff -N patches/patch-keys_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-keys_cc 14 Mar 2013 20:13:44 -0000
@@ -0,0 +1,63 @@
+$OpenBSD$
+
+patch for boost 1.53.0 from
+http://lists.nongnu.org/archive/html/monotone-devel/2013-03/msg00000.html
+which further references the actual patch at
+http://alt.linux.kiev.ua/ru/srpm/Sisyphus/monotone/patches/0
+
+--- keys.cc.orig Thu Mar 14 14:50:41 2013
++++ keys.cc Thu Mar 14 14:51:53 2013
+@@ -44,7 +44,7 @@ using std::vector;
+
+ using boost::scoped_ptr;
+ using boost::shared_ptr;
+-using boost::shared_dynamic_cast;
++using boost::dynamic_pointer_cast;
+
+ using Botan::byte;
+ using Botan::get_cipher;
+@@ -263,7 +263,7 @@ get_private_key(lua_hooks & lua,
+   if (pkcs8_key)
+     {
+       shared_ptr<RSA_PrivateKey> priv_key;
+-      priv_key = shared_dynamic_cast<RSA_PrivateKey>(pkcs8_key);
++      priv_key = dynamic_pointer_cast<RSA_PrivateKey>(pkcs8_key);
+       if (!priv_key)
+         throw informative_failure("Failed to get RSA signing key");
+
+@@ -318,7 +318,7 @@ migrate_private_key(app_state & app,
+           continue;
+         }
+
+-      priv_key = shared_dynamic_cast<RSA_PrivateKey>(pkcs8_key);
++      priv_key = dynamic_pointer_cast<RSA_PrivateKey>(pkcs8_key);
+       if (!priv_key)
+           throw informative_failure("Failed to get old RSA key");
+     }
+@@ -404,7 +404,7 @@ make_signature(app_state & app,           // to hook f
+         L(FL("make_signature: building %d-byte pub key") % pub_block.size());
+         shared_ptr<X509_PublicKey> x509_key =
+           shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
+-        shared_ptr<RSA_PublicKey> pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
++        shared_ptr<RSA_PublicKey> pub_key = dynamic_pointer_cast<RSA_PublicKey>(x509_key);
+
+         if (!pub_key)
+           throw informative_failure("Failed to get monotone RSA public key");
+@@ -524,7 +524,7 @@ check_signature(app_state &app,
+       L(FL("building verifier for %d-byte pub key") % pub_block.size());
+       shared_ptr<X509_PublicKey> x509_key =
+           shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
+-      pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
++      pub_key = dynamic_pointer_cast<RSA_PublicKey>(x509_key);
+       if (!pub_key)
+           throw informative_failure("Failed to get RSA verifying key");
+
+@@ -565,7 +565,7 @@ void encrypt_rsa(lua_hooks & lua,
+   pub_block.set(reinterpret_cast<Botan::byte const *>(pub().data()), pub().size());
+
+   shared_ptr<X509_PublicKey> x509_key = shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
+-  shared_ptr<RSA_PublicKey> pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
++  shared_ptr<RSA_PublicKey> pub_key = dynamic_pointer_cast<RSA_PublicKey>(x509_key);
+   if (!pub_key)
+     throw informative_failure("Failed to get RSA encrypting key");
+
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/monotone/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 27 May 2007 10:43:48 -0000 1.2
+++ pkg/PLIST 14 Mar 2013 20:13:44 -0000
@@ -1,5 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.2 2007/05/27 10:43:48 alek Exp $
-bin/mtn
+@bin bin/mtn
 @info info/monotone.info
 share/doc/monotone/
 share/doc/monotone/monotone.html