Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Jan 2, 2025

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Jan 2, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jan 2, 2025

Gen AI suggestions to solve the build error:

Based on the error, I'll provide a detailed analysis and solution:

• Detected Error: The build seems to get stuck after "using /tmp/apko-temp-4262173850/apko-x86_64.tar.gz for image layer" suggesting an issue with the CMake build process

• Error Category: Build Configuration

• Failure Point: CMake configuration/build step

• Root Cause Analysis:
The error occurs when building libmamba with Python bindings. Based on recent changes in the mamba repository (specifically PR #3702), there are new requirements for the build configuration.

• Suggested Fix:

  1. Update the cmake/configure step in the pipeline:
  - uses: cmake/configure
    with:
      opts: |
        -DBUILD_LIBMAMBA="ON" \
        -DBUILD_SHARED="ON" \
        -DBUILD_LIBMAMBAPY="ON" \
        -DBUILD_MICROMAMBA="ON" \
        -DBUILD_MAMBA_PACKAGE="ON" \
        -DCMAKE_BUILD_TYPE=Release \
        -DCONDA_REACTIVATE_CMD="__conda_activate reactivate"
  1. Add additional build dependencies:
environment:
  contents:
    packages:
      # Add these packages
      - ninja
      - python3-dev

• Explanation:

  1. The PR ruby3.2-console/1.17.4 package update #3702 indicates a change in how conda activation is handled
  2. The -DCONDA_REACTIVATE_CMD flag ensures proper conda activation behavior
  3. Additional build dependencies help with the Python binding compilation

• Additional Notes:

  • Consider adding -DCMAKE_POSITION_INDEPENDENT_CODE=ON if linking issues persist
  • The build system may need ninja for better parallel builds
  • Python development files are required for building the Python bindings

• References:

@developer-guy
Copy link
Member

its failing because the patch is not applicable anymore so we should update the patch here

@debasishbsws debasishbsws self-assigned this Jan 13, 2025
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Jan 13, 2025
@debasishbsws
Copy link
Member

Okay the test is failing now.

@debasishbsws
Copy link
Member

In this new version, the bindings.cpython*.so file is being installed in the home/build/libmambapy/libmambapy directory, whereas it should be located in /usr/lib/python${{range.key}}/site-packages/libmambapy/.

To address this, applying the following patch might resolve the issue by ensuring the bindings.cpython-*.so file is installed in the correct location:

diff --git a/libmambapy/CMakeLists.txt b/libmambapy/CMakeLists.txt
index 760dd732..47d6cf23 100644
--- a/libmambapy/CMakeLists.txt
+++ b/libmambapy/CMakeLists.txt
@@ -28,5 +28,12 @@ mamba_target_add_compile_warnings(bindings WARNING_AS_ERROR ${MAMBA_WARNING_AS_E
 target_link_libraries(bindings PUBLIC pybind11::pybind11 libmamba)
 set_property(TARGET bindings PROPERTY CXX_STANDARD 17)
 
+# Get Python site-packages directory
+execute_process(
+    COMMAND "${Python_EXECUTABLE}" -c "import site; print(site.getsitepackages()[0])"
+    OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
 install(TARGETS bindings
-        LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/libmambapy/)
+        LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}/libmambapy/)

Alternatively, adding the following line in the subpackage pipeline to move the bindings.cpython*.so file manually could also work:

mv ${{targets.destdir}}/home/build/libmambapy/libmambapy/bindings.cpython*.so ${{targets.contextdir}}/usr/lib/python${{range.key}}/site-packages/libmambapy/

Additional Issue:

The current build process only works with Python 3.13, and I was unable to configure the Python version using the CMake options. Despite trying the following options, it always defaults to Python 3.13:

-DPYTHON_EXECUTABLE=/usr/bin/python${{range.key}} \
-DPython_ROOT_DIR=/usr/lib/python${{range.key}}

@debasishbsws
Copy link
Member

See #36183 for planned mamba changes

@debasishbsws
Copy link
Member

The previous update Pr is was also escalated, this would be similar.

@debasishbsws debasishbsws added the help wanted Extra attention is needed label Jan 21, 2025
@dannf
Copy link
Member

dannf commented Jan 21, 2025

The previous update Pr is was also escalated, this would be similar.

Hi @debasishbsws ! I don't think this one has been escalated, though I'm clearly aware of the problem :) If you do want to escalate it, that would help bump it in our priority queue.

@debasishbsws debasishbsws added interrupt eng:os and removed help wanted Extra attention is needed labels Jan 21, 2025
@debasishbsws debasishbsws removed their assignment Jan 21, 2025
@cmwilson21 cmwilson21 added the help wanted Extra attention is needed label Jan 21, 2025
@murraybd murraybd assigned dannf and unassigned sil2100 Jan 21, 2025
@dannf
Copy link
Member

dannf commented Jan 27, 2025

superseded by #40521

@dannf dannf closed this Jan 27, 2025
@octo-sts octo-sts bot deleted the wolfictl-7bcb8706-48e6-44ef-b804-b640a37202e2 branch January 28, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. eng:os help wanted Extra attention is needed interrupt manual/review-needed request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants