Skip to content

formula: stevengj/nlopt - #516

Open
MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/247-nlopt-luna
Open

formula: stevengj/nlopt#516
MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/247-nlopt-luna

Conversation

@MeteorsLiu

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the idiomatic LLAR Formula for stevengj/nlopt from Conan Center snapshot d034b32b3106d282c32f0a23314b5c6ba1b0fa69.
  • Preserves the verified shared, fPIC, and enable_cxx_routines options, disables unused upstream bindings/tests, and carries the recipe licenses.
  • Publishes relocatable nlopt.pc metadata and verifies the optimization consumer through the complete pkg-config lookup.

Evidence

  • Exact Conan source pin 2.9.1 resolves to upstream tag v2.9.1 and peeled revision 11cff2c773b4b98821915a72179f4667c307ce6d; the recorded archive SHA256 matches.
  • fromVer is the earliest compatible recipe tag v2.6.1; all seven Conan-served tags through v2.9.1 and the current default v2.11.0 passed on native darwin/arm64.
  • Fresh and cache-hit tests passed, including shared=ON, fPIC=OFF, and enable_cxx_routines=OFF; v2.6.0 is rejected below the floor.

Closes #247

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the NLopt formula and module metadata across the complete fixed diff. The package build, generated pkg-config metadata, license installation, consumer test, and registry shape are consistent; the inline finding below concerns the exposed fPIC option for newer upstream versions.

Verification included LLAR builds/tests for v2.8.0 on linux/amd64 with default options and with --option fPIC=OFF, plus direct upstream CMake checks across v2.6.1 and v2.8.0.


filter => {
for name, values in target.options {
if name != "shared" && name != "fPIC" && name != "enable_cxx_routines" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Do not expose ineffective fPIC=OFF for v2.8+

Because this formula serves every version from v2.6.1 onward, it also handles v2.8.0+, whose upstream CMakeLists.txt unconditionally sets the nlopt target's POSITION_INDEPENDENT_CODE to ON. Consequently, CMAKE_POSITION_INDEPENDENT_CODE=OFF here is ignored for those releases: an explicit --option fPIC=OFF still compiles the static archive with -fPIC. That makes the retained option produce a result different from what callers requested. Please split the formula at v2.8.0 (or otherwise remove/reject this option for that range) so fPIC=OFF is not advertised where upstream cannot honor 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 this pull request may close these issues.

Translate Conan Center nlopt recipe to LLAR

1 participant