Comment 2 for bug 2037268

Revision history for this message
akka (victor-accarini) wrote :

The problem lies when building the PyEClib using pip:

pip-version: pip 20.3.4

```
    /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../liberasurecode.so: unknown type [0x13] section `.relr.dyn'
    /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../liberasurecode.so when searching for -lerasurecode
    /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/liberasurecode.so: unknown type [0x13] section `.relr.dyn'
    /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: skipping incompatible /usr/lib/liberasurecode.so when searching for -lerasurecode
    collect2: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
```

I was able to make the build work:

- Starting a docker with the python2 alpine version(alpine:3.15.6)
- Downloading and building the library from scratch following almost all the steps in here: https://git.alpinelinux.org/aports/tree/testing/liberasurecode/APKBUILD?id=33283848034c9885d984c8e8697c645c57324938
- Then running the pip install -r requirements.txt

For some reason when installing from the alpine package the `ld` deems the library incompatible, but running `file /usr/lib/liberasurecode.so.1.6.3` in both the apk and manually built they seem the same:

Manually built:
/usr/lib/liberasurecode.so.1.6.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not stripped

Package installation:
/usr/lib/liberasurecode.so.1.6.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=aabb6c883dcbfe83c253e1734437a9d51ea4b254, stripped

Couldn't figure out why that happens...