[Bug 289110] math/nlopt does not build when octave is present

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 26 Aug 2025 16:44:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289110

            Bug ID: 289110
           Summary: math/nlopt does not build when octave is present
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: rhurlin@FreeBSD.org
          Reporter: stephen@FreeBSD.org
             Flags: maintainer-feedback?(rhurlin@FreeBSD.org)
          Assignee: rhurlin@FreeBSD.org

It looks like when octave is present, the build gets some of octave include
files from ${LOCALBASE}/include rather than the source code
${WRKSRC}/src/octave.

This looks like it would be a hard problem to solve, and probably requires
changing a CMakeList.txt file, and so is beyond my abilities.

Note that this is not a problem when building with poudriere.  But it is a
problem for anyone trying to build math/octave-forge-mboct-fem-pkg from ports.

I'm not necessarily expecting you to solve the problem, but I think it is
important to register this issue.

An example:

[ 50% 1/2] /usr/bin/c++ -DNLOPT_DLL -Dnlopt_optimize_EXPORTS
-I/usr/local/include/octave-10.2.0 -I/usr/local/include/octave-10.2.0/octave
-I/usr/ports/math/nlopt/work-full/.build/src/octave
-I/usr/ports/math/nlopt/work-full/nlopt-2.10.0/src/api
-I/usr/ports/math/nlopt/work-full/.build -O2 -pipe -fstack-protector-strong
-isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include
-O2 -pipe -fstack-protector-strong -isystem /usr/local/include
-fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=gnu++11 -fPIC
-MD -MT src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o -MF
src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o.d -o
src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o -c
/usr/ports/math/nlopt/work-full/nlopt-2.10.0/src/octave/nlopt_optimize-oct.cc
FAILED: src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o 
/usr/bin/c++ -DNLOPT_DLL -Dnlopt_optimize_EXPORTS
-I/usr/local/include/octave-10.2.0 -I/usr/local/include/octave-10.2.0/octave
-I/usr/ports/math/nlopt/work-full/.build/src/octave
-I/usr/ports/math/nlopt/work-full/nlopt-2.10.0/src/api
-I/usr/ports/math/nlopt/work-full/.build -O2 -pipe -fstack-protector-strong
-isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include
-O2 -pipe -fstack-protector-strong -isystem /usr/local/include
-fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=gnu++11 -fPIC
-MD -MT src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o -MF
src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o.d -o
src/octave/CMakeFiles/nlopt_optimize.dir/nlopt_optimize-oct.cc.o -c
/usr/ports/math/nlopt/work-full/nlopt-2.10.0/src/octave/nlopt_optimize-oct.cc
In file included from
/usr/ports/math/nlopt/work-full/nlopt-2.10.0/src/octave/nlopt_optimize-oct.cc:26:
In file included from /usr/local/include/octave-10.2.0/octave/parse.h:39:
In file included from /usr/local/include/octave-10.2.0/octave/input.h:39:
In file included from /usr/local/include/octave-10.2.0/octave/hook-fcn.h:36:
In file included from
/usr/local/include/octave-10.2.0/octave/ov-fcn-handle.h:40:
In file included from /usr/local/include/octave-10.2.0/octave/stack-frame.h:43:
In file included from /usr/local/include/octave-10.2.0/octave/ov-usr-fcn.h:39:
/usr/local/include/octave-10.2.0/octave/token.h:251:10: error: no template
named 'variant' in namespace 'std'
  251 |     std::variant<std::string, octave_value, end_tok_type,
superclass_info> m_value;
      |     ~~~~~^

-- 
You are receiving this mail because:
You are the assignee for the bug.