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

Add manifold port #42347

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

Conversation

JeffreyWardman
Copy link

  • Changes comply with the maintainer guide.
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@JeffreyWardman
Copy link
Author

@microsoft-github-policy-service agree

@JeffreyWardman
Copy link
Author

I was able to build locally. manifold builds files into lib/cmake which raises warnings, which seem to have caused the CI/CD to fail. Once adding the ignore warnings, I get the current errors only in CI/CD.

Initial error due to warnings: https://dev.azure.com/vcpkg/public/_build/results?buildId=109648&view=logs&j=878666d5-db33-5b27-9e7d-b0c7ee352005&t=69176ca8-c93b-5311-0f74-6cb12a2b3f92&l=8209

After adding the ignore fixes: https://dev.azure.com/vcpkg/public/_build/results?buildId=109649&view=logs&j=878666d5-db33-5b27-9e7d-b0c7ee352005&t=69176ca8-c93b-5311-0f74-6cb12a2b3f92&l=8184

This is my first commit to vcpkg. It'd be great if I can get advice on how to handle these kinds of warnings for it to be merged.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

This is my first commit to vcpkg. It'd be great if I can get advice on how to handle these kinds of warnings for it to be merged.

Usually these kinds of problems require patching upstream's build system, or moving around bits in portfile.cmake.

Do you have specific questions about the warnings? They seem pretty explicit in what the problem is to me, but then again, I wrote most of the messages 😅

Repeating the errors here so that the logs aren't lost when the build gets purged in a few days:

D:\a_work\1\s\ports\manifold\portfile.cmake: warning: ${CURRENT_PACKAGES_DIR}/debug/include should not exist. To suppress this message, add set(VCPKG_POLICY_ALLOW_DEBUG_INCLUDE enabled)
note: If this directory was created by a build system that does not allow installing headers in debug to be disabled, delete the duplicate directory with file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
D:\a_work\1\s\ports\manifold\portfile.cmake: warning: This port installs the following CMake files in places CMake files are not expected. CMake files should be installed in ${CURRENT_PACKAGES_DIR}/share/${PORT}. To suppress this message, add set(VCPKG_POLICY_SKIP_MISPLACED_CMAKE_FILES_CHECK enabled)
D:\p\manifold_x86-windows: note: the files are relative to ${CURRENT_PACKAGES_DIR} here
note: lib/cmake/manifold/manifoldConfig.cmake
note: lib/cmake/manifold/manifoldConfigVersion.cmake
note: lib/cmake/manifold/manifoldTargets-release.cmake
note: lib/cmake/manifold/manifoldTargets.cmake
note: debug/lib/cmake/manifold/manifoldConfig.cmake
note: debug/lib/cmake/manifold/manifoldConfigVersion.cmake
note: debug/lib/cmake/manifold/manifoldTargets-debug.cmake
note: debug/lib/cmake/manifold/manifoldTargets.cmake
D:\a_work\1\s\ports\manifold\portfile.cmake: warning: This port creates ${CURRENT_PACKAGES_DIR}/lib/cmake and/or ${CURRENT_PACKAGES_DIR}/debug/lib/cmake, which should be merged and moved to ${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake. Please use the helper function vcpkg_cmake_config_fixup() from the port vcpkg-cmake-config. To suppress this message, add set(VCPKG_POLICY_SKIP_LIB_CMAKE_MERGE_CHECK enabled)
D:\a_work\1\s\ports\manifold\portfile.cmake: warning: Found 3 post-build check problem(s). These are usually caused by bugs in portfile.cmake or the upstream build system. Please correct these before submitting this port to the curated registry.
error: building manifold:x86-windows failed with: POST_BUILD_CHECKS_FAILED

Comment on lines +1 to +3
add set(VCPKG_POLICY_ALLOW_DEBUG_INCLUDE enabled)
set(VCPKG_POLICY_SKIP_MISPLACED_CMAKE_FILES_CHECK enabled)
add set(VCPKG_POLICY_SKIP_LIB_CMAKE_MERGE_CHECK enabled)
Copy link
Member

Choose a reason for hiding this comment

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

We can't merge ports which fail these kinds of post-build checks into the curated registry. You will need to fix these problems in the build system.

@JeffreyWardman
Copy link
Author

The warnings are very clear to me! I'll fix the issues in the next day or two

@FrankXie05 FrankXie05 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 26, 2024
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO elalish/manifold
REF v3.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
REF v3.0.0
REF v${VERSION}

SHA512 881d3b0e3ff03794ce66b09c4a7be675e5dcd5d5b269d62ad5c5de177e76a01460f6f0fb55a2973a92abda3bf32b8a08bafdff5c0b379ae095d9806eb5669022
)

# Configure the project
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Configure the project


# Configure the project
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"

Comment on lines +19 to +23
-DMANIFOLD_TEST=OFF # Disable tests to avoid overhead
-DMANIFOLD_CROSS_SECTION=ON # Enable cross-section support
-DMANIFOLD_CBIND=ON # Enable C bindings
-DMANIFOLD_PYBIND=OFF # Enable Python bindings
-DMANIFOLD_JSBIND=OFF # Disable JS bindings
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
-DMANIFOLD_TEST=OFF # Disable tests to avoid overhead
-DMANIFOLD_CROSS_SECTION=ON # Enable cross-section support
-DMANIFOLD_CBIND=ON # Enable C bindings
-DMANIFOLD_PYBIND=OFF # Enable Python bindings
-DMANIFOLD_JSBIND=OFF # Disable JS bindings
-DMANIFOLD_TEST=OFF
-DMANIFOLD_CROSS_SECTION=ON
-DMANIFOLD_CBIND=ON
-DMANIFOLD_PYBIND=OFF
-DMANIFOLD_JSBIND=OFF

Comment on lines +24 to +25
OPTIONS_RELEASE
-DMANIFOLD_DEBUG=OFF
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
OPTIONS_RELEASE
-DMANIFOLD_DEBUG=OFF

Comment on lines +30 to +31
# Build and install
vcpkg_cmake_build()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Build and install
vcpkg_cmake_build()


# Build and install
vcpkg_cmake_build()
vcpkg_cmake_install()
Copy link
Contributor

Choose a reason for hiding this comment

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

This should resolve the issue with lib/cmake. Please use the actual path.

Suggested change
vcpkg_cmake_install()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/manifold)

Comment on lines +1 to +4
The package manifold provides CMake targets:

find_package(manifold CONFIG REQUIRED)
target_link_libraries(main PRIVATE manifold::manifold)
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting as printed by the heuristics:

Suggested change
The package manifold provides CMake targets:
find_package(manifold CONFIG REQUIRED)
target_link_libraries(main PRIVATE manifold::manifold)
manifold provides CMake targets:
find_package(manifold CONFIG REQUIRED)
target_link_libraries(main PRIVATE manifold::manifold)

If the heuristics has the same output, a usage file is redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants