patchelf icon indicating copy to clipboard operation
patchelf copied to clipboard

Version of gcc compiler effects correctness of patchelf 0.18

Open dragon512 opened this issue 1 year ago • 1 comments

Describe the bug

When moving from 0.15 to 0.18 all my builds broke on rhel7/8/9. The issue shows up as traffic_server: error while loading shared libraries: libhwloc.so.15: ELF load command address/offset not properly aligned

Steps To Reproduce

compile code with a compiler less than gcc 12 ( which is common on rhel system) and run patchelf to change the run path. running the program will result in the aligned error from above.

The workaround is to recompile the code gcc 12 ( available on rhel with devtool ) If using the older compile I found I had to move back to 0.15

Expected behavior

It should not break the binary based on the compiler

Additional context

This is more of a note as many issues here may have the same problem. just using a newer compiler fixed the problem with patchelf.

dragon512 avatar Jun 05 '24 18:06 dragon512

Seems like this is possibly a duplicate of https://github.com/NixOS/patchelf/issues/528? The thing about alignment issues is that there are a lot of things that can affect whether or not one hits the bug.

adam-azarchs avatar Jun 30 '24 07:06 adam-azarchs