Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there some special reason to use cppoptlib from 2018 instead of the current one? #63

Closed
barracuda156 opened this issue Jan 4, 2024 · 0 comments · Fixed by #66
Closed

Comments

@barracuda156
Copy link

polysolve does not build with the current version of cppoptlib, since its headers structure was changed since 2018, and this one does not exist:

In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Problem.cpp:1:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Problem.hpp:7:10: fatal error: cppoptlib/problem.h: No such file or directory
    7 | #include <cppoptlib/problem.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/polysolve.dir/src/polysolve/nonlinear/Problem.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/DescentStrategy.hpp:5,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Solver.hpp:3,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Solver.cpp:2:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Problem.hpp:7:10: fatal error: cppoptlib/problem.h: No such file or directory
    7 | #include <cppoptlib/problem.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/DescentStrategy.hpp:5,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/BFGS.hpp:5,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/BFGS.cpp:3:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Problem.hpp:7:10: fatal error: cppoptlib/problem.h: No such file or directory
    7 | #include <cppoptlib/problem.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/DescentStrategy.hpp:5,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/LBFGS.hpp:5,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/LBFGS.cpp:3:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Problem.hpp:7:10: fatal error: cppoptlib/problem.h: No such file or directory
    7 | #include <cppoptlib/problem.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/polysolve.dir/src/polysolve/nonlinear/Solver.cpp.o] Error 1
make[2]: *** [CMakeFiles/polysolve.dir/src/polysolve/nonlinear/descent_strategies/BFGS.cpp.o] Error 1
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/descent_strategies/DescentStrategy.hpp:5,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Solver.hpp:3,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/BoxConstraintSolver.hpp:3,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/BoxConstraintSolver.cpp:1:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Problem.hpp:7:10: fatal error: cppoptlib/problem.h: No such file or directory
    7 | #include <cppoptlib/problem.h>
      |          ^~~~~~~~~~~~~~~~~~~~~

Is there some special reason to stay with the legacy version of this library or is it possible to amend the sources to use the current one?

(Or if the license allows, just bundle whatever headers are needed and drop an external dependency on it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant