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

added recipe for blockSQP #10433

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

chplate
Copy link
Contributor

@chplate chplate commented Feb 4, 2025

I wrote a wrapper for blockSQP, an NLP solver using a SQP method which builds upon the open-source QP solver QPOASES, for which I've recently added qpOASES_jll.

"

#platforms = vcat(libjulia_platforms.(julia_versions[julia_versions .>= v"1.7.0"])...) |> expand_cxxstring_abis
platforms = vcat(libjulia_platforms.(julia_versions)...) |> expand_cxxstring_abis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below you put compat for julia to v1.7, you likely want to filter only Julia v1.7+ versions in julia_versions. Also, any specific reason for supporting v1.7 at this point? Would you consider v1.10 instead (current LTS). That'd further reduce the number of builds here.

Comment on lines 85 to 87
Dependency("libblastrampoline_jll"),#; compat="5.4.0"),
Dependency("CompilerSupportLibraries_jll"),
Dependency("libcxxwrap_julia_jll"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must specify compat bounds for lbt and libcxxwra

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added compat bounds on libblastrampoline to 5.4, but something requires its version to be 3.0.4, which leads to the failed builds. Do you have an idea what causes this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get it working with 5.4.0 on lbt. Now, I went back to 3.0.4, and locally it builds for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get it working with 5.4.0 on lbt

Care to elaborate?

Comment on lines 17 to 21
preamble = if os() === "macos"
raw"cd /usr/share/cmake/Modules/Compiler/; find . -name '._*' -exec rm {} \;"
else
raw""
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing? You really shouldn't need to go in and delete things from the system like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a suggested fix to a problem in BinaryBuilder for people on MacOS, see this issue. I removed it now as we can do without it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, both this file and the cpp file would be better placed inside a separate git repository that you then include as another GitSource. Yggdrasil is not really meant to hold the entire source code of a project, only the build script and small patches needed to make it work.

@imciner2
Copy link
Member

imciner2 commented Feb 6, 2025

I would suggest modifying the recipe to use the new way of linking against LBT:

  1. Add the line apk remove cmake to the top of the script
  2. Remove all lines setting the blas library file name
  3. Add the CMake variable "-DBLA_VENDOR=libblastrampoline", and remove the other BLAS/LAPACK variables from the Cmake line.
  4. Add a dependency on CMake: HostBuildDependency(PackageSpec(name="CMake_jll")), # Need CMake >= 3.30 for BLA_VENDOR=libblastrampoline

@imciner2
Copy link
Member

imciner2 commented Feb 6, 2025

        Info packages marked with → not downloaded, use `instantiate` to download
   Resolving package versions...
ERROR: LoadError: Unsatisfiable requirements detected for package libblastrampoline_jll [8e850b90]:
 libblastrampoline_jll [8e850b90] log:
 ├─possible versions are: 3.0.4 or uninstalled
 └─restricted to versions 5.4.0 by an explicit requirement — no versions left

Hmm, is this some interaction between the LBT dependency and the libjulia/libcxxwrap_julia dependency that is preventing it from finding the right version? This is weird though, because the 3.0.4 version it complains about is the version that is shipped with 1.7 that we use in CI.

@chplate
Copy link
Contributor Author

chplate commented Feb 7, 2025

So, I had a look at all other build scripts in Yggdrasil, and this is the only one that uses libcxxwrap, libjulia and libblastrampoline together. There were others that used the first two and then OpenBLAS_jll. I tried to link against OpenBLAS_jll, but then again I was required to use a compat=0.3.13 for it, a version which is from August 2021.
However if I leave away the compat for OpenBLAS or lbt altogether, everything builds and I can use the resulting jll-package just fine.
All in all, I don't really know how to proceed here and would be grateful for any further hints.

@chplate
Copy link
Contributor Author

chplate commented Feb 13, 2025

For testing purposes, I deployed the jll-package without the compat bound on libblastrampoline to this repository, and successfully tested the wrapper code under MacOS and Linux with Julia version 1.10. Do we really need the compat bound on libblastrampoline?

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 this pull request may close these issues.

3 participants