Bug 276802 - math/octave-forge-rtree: Does not build with GCC 13: configure: error: octave not found
Summary: math/octave-forge-rtree: Does not build with GCC 13: configure: error: octave...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Stephen Montgomery-Smith
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-03 11:34 UTC by Lorenzo Salvadore
Modified: 2024-02-05 20:37 UTC (History)
1 user (show)

See Also:
salvadore: maintainer-feedback? (stephen)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-03 11:34:29 UTC
This bug report blocks the update of GCC_DEFAULT to 13. This webpage can help finding a fix: https://gcc.gnu.org/gcc-13/porting_to.html

It does not seem that the issue is related to GCC, still please have a look. 
Thanks.

If the issue is related to GCC and if it needs time to be fixed, please consider introduce USE_GCC=12 as a temporary solution.

https://pkg-status.freebsd.org/package18/data/140amd64-default-foo/2024-01-29_17h34m15s/logs/errors/octave-forge-rtree-0.8.0.log

=======================<phase: patch          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Patching for octave-forge-rtree-0.8.0
/usr/bin/sed -i.bak s/^tar/gtar/ /wrkdirs/usr/ports/math/octave-forge-rtree/work/librtree-octave-6456b2ebb38528ea6861019b4b85699796ba91fa/src/pkg/bin/pkg-build
cd /wrkdirs/usr/ports/math/octave-forge-rtree/work/librtree-octave-6456b2ebb38528ea6861019b4b85699796ba91fa && /usr/bin/env XDG_DATA_HOME=/wrkdirs/usr/ports/math/octave-forge-rtree/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/math/octave-forge-rtree/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/math/octave-forge-rtree/work/.cache  HOME=/wrkdirs/usr/ports/math/octave-forge-rtree/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/math/octave-forge-rtree/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/math/octave-forge-rtree/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh F77="gfortran13" F90="gfortran13" FC="gfortran13"	 FFLAGS="-O -Wl,-rpath=/usr/local/lib/gcc13" F90FLAGS="-O -Wl,-rpath=/usr/local/lib/gcc13" FCFLAGS="-Wl,-rpath=/usr/local/lib/gcc13" MAKE=gmake CONFIG_SITE=/usr/ports/Templates/config.site lt_cv_sys_max_cmd_len=524288 CFLAGS="-O2 -pipe  -I/usr/local/include -L/usr/local/lib -I/usr/local/include/octave-8.4.0 -fstack-protector-strong -fno-strict-aliasing " ./configure
configure: loading site script /usr/ports/Templates/config.site
checking for octave... no
configure: error: octave not found
*** Error code 1

Stop.
make: stopped in /usr/ports/math/octave-forge-rtree
=>> Cleaning up wrkdir
===>  Cleaning for octave-forge-rtree-0.8.0
Comment 1 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2024-02-03 18:21:25 UTC
pkg-fallout was also giving me this error.  I am unable to reproduce it.  Somehow the build depends weren't being brought in by poudriere.

Since then, this error stopped being reported, making me think it might have been a problem with the package builder server.  But it might be something else.

If you look at the full build log, you will see that the only build dependency brought in is pkg.

Can you see if the problem resolved itself?
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-04 09:45:54 UTC
I have reproduced the issue, without using poudriere:
http://cirrus-ci.com/build/6631814924599296

Also please not that octave has been installed successfully before attempting to build octave-forge-rtree.

On the other hand, I have kept GCC_DEFAULT to GCC 12, so this bug has nothing to do with the exp-run to update it to GCC 13 and I can remove that block.
Comment 3 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2024-02-04 20:22:50 UTC
Could I ask you to try this patch?  (The patch is probably mangled, but it should be very easy to apply by hand.)

diff --git a/math/octave-forge-rtree/Makefile b/math/octave-forge-rtree/Makefile
index a7a7cb982ca3..b04a4b9f27fd 100644
--- a/math/octave-forge-rtree/Makefile
+++ b/math/octave-forge-rtree/Makefile
@@ -9,7 +9,7 @@ WWW=            https://packages.octave.org/
 LICENSE=       GPLv3
 LICENSE_FILE=  ${EXTRACT_DIR}/COPYING
 
-USES=          octave
+USES=          octave autoreconf:build
 
 BUILD_DEPENDS+=        gtar:archivers/gtar
 LIB_DEPENDS+=  libjansson.so:devel/jansson
Comment 4 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2024-02-05 10:47:55 UTC
No need to test my previous request.  I think I know what is going on.  I'll have something committed soon.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-02-05 20:29:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1832da1106e584fc42e0f1e8b20e2abfba1f9dde

commit 1832da1106e584fc42e0f1e8b20e2abfba1f9dde
Author:     Stephen Montgomery-Smith <stephen@FreeBSD.org>
AuthorDate: 2024-02-05 20:24:42 +0000
Commit:     Stephen Montgomery-Smith <stephen@FreeBSD.org>
CommitDate: 2024-02-05 20:24:42 +0000

    math/octave-forge-rtree: Fix build issues.

    1.  Requires autoreconf:build to build in clean environment.
    2.  Failed in poudriere, because certain environment variables weren't
        set in patch phase.

    PR:             276802
    Reported by:    Lorenzo Salvadore <salvadore@freebsd.org>,
                    pkg-fallout@

 math/octave-forge-rtree/Makefile | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)
Comment 6 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2024-02-05 20:37:32 UTC
Thank you for the problem report.  It helped me diagnose the problem.