GNU bug report logs - #53325
povray: Fails to build (_Pragma errors)

Previous Next

Package: guix;

Reported by: Ivan Vilata i Balaguer <ivan <at> selidor.net>

Date: Mon, 17 Jan 2022 19:59:01 UTC

Severity: normal

Done: Greg Hogan <code <at> greghogan.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53325 in the body.
You can then email your comments to 53325 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#53325; Package guix. (Mon, 17 Jan 2022 19:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Vilata i Balaguer <ivan <at> selidor.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 17 Jan 2022 19:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Vilata i Balaguer <ivan <at> selidor.net>
To: bug-guix <at> gnu.org
Subject: povray: Fails to build (_Pragma errors)
Date: Mon, 17 Jan 2022 20:58:40 +0100
[Message part 1 (text/plain, inline)]
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/
[kyhpfcn84sg0qbavgaw5rcwxh7cr9w-povray-3.7.0.8.drv.bz2 (application/octet-stream, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#53325; Package guix. (Wed, 26 Jan 2022 21:58:01 GMT) Full text and rfc822 format available.

Message #8 received at 53325 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Vilata i Balaguer <ivan <at> selidor.net>
To: Ivan Vilata i Balaguer <ivan <at> selidor.net>, 53325 <at> debbugs.gnu.org
Subject: Re: povray: Fails to build (_Pragma errors)
Date: Wed, 26 Jan 2022 22:57:18 +0100
[Message part 1 (text/plain, inline)]
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,
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 \
      --with-source=boost <at> 1.78.0=https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2
    /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
issue for 1.78: <https://github.com/boostorg/math/pull/676/files>

Cheers!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#53325; Package guix. (Mon, 07 Feb 2022 22:44:01 GMT) Full text and rfc822 format available.

Message #11 received at 53325 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Vilata i Balaguer <ivan <at> selidor.net>
To: Ivan Vilata i Balaguer <ivan <at> selidor.net>
Cc: 53325 <at> debbugs.gnu.org
Subject: Re: povray: Fails to build (_Pragma errors)
Date: Mon, 7 Feb 2022 23:43:18 +0100
[Message part 1 (text/plain, inline)]
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/
[povray-fix-boost-1.77-math-tools-pragma.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#53325; Package guix. (Sat, 10 Jun 2023 15:28:02 GMT) Full text and rfc822 format available.

Message #14 received at 53325 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Vilata i Balaguer <ivan <at> selidor.net>
To: Ivan Vilata i Balaguer <ivan <at> selidor.net>
Cc: 53325 <at> debbugs.gnu.org
Subject: Re: povray: Fails to build (_Pragma errors) [FIXED]
Date: Sat, 10 Jun 2023 17:27:30 +0200
[Message part 1 (text/plain, inline)]
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:

> 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/
[signature.asc (application/pgp-signature, inline)]

Reply sent to Greg Hogan <code <at> greghogan.com>:
You have taken responsibility. (Thu, 24 Apr 2025 17:40:02 GMT) Full text and rfc822 format available.

Notification sent to Ivan Vilata i Balaguer <ivan <at> selidor.net>:
bug acknowledged by developer. (Thu, 24 Apr 2025 17:40:02 GMT) Full text and rfc822 format available.

Message #19 received at 53325-done <at> debbugs.gnu.org (full text, mbox):

From: Greg Hogan <code <at> greghogan.com>
To: Ivan Vilata i Balaguer <ivan <at> selidor.net>
Cc: 53325-done <at> debbugs.gnu.org
Subject: Re: bug#53325: povray: Fails to build (_Pragma errors) [FIXED]
Date: Thu, 24 Apr 2025 13:39:23 -0400
On Sat, Jun 10, 2023 at 11:28 AM Ivan Vilata i Balaguer
<ivan <at> selidor.net> wrote:
>
> 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!

Closing as requested.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 May 2025 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.