patchelf: not an ELF executable error
See original GitHub issueIssue Description
Thanks for this project!
When I am trying to make wheels for MacOS, I always get an error in patchelf,
$ conda press --subdir osx-64 --skip-python --fatten 'scikit-image=0.15.0=py37*'
[...]
Downloading https://conda.anaconda.org/conda-forge/osx-64/scikit-image-0.15.0-py37h86efe34_2.tar.bz2
Download complete
rewriting shebang for bin/skivi
rewriting RPATH for lib/python3.7/site-packages/skimage/_shared/geometry.cpython-37m-darwin.so
Traceback (most recent call last):
File "/home/rth/.miniconda3/bin/conda-press", line 4, in <module>
main()
File "/home/rth/.miniconda3/lib/python3.6/site-packages/conda_press/main.xsh", line 63, in main
only_pypi=ns.only_pypi
File "/home/rth/.miniconda3/lib/python3.6/site-packages/conda_press/condatools.xsh", line 866, in artifact_ref_dependency_tree_to_wheels
only_pypi=only_pypi
File "/home/rth/.miniconda3/lib/python3.6/site-packages/conda_press/condatools.xsh", line 799, in package_to_wheel
only_pypi=only_pypi
File "/home/rth/.miniconda3/lib/python3.6/site-packages/conda_press/condatools.xsh", line 766, in artifact_to_wheel
wheel.rewrite_rpaths()
File "/home/rth/.miniconda3/lib/python3.6/site-packages/conda_press/wheel.xsh", line 582, in rewrite_rpaths
current_rpath = $(patchelf --print-rpath @(fspath)).strip()
File "/home/rth/.miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 22440, in subproc_captured_stdout
return run_subproc(cmds, captured="stdout")
File "/home/rth/.miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 22424, in run_subproc
command.end()
File "/home/rth/.miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15671, in end
self._end(tee_output=tee_output)
File "/home/rth/.miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15690, in _end
self._raise_subproc_error()
File "/home/rth/.miniconda3/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15816, in _raise_subproc_error
raise subprocess.CalledProcessError(rtn, spec.args, output=self.output)
subprocess.CalledProcessError: Command '['patchelf', '--print-rpath', '/tmp/scikit-image-0.15.0-py37h86efe34_2vu_2br8v/lib/python3.7/site-packages/skimage/_shared/geometry.cpython-37m-darwin.so']' returned non-zero exit status 1.
the actual error is,
$ patchelf --print-rpath /tmp/scikit-image-0.15.0-py37h86efe34_2vu_2br8v/lib/python3.7/site-packages/skimage/_shared/geometry.cpython-37m-darwin.so
patchelf: not an ELF executable
and otherwise patchelf
looks fine
$ which patchelf
/home/rth/.miniconda3/envs/conda-press-env/bin/patchelf
$ /home/rth/.miniconda3/envs/conda-press-env/bin/patchelf --version
patchelf 0.10
conda-press installed in a clean conda virtualenv. The output of conda list
is below,
% conda list
# packages in environment at /home/rth/.miniconda3/envs/conda-press-env:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
asn1crypto 0.24.0 py37_1003 conda-forge
binutils 2.32 he1b5a44_3 conda-forge
bzip2 1.0.8 h516909a_1 conda-forge
ca-certificates 2019.9.11 hecc5488_0 conda-forge
certifi 2019.9.11 py37_0 conda-forge
cffi 1.12.3 py37h8022711_0 conda-forge
chardet 3.0.4 py37_1003 conda-forge
conda 4.7.12 py37_0 conda-forge
conda-package-handling 1.6.0 py37h516909a_0 conda-forge
conda-press 0.0.4 py37_0 conda-forge
cryptography 2.7 py37h72c5cf5_0 conda-forge
idna 2.8 py37_1000 conda-forge
lazyasd 0.1.4 py_1 conda-forge
libffi 3.2.1 he1b5a44_1006 conda-forge
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
ncurses 6.1 hf484d3e_1002 conda-forge
openssl 1.1.1c h516909a_0 conda-forge
patchelf 0.10 he1b5a44_0 conda-forge
pip 19.2.3 py37_0 conda-forge
prompt_toolkit 2.0.9 py_0 conda-forge
pycosat 0.6.3 py37h14c3975_1001 conda-forge
pycparser 2.19 py37_1 conda-forge
pygments 2.4.2 py_0 conda-forge
pyopenssl 19.0.0 py37_0 conda-forge
pysocks 1.7.1 py37_0 conda-forge
python 3.7.3 h33d41f4_1 conda-forge
readline 8.0 hf8c457e_0 conda-forge
requests 2.22.0 py37_1 conda-forge
ruamel.yaml 0.16.5 py37h516909a_1 conda-forge
ruamel.yaml.clib 0.2.0 py37h516909a_0 conda-forge
ruamel_yaml 0.15.71 py37h14c3975_1000 conda-forge
setproctitle 1.1.10 py37h14c3975_1001 conda-forge
setuptools 41.2.0 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
sqlite 3.29.0 hcee41ef_1 conda-forge
tk 8.6.9 hed695b0_1003 conda-forge
tqdm 4.36.1 py_0 conda-forge
urllib3 1.25.6 py37_0 conda-forge
wcwidth 0.1.7 py_1 conda-forge
wheel 0.33.6 py37_0 conda-forge
xonsh 0.9.11 py37_0 conda-forge
xz 5.2.4 h14c3975_1001 conda-forge
yaml 0.1.7 h14c3975_1001 conda-forge
zlib 1.2.11 h516909a_1006 conda-forge
This happened for multiple packages that I tried…
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
patchelf: not an ELF executable error · Issue #38 - GitHub
When I am trying to make wheels for MacOS, I always get an error in patchelf,. $ conda press --subdir osx-64 --skip-python --fatten...
Read more >readelf: Error: Not an ELF file - it has the wrong magic bytes at ...
The file you're giving readelf is not an ELF file - I think that's pretty obvious. Without any more information that's all the...
Read more >PatchELF: Simple utility for modifying existing ELF ...
That's the problem with these bespoke binary formats like ELF - they're not designed to encode arbitrary schemas of data, they're designed ...
Read more >Review Request: patchelf - A utility for patching ELF binaries
SRPMS/patchelf-0.5-1.fc13.src.rpm ../RPMS/x86_64/patchelf-* patchelf.src: W: spelling-error %description -l en_US executables -> executable, ...
Read more >Ubuntu Manpage: patchelf - Modify ELF files
PatchELF is a simple utility for modifying existing ELF executables and libraries. It can change the dynamic loader ("ELF interpreter") of executables and ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the explanation! Closing a not a bug then.
Opened a separate issue https://github.com/regro/conda-press/issues/40 to discuss if making wheels on a different platform than the target one could be a possibility one day…
That is… unexpected. I think that is a short term thing because we are not yet stripping binaries for Windows packages (mostly because I don’t know how). Once that is added, I wouldn’t expect it to work on Linux or Mac anymore 😉