Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Oct 1, 2024

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Oct 1, 2024
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Oct 1, 2024

Open AI suggestions to solve the build error:

The error message is: "ERROR: failed to build package. the build environment has been preserved:
INFO   workspace dir: /temp/melange-workspace-3517430425
INFO   guest dir: /temp/melange-guest-9809067
ERRO failed to build package: unable to run package libmamba pipeline: unable to run pipeline: unable to run pipeline: exit status 1
make[1]: *** [Makefile:111: packages/aarch64/libmamba-2024.09.30-r0.apk] Error 1
make[1]: Leaving directory '/github/home'
make: *** [Makefile:101: package/libmamba] Error 2
##[error]Process completed with exit code 2."

1. Verify dependencies for libmamba are installed.
2. Check the Makefile for correct paths and targets.
3. Ensure the build environment is correctly set up.
4. Review logs in /temp/melange-workspace-3517430425 for more details.
5. Re-run the build process.

@octo-sts
Copy link
Contributor Author

octo-sts bot commented Oct 1, 2024

Open AI suggestions to solve the build error:

The error message is: "ERROR: failed to build package. the build environment has been preserved:
INFO   workspace dir: /temp/melange-workspace-4036894951
INFO   guest dir: /temp/melange-guest-2897079291
ERRO failed to build package: unable to run package libmamba pipeline: unable to run pipeline: unable to run pipeline: exit status 1
make[1]: *** [Makefile:111: packages/aarch64/libmamba-2024.09.30-r0.apk] Error 1
make[1]: Leaving directory '/github/home'
make: *** [Makefile:101: package/libmamba] Error 2
##[error]Process completed with exit code 2."

Suggestions:
1. Verify dependencies for libmamba are installed.
2. Check for errors in the Makefile at lines 101 and 111.
3. Ensure the build environment is correctly configured.
4. Review logs in /temp/melange-workspace-4036894951 for more details.

@Dentrax
Copy link
Member

Dentrax commented Oct 13, 2024

I think the issue because of we don't have yaml-cpp-static package. I have tried to add a new subpackage but it provided empty package:

  - name: ${{package.name}}-static
    pipeline:
      - uses: split/static
    description: ${{package.name}} static

https://github.com/mamba-org/mamba/blob/215e5e522ae12415aee91360971ba906865ba832/libmamba/CMakeLists.txt#L451

@philroche philroche self-assigned this Nov 4, 2024
@rawlingsj
Copy link
Member

Based on the error message, the issue is related to yaml-cpp library type mismatch during CMake configuration. The error indicates that the build expects a static library but found a shared library instead. Here are some steps to fix this:

  1. First, modify your melange YAML to ensure yaml-cpp is built as a static library. Add or modify the yaml-cpp package dependency:
dependencies:
  build:
    - yaml-cpp-static
  1. If that package doesn't exist, you might need to add build flags to force static linking. Add these to your cmake configuration:
environment:
  CXXFLAGS: "-DYAML_CPP_STATIC_DEFINE"
pipeline:
  - uses: cmake/configure
    with:
      configure-args: |
        -DYAML_BUILD_SHARED_LIBS=OFF
        -DBUILD_SHARED_LIBS=OFF
  1. Alternatively, you could modify the build to accept shared libraries by adding:
pipeline:
  - uses: cmake/configure
    with:
      configure-args: |
        -DMAMBA_FORCE_DYNAMIC_LIBS=ON

@philroche
Copy link
Member

Changes summary:
Total files changed: 300

Total changes: 15468
Total additions: 10550
Total deletions: 4918

Total commits: 330

GitHub compare URL: mamba-org/mamba@25cdc05...9fc7b99

@philroche
Copy link
Member

I have been unable to get this to build for main and all sub packages.

The closest is by using build options forcing shared libraries which will successfully build the main package but then subpackage py3-libmambapy and micromamba fail to build. micromamba assumes static libraries as noted @ https://github.com/mamba-org/mamba/blob/c511d5c9f71165c0af75d916b46355a980e292f8/CMakeLists.txt#L70 but wolfi does not have static libs for yaml-cpp or reproc as it expects. py3-libmambapy fails as it can't find libmamba dependencies.

Build of previous version before this version bump is successful.

  - uses: cmake/configure
    with:
      opts: |
        -DBUILD_LIBMAMBA="ON" \
        -DBUILD_SHARED="ON" \
        -DBUILD_STATIC="OFF" \
        -DBUILD_LIBMAMBAPY="ON" \
        -DBUILD_MAMBA="ON" \
        -DBUILD_MICROMAMBA="OFF" \
        -DBUILD_MICROMAMBA_SERVER="OFF" \
        -DBUILD_MAMBA_PACKAGE="ON" \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_CXX_FLAGS="-fPIC" \

