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

[Bug]: Error loading Python lib libpython3.11.so.1.0 #82

Open
njlr opened this issue Sep 27, 2024 · 1 comment
Open

[Bug]: Error loading Python lib libpython3.11.so.1.0 #82

njlr opened this issue Sep 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@njlr
Copy link

njlr commented Sep 27, 2024

What happened?

Try to run an s3_sync rule and get:

[64234] Error loading Python lib '/home/njlr/.cache/bazel/_bazel_njlr/9bce8694c865e66522f64bee08628579/execroot/__main__/bazel-out/k8-fastbuild/bin/external/aws/libpython3.11.so.1.0': dlopen: /home/njlr/.cache/bazel/_bazel_njlr/9bce8694c865e66522f64bee08628579/execroot/__main__/bazel-out/k8-fastbuild/bin/external/aws/libpython3.11.so.1.0: cannot open shared object file: No such file or directory

It will run successfully with --dry_run.

Version

Development (host) and target OS/architectures:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04 LTS
Release:	24.04
Codename:	noble

Output of bazel --version:

bazel 6.2.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

# aspect_rules_aws
http_archive(
    name = "aspect_rules_aws",
    sha256 = "88371c9d38335e96de8dc2da9acbd5f93b2c861a836c4ad36a4c2103a42860d8",
    strip_prefix = "rules_aws-0.4.0",
    url = "https://github.com/aspect-build/rules_aws/releases/download/v0.4.0/rules_aws-v0.4.0.tar.gz",
)

######################
# rules_aws setup #
######################
# Fetches the rules_aws dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_aws//aws:repositories.bzl", "aws_register_toolchains", "rules_aws_dependencies")

rules_aws_dependencies()

aws_register_toolchains(
    name = "aws",
    aws_cli_version = "2.13.0",
)

Language(s) and/or frameworks involved:

How to reproduce

My target definition:


s3_sync(
  name = "s3_test",
  srcs = [ ":build" ],
  bucket = "my_test_bucket/test",
)

Any other information?

No response

@njlr njlr added the bug Something isn't working label Sep 27, 2024
@njlr njlr changed the title [Bug]: [Bug]: Error loading Python lib libpython3.11.so.1.0 Sep 27, 2024
@njlr
Copy link
Author

njlr commented Sep 27, 2024

There is a work-around to use the system installed aws CLI.

aws.sh

#!/usr/bin/env bash

set -e

aws "$@"

BUILD.bazel

sh_binary(
  name = "aws",
  srcs = [ "aws.sh" ],
)

s3_sync(
  name = "s3_test",
  srcs = [ ":build" ],
  bucket = "my_test_bucket/test",
  aws = ":aws",
)

This might not be so bad if you are using Nix flakes for reproducible environments, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant