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

libcudart.so.12.0.107: ELF load command address/offset not properly aligned #9

Closed
jakirkham opened this issue May 19, 2023 · 4 comments · Fixed by #10
Closed

libcudart.so.12.0.107: ELF load command address/offset not properly aligned #9

jakirkham opened this issue May 19, 2023 · 4 comments · Fixed by #10

Comments

@jakirkham
Copy link
Member

jakirkham commented May 19, 2023

When creating an environment like so...

conda create -n tst python cuda-cudart_linux-64 -y
conda activate tst

...and running the following test...

cd "${CONDA_PREFIX}" 
python -c "import ctypes; ctypes.CDLL('./targets/x86_64-linux/lib/libcudart.so.12.0.107')"

...am seeing the following issue:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/datasets/jkirkham/miniconda/envs/tst/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: ./targets/x86_64-linux/lib/libcudart.so.12.0.107: ELF load command address/offset not properly aligned

Result from conda list:
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2023.5.7             hbcca054_0    conda-forge
cuda-cudart_linux-64      12.0.107             h59595ed_3    conda-forge
cuda-version              12.0                 hffde075_2    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgomp                   12.2.0              h65d4601_19    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libsqlite                 3.42.0               h2797004_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
openssl                   3.1.0                hd590300_3    conda-forge
pip                       23.1.2             pyhd8ed1ab_0    conda-forge
python                    3.11.3          h2755cc3_0_cpython    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                67.7.2             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
@jakirkham
Copy link
Member Author

Not seeing the issue when using build/number of 2

conda install 'cuda-cudart_linux-64=*=*_2'

So it seems related to PR ( #8 )

@jakirkham
Copy link
Member Author

cc @isuruf

@isuruf
Copy link
Member

isuruf commented May 19, 2023

Probably needs a binary_relocation: False.

@jakirkham
Copy link
Member Author

Yeah that makes sense. Do we need any other updates?

- name: cuda-cudart_{{ target_platform }}
build:
noarch: generic
files:
- targets/{{ target_name }}/lib/libcu*.so.* # [linux]
- Library\bin\cudart*.dll # [win]
requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
- arm-variant * {{ arm_variant_type }} # [aarch64]
- sysroot_{{ target_platform }} 2.17 # [linux]
host:
- cuda-version {{ cuda_version }}
run:
- {{ pin_compatible("cuda-version", max_pin="x.x") }}
run_constrained:
- arm-variant * {{ arm_variant_type }} # [aarch64]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants