Skip to content

armv7‐w64‐mingw32‐ranlib: error: exactly one archive should be specified

pahaze edited this page Sep 20, 2023 · 1 revision

Problem

E.g.

armv7-w64-mingw32-ranlib '/home/pahaze/armmxe-shared/tmp-pdcurses-armv7-w64-mingw32/PDCurses-3.4.build_/pdcurses.a' '/home/pahaze/armmxe-shared/tmp-pdcurses-armv7-w64-mingw32/PDCurses-3.4.build_/panel.a'
armv7-w64-mingw32-ranlib: error: exactly one archive should be specified

Analysis

Unlike the regular ranlib tool, llvm-ranlib will only accept one archive at a time. To fix it, all you have to do is run ranlib separately.

Solution

Depending on the project, it can be easily changeable in the MXE src folder's Makefile (pdcurses for example), or it may require a patch for the actual code.

E.g. (changing src Makefile)

$(TARGET)-ranlib '$(BUILD_DIR)/pdcurses.a' '$(BUILD_DIR)/panel.a'

->

$(TARGET)-ranlib '$(BUILD_DIR)/pdcurses.a'
$(TARGET)-ranlib '$(BUILD_DIR)/panel.a'

Validity

The available information in this article was true as of commit db9033ad1a4a1f725b25fb83ad216130afa0c0bd ("Merge pull request #36").