@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 6, 2024

Gen AI suggestions to solve the build error:

Based on the error message shown, it appears the main issue is with authentication:

Error: rpc error: code = NotFound desc = federate identity: rpc error: code = NotFound desc = no identity found for (https://accounts.google.com, 109346087047205543085)
Error running `chainctl auth token`: exit status 1

Here are a few suggestions to resolve this:

  1. Local Testing:

    • Run melange build with --local flag to bypass authentication requirements
    • Use --signing-key flag to specify a local signing key
  2. Authentication Fix:

    • Ensure you're properly authenticated to the CI system
    • Check if your Google Cloud credentials are properly configured
    • Verify chainctl is properly configured with valid credentials
  3. Interactive Debugging:

    • Use melange build --interactive libmamba.yaml to debug in a shell
    • Once in the shell, you can manually run the build steps to identify any other potential issues

The core package definition looks correct - the error is related to the build environment authentication rather than the package configuration itself.

Would you like me to elaborate on any of these suggestions?

@philroche philroche added the help wanted Extra attention is needed label Nov 6, 2024
@rawlingsj
Copy link
Member

I've spent some time on this and explored two paths...

  1. building the static library dependencies
  2. patching libmamba to use shared libraries

I've pretty much got the first one working so may push a PR up for that in a bit, still not sure that's the best out of the two options mind.

wolfi-bot and others added 3 commits November 7, 2024 23:28
…now expecting static

Also had to add `CXXFLAGS: "-fPIC"` as the build failed without it, other packages seem to do the same.

The subpackage changes were needed as the binding files are in the right location with the default build now.

Added new required python dependencies.

Signed-off-by: James Rawlings <[email protected]>
@rawlingsj rawlingsj force-pushed the wolfictl-a804a634-a79e-41f4-99f6-df5e31aa4245 branch from 62b589e to 8a308df Compare November 7, 2024 23:29
@rawlingsj
Copy link
Member

rawlingsj commented Nov 7, 2024

ok, the shared library approach (option 1 from above) was becoming toilsome so I went with option 2, patched the project to use shared libs.

Also needed a few extra deps and changes to get a successful build.

Package tests are passing too.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2024

Package libmamba: Click to expand/collapse

Package libmamba:
Added: /usr/etc/profile.d/mamba.sh
Modified: /usr/lib/libmamba.so.2.0.0

Package py3-libmambapy: Click to expand/collapse

Package py3-libmambapy:
Added: /usr/lib/python3.12/site-packages/libmambapy/pycache/specs.cpython-312.pyc
Added: /usr/lib/python3.12/site-packages/libmambapy/pycache/utils.cpython-312.pyc
Added: /usr/lib/python3.12/site-packages/libmambapy/pycache/version.cpython-312.pyc
Added: /usr/lib/python3.12/site-packages/libmambapy/py.typed
Added: /usr/lib/python3.12/site-packages/libmambapy/solver/init.py
Added: /usr/lib/python3.12/site-packages/libmambapy/solver/pycache/init.cpython-312.pyc
Added: /usr/lib/python3.12/site-packages/libmambapy/solver/pycache/libsolv.cpython-312.pyc
Added: /usr/lib/python3.12/site-packages/libmambapy/solver/libsolv.py
Added: /usr/lib/python3.12/site-packages/libmambapy/specs.py
Added: /usr/lib/python3.12/site-packages/libmambapy/utils.py
Added: /usr/lib/python3.12/site-packages/libmambapy/version.py
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/INSTALLER
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/LICENSE
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/METADATA
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/RECORD
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/REQUESTED
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/WHEEL
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/direct_url.json
Added: /usr/lib/python3.12/site-packages/libmambapy-2.0.1.dist-info/top_level.txt
Modified: /usr/lib/python3.12/site-packages/libmambapy/init.py
Modified: /usr/lib/python3.12/site-packages/libmambapy/init.pyi
Modified: /usr/lib/python3.12/site-packages/libmambapy/pycache/init.cpython-312.pyc
Modified: /usr/lib/python3.12/site-packages/libmambapy/bindings.cpython-312-x86_64-linux-gnu.so
Deleted: /usr/lib/python3.12/site-packages/libmambapy/pycache/_version.cpython-312.pyc
Deleted: /usr/lib/python3.12/site-packages/libmambapy/_version.py
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/INSTALLER
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/LICENSE
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/METADATA
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/RECORD
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/REQUESTED
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/WHEEL
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/direct_url.json
Deleted: /usr/lib/python3.12/site-packages/libmambapy-1.5.9.dist-info/top_level.txt

Package libmamba-dev: Click to expand/collapse

Package libmamba-dev:
Added: /usr/include/mamba/core/channel_context.hpp
Added: /usr/include/mamba/core/download_progress_bar.hpp
Added: /usr/include/mamba/core/mirror.hpp
Added: /usr/include/mamba/core/package_database_loader.hpp
Added: /usr/include/mamba/core/package_fetcher.hpp
Added: /usr/include/mamba/core/repo_checker_store.hpp
Added: /usr/include/mamba/download/downloader.hpp
Added: /usr/include/mamba/download/mirror.hpp
Added: /usr/include/mamba/download/mirror_map.hpp
Added: /usr/include/mamba/download/request.hpp
Added: /usr/include/mamba/fs/filesystem.hpp
Added: /usr/include/mamba/solver/libsolv/database.hpp
Added: /usr/include/mamba/solver/libsolv/parameters.hpp
Added: /usr/include/mamba/solver/libsolv/repo_info.hpp
Added: /usr/include/mamba/solver/libsolv/solver.hpp
Added: /usr/include/mamba/solver/libsolv/unsolvable.hpp
Added: /usr/include/mamba/solver/problems_graph.hpp
Added: /usr/include/mamba/solver/request.hpp
Added: /usr/include/mamba/solver/solution.hpp
Added: /usr/include/mamba/specs/authentication_info.hpp
Added: /usr/include/mamba/specs/build_number_spec.hpp
Added: /usr/include/mamba/specs/channel.hpp
Added: /usr/include/mamba/specs/chimera_string_spec.hpp
Added: /usr/include/mamba/specs/conda_url.hpp
Added: /usr/include/mamba/specs/error.hpp
Added: /usr/include/mamba/specs/glob_spec.hpp
Added: /usr/include/mamba/specs/match_spec.hpp
Added: /usr/include/mamba/specs/package_info.hpp
Added: /usr/include/mamba/specs/regex_spec.hpp
Added: /usr/include/mamba/specs/unresolved_channel.hpp
Added: /usr/include/mamba/util/cfile.hpp
Added: /usr/include/mamba/util/conditional.hpp
Added: /usr/include/mamba/util/cryptography.hpp
Added: /usr/include/mamba/util/encoding.hpp
Added: /usr/include/mamba/util/environment.hpp
Added: /usr/include/mamba/util/heap_optional.hpp
Added: /usr/include/mamba/util/json.hpp
Added: /usr/include/mamba/util/os.hpp
Added: /usr/include/mamba/util/os_linux.hpp
Added: /usr/include/mamba/util/os_osx.hpp
Added: /usr/include/mamba/util/os_unix.hpp
Added: /usr/include/mamba/util/os_win.hpp
Added: /usr/include/mamba/util/parsers.hpp
Added: /usr/include/mamba/util/random.hpp
Added: /usr/include/mamba/util/tuple_hash.hpp
Added: /usr/include/mamba/util/variant_cmp.hpp
Added: /usr/include/mamba/util/weakening_map.hpp
Added: /usr/include/mamba/validation/errors.hpp
Added: /usr/include/mamba/validation/keys.hpp
Added: /usr/include/mamba/validation/repo_checker.hpp
Added: /usr/include/mamba/validation/tools.hpp
Added: /usr/include/mamba/validation/update_framework.hpp
Added: /usr/include/mamba/validation/update_framework_v0_6.hpp
Added: /usr/include/mamba/validation/update_framework_v1.hpp
Added: /usr/lib/libmamba.a
Modified: /usr/include/mamba/api/c_api.h
Modified: /usr/include/mamba/api/channel_loader.hpp
Modified: /usr/include/mamba/api/clean.hpp
Modified: /usr/include/mamba/api/config.hpp
Modified: /usr/include/mamba/api/configuration.hpp
Modified: /usr/include/mamba/api/configuration_impl.hpp
Modified: /usr/include/mamba/api/create.hpp
Modified: /usr/include/mamba/api/info.hpp
Modified: /usr/include/mamba/api/install.hpp
Modified: /usr/include/mamba/api/list.hpp
Modified: /usr/include/mamba/api/remove.hpp
Modified: /usr/include/mamba/api/repoquery.hpp
Modified: /usr/include/mamba/api/shell.hpp
Modified: /usr/include/mamba/api/update.hpp
Modified: /usr/include/mamba/core/activation.hpp
Modified: /usr/include/mamba/core/context.hpp
Modified: /usr/include/mamba/core/env_lockfile.hpp
Modified: /usr/include/mamba/core/environments_manager.hpp
Modified: /usr/include/mamba/core/error_handling.hpp
Modified: /usr/include/mamba/core/execution.hpp
Modified: /usr/include/mamba/core/fsutil.hpp
Modified: /usr/include/mamba/core/history.hpp
Modified: /usr/include/mamba/core/link.hpp
Modified: /usr/include/mamba/core/menuinst.hpp
Modified: /usr/include/mamba/core/output.hpp
Modified: /usr/include/mamba/core/package_cache.hpp
Modified: /usr/include/mamba/core/package_handling.hpp
Modified: /usr/include/mamba/core/palette.hpp
Modified: /usr/include/mamba/core/pinning.hpp
Modified: /usr/include/mamba/core/prefix_data.hpp
Modified: /usr/include/mamba/core/progress_bar.hpp
Modified: /usr/include/mamba/core/query.hpp
Modified: /usr/include/mamba/core/run.hpp
Modified: /usr/include/mamba/core/shell_init.hpp
Modified: /usr/include/mamba/core/subdirdata.hpp
Modified: /usr/include/mamba/core/tasksync.hpp
Modified: /usr/include/mamba/core/thread_utils.hpp
Modified: /usr/include/mamba/core/transaction.hpp
Modified: /usr/include/mamba/core/transaction_context.hpp
Modified: /usr/include/mamba/core/util.hpp
Modified: /usr/include/mamba/core/util_os.hpp
Modified: /usr/include/mamba/core/util_scope.hpp
Modified: /usr/include/mamba/core/virtual_packages.hpp
Modified: /usr/include/mamba/specs/archive.hpp
Modified: /usr/include/mamba/specs/platform.hpp
Modified: /usr/include/mamba/specs/repo_data.hpp
Modified: /usr/include/mamba/specs/version.hpp
Modified: /usr/include/mamba/specs/version_spec.hpp
Modified: /usr/include/mamba/util/flat_binary_tree.hpp
Modified: /usr/include/mamba/util/flat_bool_expr_tree.hpp
Modified: /usr/include/mamba/util/flat_set.hpp
Modified: /usr/include/mamba/util/graph.hpp
Modified: /usr/include/mamba/util/iterator.hpp
Modified: /usr/include/mamba/util/path_manip.hpp
Modified: /usr/include/mamba/util/string.hpp
Modified: /usr/include/mamba/util/type_traits.hpp
Modified: /usr/include/mamba/util/url.hpp
Modified: /usr/include/mamba/util/url_manip.hpp
Modified: /usr/include/mamba/version.hpp
Modified: /usr/lib/cmake/libmamba/libmambaConfig.cmake
Modified: /usr/lib/cmake/libmamba/libmambaConfigVersion.cmake
Modified: /usr/lib/cmake/libmamba/libmambaTargets-release.cmake
Modified: /usr/lib/cmake/libmamba/libmambaTargets.cmake
Deleted: /usr/include/mamba/core/channel.hpp
Deleted: /usr/include/mamba/core/download.hpp
Deleted: /usr/include/mamba/core/environment.hpp
Deleted: /usr/include/mamba/core/fetch.hpp
Deleted: /usr/include/mamba/core/mamba_fs.hpp
Deleted: /usr/include/mamba/core/match_spec.hpp
Deleted: /usr/include/mamba/core/package_download.hpp
Deleted: /usr/include/mamba/core/package_info.hpp
Deleted: /usr/include/mamba/core/pool.hpp
Deleted: /usr/include/mamba/core/repo.hpp
Deleted: /usr/include/mamba/core/satisfiability_error.hpp
Deleted: /usr/include/mamba/core/solution.hpp
Deleted: /usr/include/mamba/core/solver.hpp
Deleted: /usr/include/mamba/core/util_random.hpp
Deleted: /usr/include/mamba/core/validate.hpp

Package micromamba: Click to expand/collapse

Package micromamba:
Modified: /usr/bin/micromamba

Package mamba-package: Click to expand/collapse

Package mamba-package:
Modified: /usr/bin/mamba-package

@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 Nov 7, 2024
@rawlingsj rawlingsj assigned rawlingsj and unassigned philroche Nov 7, 2024
@rawlingsj rawlingsj enabled auto-merge (squash) November 7, 2024 23:45
@rawlingsj rawlingsj merged commit b541c5c into main Nov 8, 2024
17 checks passed
@rawlingsj rawlingsj deleted the wolfictl-a804a634-a79e-41f4-99f6-df5e31aa4245 branch November 8, 2024 08:47
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. help wanted Extra attention is needed interrupt request-version-update request for a newer version of a package squad:lifecycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants