povray: Fails to build (_Pragma errors)

  • Open
  • quality assurance status badge
Details
One participant
  • Ivan Vilata i Balaguer
Owner
unassigned
Submitted by
Ivan Vilata i Balaguer
Severity
normal
I
I
Ivan Vilata i Balaguer wrote on 17 Jan 2022 20:58
(address . bug-guix@gnu.org)
YeXKcBNztx65lpvt@sax.terramar.selidor.net
Hi! When trying to upgrade package `povray 3.7.0.8` from Guix commit
`404f6953` to that of commit `4a943cfd`, the build fails showing errors like
these:

```
[…]
depbase=`echo backend/scene/view.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../source/backend -I../source/base -I../source/frontend -I../unix -I../vfe -I../vfe/unix -I/gnu/store/l4k60q5jm9g2f3jslnhjsldls0l4vf9q-sdl-1.2.15/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -I/gnu/store/1wcfmirwkc5lvng6hlqg15v4278fyr96-openexr-2.5.7/include/OpenEXR -I/gnu/store/s6868fjm48yac4vf2kfdzx7z0kd2ny28-ilmbase-2.5.7/include/OpenEXR -pthread -I/usr/include -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -Wno-non-template-friend -s -O3 -ffast-math -pthread -MT backend/scene/view.o -MD -MP -MF $depbase.Tpo -c -o backend/scene/view.o backend/scene/view.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor.hpp:14,
from backend/scene/view.cpp:34:
/gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor_ct.hpp:17:68: error: _Pragma takes a parenthesized string literal
17 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor_ct.hpp>");
| ^
In file included from /gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor.hpp:15,
from backend/scene/view.cpp:34:
/gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor_rt.hpp:14:68: error: _Pragma takes a parenthesized string literal
14 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor_rt.hpp>");
| ^
In file included from backend/scene/view.cpp:34:
/gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor.hpp:18:65: error: _Pragma takes a parenthesized string literal
18 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor.hpp>");
| ^
[…]
In file included from /gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor_ct.hpp:15,
from /gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor.hpp:14,
from backend/scene/view.cpp:34:
/gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor_ct.hpp:17:1: error: ‘_Pragma’ does not name a type
17 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor_ct.hpp>");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor_rt.hpp:14:1: error: ‘_Pragma’ does not name a type
14 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor_rt.hpp>");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/gnu/store/rwv6khi7hg3hrhij9kimxh53mvg8ksd9-boost-1.77.0/include/boost/math/common_factor.hpp:18:1: error: ‘_Pragma’ does not name a type
18 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor.hpp>");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[…]
make[2]: Leaving directory '/tmp/guix-build-povray-3.7.0.8.drv-0/source/source'
make[1]: *** [Makefile:664: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-povray-3.7.0.8.drv-0/source'
make: *** [Makefile:457: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 168.1 seconds
command "make" "-j" "4" failed with status 2
```

Not completely sure, but the new commit may be using a compiler which isn't
compatible with the version of Boost used by POV-Ray?

Attaching the whole `/var/log/guix/drvs/ih/kyhpfcn84sg0qbavgaw5rcwxh7cr9w-povray-3.7.0.8.drv.bz2`.

Thanks!

--
Ivan Vilata i Balaguer -- https://elvil.net/
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEHpvwBPZcchIQr6TuPezBBfXdI4IFAmHlymoACgkQPezBBfXd
I4JOzRAAt9IqcQWDu5LnOJpm1FR0q/QyU6drFQch+FyyUsffO+Fn+ODN/ZpwFP5X
CJngnol9pG9Y7fzRzeqQF0WdKwZj/UkdDrhSXt/qIbQt06ZpwqxY6UApRz2ODg2t
E2EC8Am1RgFKOAR90MSi3rwzC9iIXtdIjjRgH8wY3mtzsiqgvETcl7jnh8TbxpF2
FJYHCfOo4gHAPcIw+EUHVji6J9CIxpyc3+tf4ExpldKzRwim4+UCFHIYXMHTJYhs
JMwniArVHn5Bk5e6Nul3XW2rtKemFzzxt2RgqxkBIXLMfvGSA96Okb/qKJY0bdwV
vx4PbJooEOtGUk2lh1H8J5uLB4Y7k6zuy2Z1nEx2H6qE6cJTulVOKsn5aTQ+xthT
UIQsjyRac2L1SUQef3jpyztryNjMj2xxHP+JQENd5F/ah2Id4DJAp3QWmKTuY0BO
Zn8T2DdTRkXWzv/lgVPbAVxnk4GZFRGykn3LtHKrsOQsw1ct9FrCtvatR1UUYFc7
+ifNv3P3Pnh4KU3MIQMYMK3yYyTokBvBnwQlVDLRIsVhnL82aVOk2qQEKM9A7jeL
v2sU1Qd8ib327ldbevLWL+Gq6nUGzEmLNb2XV/OrcwmmeH7ZCP4XLaqYthhSnF2e
2guBg8hSF1/Y2jKoQIuQKIeAjg2eA2FMptObFllYSBx30CfNSV8=
=Xgxd
-----END PGP SIGNATURE-----


I
I
Ivan Vilata i Balaguer wrote on 26 Jan 2022 22:57
YfHDvr415kmjjrgW@sax.terramar.selidor.net
Ivan Vilata i Balaguer (2022-01-17 20:58:40 +0100) wrote:

Toggle quote (4 lines)
> Hi! When trying to upgrade package `povray 3.7.0.8` from Guix commit
> `404f6953` to that of commit `4a943cfd`, the build fails showing errors like
> these: […]

I found what looks like the same issue reported in

As a commenter suggested, I succeeded to build the package using Boost 1.78,
not in the most orthodox way as Guix ships 1.77 and I don't have much
knowledge about Guix packaging, following the package definition:

$ guix build --source povray
/gnu/store/xc4l18mwxzxfvrqmymvkr7yirw1sc6ff-povray-3.7.0.8-checkout
$ guix build boost \
/gnu/store/yiiqd3c7h4f6z0zia5br7wis3wpisgnr-boost-1.78.0
$ cp -r /gnu/store/xc4l18mwxzxfvrqmymvkr7yirw1sc6ff-povray-3.7.0.8-checkout povray-3.7.0.8-checkout
$ chmod -R u+w povray-3.7.0.8-checkout; cd povray-3.7.0.8-checkout
$ guix environment -C --expose=/gnu/store/yiiqd3c7h4f6z0zia5br7wis3wpisgnr-boost-1.78.0 povray
env$ cd unix/
env$ sh prebuild.sh
env$ cd ..
env$ env COMPILED_BY=Guix ./configure \
--with-boost=/gnu/store/yiiqd3c7h4f6z0zia5br7wis3wpisgnr-boost-1.78.0 \
--with-boost-lib=/gnu/store/yiiqd3c7h4f6z0zia5br7wis3wpisgnr-boost-1.78.0/lib \
--disable-optimiz-arch
env$ make # succeeds

So one solution would be to upgrade Boost to 1.78, though that may affect many
packages. However, given the nature of the error, other packages may
eventually get bitten by it. BTW, this is where I think they fixed the Boost

Cheers!

--
Ivan Vilata i Balaguer -- https://elvil.net/
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEHpvwBPZcchIQr6TuPezBBfXdI4IFAmHxw7gACgkQPezBBfXd
I4KOYRAAmAiLt2EdBElOezDWQj6BkMBWQv2H90649/9MrOuvHFKJcH+9YrRJIimz
ZN+a3IFE6UjWhS5DtyrYjPKPgEzASXz4Nx2DZKorws8BYM6V4pe8PCYOpH2Ct2Sh
64QM+Sa1qvwSH8zr1yNge6iv9l4COKw+xvkShZEwu/ZTO5ooygNebm+UaAGIpKmQ
WBXnyy2zwEYVvfO93DMW/eBPU0beleHhjWi9MBlDM1ePoR9SKrG16b8XlHm0rBxR
fQS/0b2CMX7rE+Tv4DvPusV6FI5jLw+dGhfDdApWB5E0f1QIFAgezQo39Jnp1Luf
vftGPWSIcVfO+2IByu6MfARvMRwq1YebJ6ekHJowhgG/4lo1zAKOz3MCk+YOF7zV
jJsjG6622ymFhamhuevMUHT4AMzmxnOKJaj3lMLezalk/DUj2xo0cjqLRYPgjFtP
t+a9RqTEv9T6X/WVL7Pu+9O7m0X8tRPaLlAQ/ZGHhFgt2jgzNWjL/SqZnw3LOV3p
Rkx3dSAJSabfOO7lN7jFUivLz6kEnc4/9BzNfiDbyA4A0DXg35FS2ViYAFP3wt2l
In9vxHVkFbD95C1PlyufUCjoOOpALfoI9pZ4f+SNDBlU75DzT7lIQlKJvYBAWWcw
qbnTpD4KYoUDLjfpOv+acV4tGpdLrW9VLGdxUPacS4PVluxpFqQ=
=sZmX
-----END PGP SIGNATURE-----


I
I
Ivan Vilata i Balaguer wrote on 7 Feb 2022 23:43
(name . Ivan Vilata i Balaguer)(address . ivan@selidor.net)(address . 53325@debbugs.gnu.org)
YgGght+A4bsJcb7I@sax.terramar.selidor.net
Ivan Vilata i Balaguer (2022-01-26 22:57:18 +0100) wrote:

Toggle quote (13 lines)
> Ivan Vilata i Balaguer (2022-01-17 20:58:40 +0100) wrote:
>
> > Hi! When trying to upgrade package `povray 3.7.0.8` from Guix commit
> > `404f6953` to that of commit `4a943cfd`, the build fails showing errors like
> > these: […]
>
> I found what looks like the same issue reported in
> <https://github.com/POV-Ray/povray/issues/438>.
>
> As a commenter suggested, I succeeded to build the package using Boost 1.78,
> […] BTW, this is where I think they fixed the Boost issue for 1.78:
> <https://github.com/boostorg/math/pull/676/files>

So I tried to create a patch (attached) which just drops the fixed version of
`header_deprecated.hpp` from Boost 1.78 [1] in Povray's `source` directory,
since that include path has priority over the profile's Boost one during
build. I tried building with:

$ guix build povray --with-patch=povray=./povray-fix-boost-1.77-math-tools-pragma.patch
[…]
/gnu/store/mp687jry3rb96ff3jbaijibz4klhjicd-povray-3.7.0.8

So it built successfully.


Thus, the patch may be applied until Boost is upgraded to 1.78, at which point
it can be removed.

Thanks!

--
Ivan Vilata i Balaguer -- https://elvil.net/
diff -Nur povray-3.7.0.8-checkout.orig/source/boost/math/tools/header_deprecated.hpp povray-3.7.0.8-checkout.new/source/boost/math/tools/header_deprecated.hpp
--- povray-3.7.0.8-checkout.orig/source/boost/math/tools/header_deprecated.hpp 1970-01-01 01:00:00.000000000 +0100
+++ povray-3.7.0.8-checkout.new/source/boost/math/tools/header_deprecated.hpp 2022-02-07 21:13:43.531100547 +0100
@@ -0,0 +1,27 @@
+// (C) Copyright Matt Borland 2021.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_HEADER_DEPRECATED
+#define BOOST_MATH_TOOLS_HEADER_DEPRECATED
+
+#ifndef BOOST_MATH_STANDALONE
+
+# include <boost/config/header_deprecated.hpp>
+# define BOOST_MATH_HEADER_DEPRECATED(expr) BOOST_HEADER_DEPRECATED(expr)
+
+#else
+
+# ifdef _MSC_VER
+// Expands to "This header is deprecated; use expr instead."
+# define BOOST_MATH_HEADER_DEPRECATED(expr) __pragma("This header is deprecated; use " expr " instead.")
+# else // GNU, Clang, Intel, IBM, etc.
+// Expands to "This header is deprecated use expr instead"
+# define BOOST_MATH_HEADER_DEPRECATED_MESSAGE(expr) _Pragma(#expr)
+# define BOOST_MATH_HEADER_DEPRECATED(expr) BOOST_MATH_HEADER_DEPRECATED_MESSAGE(message "This header is deprecated use " expr " instead")
+# endif
+
+#endif // BOOST_MATH_STANDALONE
+
+#endif // BOOST_MATH_TOOLS_HEADER_DEPRECATED
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEHpvwBPZcchIQr6TuPezBBfXdI4IFAmIBoIAACgkQPezBBfXd
I4K9BBAAhGAWSGDiKEI/LgP5v7sEnEdiDxGhedNqIJgraoiCazVpuceOJqrSORtY
fo3doU2di8HMVVyugYn7X1MI8vhvfslBFLcWJVEvpiZWGqAfrZ9cUXq45BJjWioN
xPUMEHl+EGZIkN1GaPkycZDNA4HOXjS8a5Zp6+edtn9CSi8X/HE9JjeKwbTqZEDu
EEzUbDwWrcZfssXln+D+MGSYkbnR+XenWH/GAeGanu5RL2nQ377TFogX5MhS1V/q
ChLtYXETgKyXo2gswuFUV55hjtDNOQP78GaoWTLaQeEsT3yJq5aBBiMANx710LlR
icvXer9/v1N739uZoR1gAgX+WmMJxdWAn2Y+tMJ/Jso0ZhcCFzINFslKP1S/k19o
OO3+qe28FUtEIhFIphoF4TYCVYnTzdPuNxb8jiGa9SrjG3VgpqfQOhuwTaRvcchJ
M+vFHvbLis1B4UNUZ9Hfn49egUJcCEwCcz0iDJYzqFmXuYpOCSJdeTlyTyA8FOMq
S/HQWnc8o4arCDRDye161SPF/giwie74iJi4zjARKZqZ20FTJw88YNUJKsMAmSlm
t2DsKLbw0YJPzYJ2hjsP4QjvvBhW/ReeQOugBayGttC6+fIeDCUQlHyOT1cMSp/z
XF+Xrh8pthCjqYZ6jztt4N7JPd4bx47Fw5paNBTRkSftXWT8nQk=
=REJ0
-----END PGP SIGNATURE-----


I
I
Ivan Vilata i Balaguer wrote on 10 Jun 2023 17:27
Re: povray: Fails to build (_Pragma errors) [FIXED]
(name . Ivan Vilata i Balaguer)(address . ivan@selidor.net)(address . 53325@debbugs.gnu.org)
ZISWYk6FH36rRmoZ@sax
I tried installing the package again under Guix 44bbfc24 and it installed
successfully. It was probably working after a59afdc9 (2022-02-03), which
updated Boost to 1.78.0.

This issue may be closed, thanks!


Ivan Vilata i Balaguer (2022-02-07 23:43:18 +0100) wrote:

Toggle quote (33 lines)
> Ivan Vilata i Balaguer (2022-01-26 22:57:18 +0100) wrote:
>
> > Ivan Vilata i Balaguer (2022-01-17 20:58:40 +0100) wrote:
> >
> > > Hi! When trying to upgrade package `povray 3.7.0.8` from Guix commit
> > > `404f6953` to that of commit `4a943cfd`, the build fails showing errors like
> > > these: […]
> >
> > I found what looks like the same issue reported in
> > <https://github.com/POV-Ray/povray/issues/438>.
> >
> > As a commenter suggested, I succeeded to build the package using Boost 1.78,
> > […] BTW, this is where I think they fixed the Boost issue for 1.78:
> > <https://github.com/boostorg/math/pull/676/files>
>
> So I tried to create a patch (attached) which just drops the fixed version of
> `header_deprecated.hpp` from Boost 1.78 [1] in Povray's `source` directory,
> since that include path has priority over the profile's Boost one during
> build. I tried building with:
>
> $ guix build povray --with-patch=povray=./povray-fix-boost-1.77-math-tools-pragma.patch
> […]
> /gnu/store/mp687jry3rb96ff3jbaijibz4klhjicd-povray-3.7.0.8
>
> So it built successfully.
>
> [1]: https://github.com/boostorg/math/blob/boost-1.78.0/include/boost/math/tools/header_deprecated.hpp
>
> Thus, the patch may be applied until Boost is upgraded to 1.78, at which point
> it can be removed.
>
> Thanks!

--
Ivan Vilata i Balaguer -- https://elvil.net/
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEHpvwBPZcchIQr6TuPezBBfXdI4IFAmSEllgACgkQPezBBfXd
I4KV1hAApwMNnA23A0YjeEUQeN9rZ19Pej3gkVM6SEbKQFNDl+b3WyeUVWYD2yTQ
Xn/d5d07qjK2TnaIK3Z6xWVr0yRhwUrGzCxB3B2GZOxON1kcDH8pM/wsoGkojuP9
OVb3uWq15MnAPi8dJMwfoN4QijQasdrRJJb33k+XWvyY1PRlwRs1Ju8CUcxr7Fw8
1Kw8DOqZlWPd+XgzA1H/PRbSkPdjr7EIqKJ2bCcejFPzeqFoeUs4lyk8Lvzi3qRB
AnHzYwAcSwcQPTFbJYBzjXkU4zjGkzh/NUiiv1oalVey8AbnTvypXi2upRtLYJa/
pe3HZlf6xPChmmhFpjT6QXgjM/FYFS7P7KdAMADQIOk4Bfq6sViuSKsII8zujRjV
dRggeom0tASO4gKL+eq1Y/ntmIbBSq0SmGfyrd0QTuYJHuw8oBlb7KuUp0J84z7y
C1di8WA2nBrB8sdH5ruR+cRF00Ru1pEaWHVo8/dYUQ++idfYb5NAYtYRnqbBcOT3
IAg3o7ZtC6I2T5pVLuH1/+X/PuDAmnJLYra25XtyUPu9ydA0eZa782PS904gHAHb
bZUsYLBF3/7VqFqHX5GE8oYPbTVEhHSq1WX3dvJ0Nk3zkOwwoz2e5w/My586ZFlB
fKc7sV/e71ZEskoGqylS/iVbavGv0RkwgKaHlx8C3ICAtiRYlKE=
=+/AX
-----END PGP SIGNATURE-----


?