kiss-community / community

Officially unofficial KISS community repository, mirror of https://codeberg.org/kiss-community/community
https://kisscommunity.org
MIT License
49 stars 34 forks source link

libmupdf build fails with lld or mold #1160

Closed aabacchus closed 2 years ago

aabacchus commented 2 years ago

@ioraff

make: *** [Makefile:190: build/shared-release/resources/fonts/urw/NimbusMonoPS-Bold.cff.o] Error 1

The problematic commands are like:

$ ld -r -b binary -z noexecstack -o build/shared-release/resources/fonts/urw/Dingbats.cff.o resources/fonts/urw/Dingbats.cff

works with GNU ld.

with mold:

mold: fatal: mold does not suppor `-b binary`. If you want to convert a binary file into an object file, use `objcopy -I binary -O default <input-file> <output-file.o>` instead.

with lld:

ld.lld: error: target emulation unknown: -m or at least one .o file required

Fix: change the definition of OBJCOPY_CMD on line 66 of the Makefile to use objcopy -I binary -O default $< $@.

ioraff commented 2 years ago

Thanks