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 recipe for labmaze #21512

Merged
merged 36 commits into from
Dec 22, 2022
Merged

Add recipe for labmaze #21512

merged 36 commits into from
Dec 22, 2022

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Dec 11, 2022

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/labmaze) and found it was in an excellent condition.

@traversaro
Copy link
Contributor Author

The windows build fails with:

WARNING conda.gateways.disk.delete:unlink_or_rename_to_trash(140): Could not remove or rename C:\bld\labmaze_1670957684912\_build_env\Library\lib\jvm\lib\modules.  Please remove this file manually (you may need to reboot to free file handles)

Perhaps we need to stop the bazel daemon after starting it?

@traversaro
Copy link
Contributor Author

Windows is failing with:

Using pip 22.3.1 from %PREFIX%\lib\site-packages\pip (python 3.9)
Non-user install because user site-packages disabled
Ignoring indexes: https://pypi.org/simple
Created temporary directory: C:\Users\VssAdministrator\AppData\Local\Temp\pip-build-tracker-zi5yv9ck
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 231, in _prepare
    dist = self._prepare_distribution()
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 308, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\operations\prepare.py", line 491, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\operations\prepare.py", line 577, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\operations\prepare.py", line 69, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "C:\bld\labmaze_1670963390004\_h_env\lib\contextlib.py", line 126, in __exit__
    next(self.gen)
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\operations\build\build_tracker.py", line 124, in track
    self.remove(req)
  File "C:\bld\labmaze_1670963390004\_h_env\lib\site-packages\pip\_internal\operations\build\build_tracker.py", line 109, in remove
    os.unlink(self._entry_path(req.link))
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\VssAdministrator\\AppData\\Local\\Temp\\pip-build-tracker-zi5yv9ck\\a26f0086ae0a3a42b2df1119b19e6982d0cc6ba2b3c0a5678897774c'

macOS with:

    "_PyUnicode_AsEncodedString", referenced from:
        pybind11::detail::error_fetch_and_normalize::format_value_and_trace() const in _defaults.pic.o
    "_PyUnicode_AsUTF8AndSize", referenced from:
        pybind11::detail::string_caster<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false>::load(pybind11::handle, bool) in _defaults.pic.o
    "_PyUnicode_AsUTF8String", referenced from:
        pybind11::str::operator std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >() const in _defaults.pic.o
    "_PyUnicode_FromString", referenced from:
        pybind11::detail::make_static_property_type() in _defaults.pic.o
        pybind11::detail::make_default_metaclass() in _defaults.pic.o
        pybind11::detail::make_object_base_type(_typeobject*) in _defaults.pic.o
        pybind11::str::str(char const*) in _defaults.pic.o
        pybind11::detail::dict_getitemstring(_object*, char const*) in _defaults.pic.o
    "_PyWeakref_NewRef", referenced from:
        pybind11::weakref::weakref(pybind11::handle, pybind11::handle) in _defaults.pic.o
    "_Py_GetVersion", referenced from:
        _PyInit__defaults in _defaults.pic.o
        pybind11::detail::type_caster<bool, void>& pybind11::detail::load_type<bool, void>(pybind11::detail::type_caster<bool, void>&, pybind11::handle const&) in _defaults.pic.o
  ld: symbol(s) not found for architecture x86_64
  clang-14: error: linker command failed with exit code 1 (use -v to see invocation)

macOS probably can be fixed either by passing -undefined dynamic_lookup or by linking the Python shared library (see bazelbuild/bazel#16413).

@traversaro
Copy link
Contributor Author

macOS probably can be fixed either by passing -undefined dynamic_lookup or by linking the Python shared library (see bazelbuild/bazel#16413).

Directly linking the python libraries resulted in a segfault for some reason, let's switch to pass -undefined dynamic_lookup .

@traversaro
Copy link
Contributor Author

The Windows problem was fixed by specifying to pip to use a temporary directory inside the working dir.

@traversaro
Copy link
Contributor Author

@conda-forge/help-c-cpp the recipe is ready for review. As I am not expert in bazel I am not sure if I did everything fine from the bazel point of view, so this may be interesting also for @conda-forge/bazel .

Comment on lines 2 to 10
{% set version = "1.0.6" %}

package:
name: {{ name }}
version: {{ version }}

source:
url: https://github.com/deepmind/labmaze/archive/6d7e8f058428025cd4253f1ef6a1ed6618d9b0ea.zip
sha256: dbd3e0b96e1b50936846bdc6f8f63d1199ca6319aefa64c0f5c9a5d29858f605
Copy link
Member

Choose a reason for hiding this comment

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

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 updated the recipe to be more clear in 0c0c674 .

host:
- pybind11
- pybind11-abi
- abseil-cpp
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

This should be:

Suggested change
- abseil-cpp
- libabseil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=630409&view=logs&j=6f142865-96c3-535c-b7ea-873d86b887bd&t=22b0682d-ab9e-55d7-9c79-49f3c3ba4823&l=5645

There's linking warnings about libabseil. Are you accidentally static linking?

I am using just an header-only part of abseil. I added an ignore of libabseil's run_exports in d85e453 to account for that.

Comment on lines 30 to 31
+ path = "/home/traversaro/mambaforge/envs/labmazedev/include", # absl placeholder
+ build_file = "@//bazel:system_absl.BUILD"
Copy link
Member

Choose a reason for hiding this comment

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

How can this local path work in CI, or is this simply never built...?

Copy link
Contributor Author

@traversaro traversaro Dec 22, 2022

Choose a reason for hiding this comment

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

This is replaced by setup.py, following the structure already used in the recipe for the python headers, however given that a random local path was confusing, I substituted it with a clearly fake path in 2a405c0 .

@traversaro
Copy link
Contributor Author

@h-vetinari @carterbox thanks a lot for the comments, I tried to address them, once the review is completed I will stash the commits because ~35 are quite a lot.

@traversaro traversaro requested review from carterbox and h-vetinari and removed request for carterbox and h-vetinari December 22, 2022 10:57
@carterbox carterbox merged commit 8ca8df4 into conda-forge:main Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants