Nrf modem blob has compression enabled now?

Hi there,

I've been working on creating a nice wrapper around the nrf modem library in Rust. Currently can be found here: https://github.com/diondokter/nrf-modem

When I started I used nrfxlib version 2.0.1 and that worked just fine. There have been a couple of updates so I wanted to update the library.
So I moved it to version 2.1.3 (https://github.com/nrfconnect/sdk-nrfxlib/tree/10016b0a74653692034eded56022cefc63a9eb86).
But now when I try to link to it I get the following error

rust-lld: error: /Users/martin/repos/nrf91-2.0.1-test/target/thumbv8m.main-none-eabihf/debug/deps/libnrfxlib_sys-38b63c27fefa3532.rlib(rpc_transport_ipc.c.obj):(.debug_macro) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support

Apparently something is built with some sort of compression turned on and the default Rust linker on both Windows and Mac don't support that.
Linking on Linux does seem to work though.

Is there a workaround?
Is this a deliberate change that will stay?
Or am I on an unofficial version? (It doesn't have a tag)

Parents
  • The debug symbols in the library are compressed in later releases of libmodem. That was done intentionally to reduce the size of the binary (in half). That has no impact other than on the size of the file in your filesystem, it does not make the library "smaller" when you program it.

    It appears that the linkers on Mac and Windows are not built with the flag to enable the decompression of those symbols, unlike they are on Linux. I think there are two workarounds:

    - recompile your toolchain so that ldd is built with zlib support

    - strip the file of the debug information (maybe not desirable if you planned on using that)

Reply
  • The debug symbols in the library are compressed in later releases of libmodem. That was done intentionally to reduce the size of the binary (in half). That has no impact other than on the size of the file in your filesystem, it does not make the library "smaller" when you program it.

    It appears that the linkers on Mac and Windows are not built with the flag to enable the decompression of those symbols, unlike they are on Linux. I think there are two workarounds:

    - recompile your toolchain so that ldd is built with zlib support

    - strip the file of the debug information (maybe not desirable if you planned on using that)

Children
No Data
Related