From 1179aba6a2497434a30e257298b83cc839424a8f Mon Sep 17 00:00:00 2001 From: Alex Pascarella <42875990+EllissoideRotondo@users.noreply.github.com> Date: Wed, 4 Mar 2026 18:16:03 -0800 Subject: [PATCH 1/4] [CasADi] Update to version 3.7.2 --- C/CasADi/build_tarballs.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/CasADi/build_tarballs.jl b/C/CasADi/build_tarballs.jl index 6565e906c64..acbcac87cff 100644 --- a/C/CasADi/build_tarballs.jl +++ b/C/CasADi/build_tarballs.jl @@ -2,12 +2,12 @@ using BinaryBuilder, Pkg name = "CasADi" -version = v"3.5.5" +version = v"3.7.2" sources = [ GitSource( "https://github.com/casadi/casadi.git", - "fadc86444f3c7ab824dc3f2d91d4c0cfe7f9dad5", + "f959d3175a444d763e4eda4aece48f4c5f4a6f90", ), DirectorySource("./bundled"), ] From 501d30f451e088267c7bab82c6d4e19469766eb7 Mon Sep 17 00:00:00 2001 From: Alex Pascarella <42875990+EllissoideRotondo@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:12:14 -0700 Subject: [PATCH 2/4] Update build_tarballs.jl --- C/CasADi/build_tarballs.jl | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/C/CasADi/build_tarballs.jl b/C/CasADi/build_tarballs.jl index acbcac87cff..729fce18ad4 100644 --- a/C/CasADi/build_tarballs.jl +++ b/C/CasADi/build_tarballs.jl @@ -48,13 +48,10 @@ products = [ # platforms are passed in on the command line platforms = supported_platforms() platforms = expand_cxxstring_abis(platforms) -filter!(platforms) do p - # Windows export bug is: - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50044 - # because of - # https://github.com/casadi/casadi/blob/402fe583f0d3cf1fc77d1e1ac933f75d86083124/casadi/core/dm_instantiator.cpp#L373-L374 - return !Sys.iswindows(p) -end +filter!(p -> !Sys.iswindows(p) && + arch(p) != "riscv64" && + !(arch(p) == "aarch64" && Sys.isfreebsd(p)), + platforms) dependencies = [ Dependency("CompilerSupportLibraries_jll"), From 21668a6c4f9aa62ac9f488bb947006649a885a08 Mon Sep 17 00:00:00 2001 From: Alex Pascarella <42875990+EllissoideRotondo@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:41:16 -0700 Subject: [PATCH 3/4] Update build_tarballs.jl --- C/CasADi/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/CasADi/build_tarballs.jl b/C/CasADi/build_tarballs.jl index 729fce18ad4..7541c9d05a6 100644 --- a/C/CasADi/build_tarballs.jl +++ b/C/CasADi/build_tarballs.jl @@ -67,6 +67,6 @@ build_tarballs( platforms, products, dependencies; - preferred_gcc_version = v"6", + preferred_gcc_version = v"8", julia_compat = "1.6", ) From 184e5c76de7ea3a39505e3cfe09bed69026e3bb0 Mon Sep 17 00:00:00 2001 From: Alex Pascarella <42875990+EllissoideRotondo@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:16:04 -0700 Subject: [PATCH 4/4] Update build_tarballs.jl --- C/CasADi/build_tarballs.jl | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/C/CasADi/build_tarballs.jl b/C/CasADi/build_tarballs.jl index 7541c9d05a6..81484dddd51 100644 --- a/C/CasADi/build_tarballs.jl +++ b/C/CasADi/build_tarballs.jl @@ -15,16 +15,26 @@ sources = [ script = raw""" cd $WORKSPACE/srcdir/casadi install_license LICENSE.txt - mkdir -p build cd build -export CXXFLAGS="-fPIC -std=c++11" +CXX_STANDARD="-std=c++11" +CMAKE_CXX_STANDARD="11" +if [[ "${target}" == *"mingw"* ]]; then + CXX_STANDARD="-std=c++14" + CMAKE_CXX_STANDARD="14" +fi + +export CXXFLAGS="-fPIC ${CXX_STANDARD}" export CFLAGS="${CFLAGS} -fPIC" cmake -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DCMAKE_INSTALL_BINDIR=${bindir} \ + -DCMAKE_INSTALL_LIBDIR=${libdir} \ + -DCMAKE_INSTALL_INCLUDEDIR=${includedir} \ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} \ -DWITH_IPOPT=ON \ -DWITH_EXAMPLES=OFF \ -DWITH_DEEPBIND=OFF \ @@ -33,9 +43,12 @@ cmake -DCMAKE_INSTALL_PREFIX=${prefix} \ make -j ${nproc} make install +# Build amplexe cd $WORKSPACE/srcdir - -c++ main.cpp -o "${bindir}/amplexe${exeext}" -I"${includedir}" -L"${libdir}" -lcasadi -std=c++11 +c++ main.cpp -o "${bindir}/amplexe${exeext}" \ + -I"${includedir}" \ + -L"${libdir}" \ + -lcasadi ${CXX_STANDARD} """ products = [ @@ -44,14 +57,11 @@ products = [ LibraryProduct("libcasadi_nlpsol_ipopt", :libcasadi_nlpsol_ipopt), ] -# These are the platforms we will build for by default, unless further -# platforms are passed in on the command line platforms = supported_platforms() platforms = expand_cxxstring_abis(platforms) -filter!(p -> !Sys.iswindows(p) && - arch(p) != "riscv64" && - !(arch(p) == "aarch64" && Sys.isfreebsd(p)), - platforms) +filter!(p -> arch(p) != "riscv64" && + !(arch(p) == "aarch64" && Sys.isfreebsd(p)), + platforms) dependencies = [ Dependency("CompilerSupportLibraries_jll"),