Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917639 - dev-libs/libxml2-2.11.6[static-libs] fails to build with slibtool - ar: error: script line 1: unknown command: OPEN
Summary: dev-libs/libxml2-2.11.6[static-libs] fails to build with slibtool - ar: error...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
Depends on:
Blocks: slibtool
  Show dependency tree
Reported: 2023-11-20 18:47 UTC by topological-automata
Modified: 2024-02-08 18:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

libxml's build.log (libxml2-build.log,152.73 KB, text/x-log)
2023-11-20 18:47 UTC, topological-automata
emerge --info (emerge-info,19.74 KB, text/plain)
2023-11-20 18:47 UTC, topological-automata

Note You need to log in before you can comment on or make changes to this bug.
Description topological-automata 2023-11-20 18:47:30 UTC
Created attachment 875250 [details]
libxml's build.log

attached are the build.log and emerge --info
Comment 1 topological-automata 2023-11-20 18:47:52 UTC
Created attachment 875251 [details]
emerge --info
Comment 2 orbea 2023-11-21 16:20:57 UTC
I can't reproduce this using slibtool, musl, clang and the same USE. Looking at the error I would guess this is related to ar(1) and not slibtool.

ar: error: script line 1: unknown command: OPEN

Are you sure this is not reproducible with libtool?
Comment 3 topological-automata 2023-11-23 19:34:23 UTC
yes, because with libtool, same env it compiles fine, no problem..
Comment 4 orbea 2023-11-23 22:10:11 UTC
What ar(1) implementation are you using and how did you configure it to be used?
Comment 5 orbea 2023-11-24 16:26:39 UTC
I was able to reproduce it, this occurs with slibtool + llvm-ar and seems likely to be a slibtool bug.

With GNU libtool it will call clang and then use llvm-ar appropriately, while with slibtool it will just use the ar executable which will work if that ar executable is from binutils, but if its actually a symlink for llvm-ar then it will fail as shown in this issue.

At least in the cast of libxml2 this can be avoided by not setting static-libs in the USE.
Comment 6 orbea 2024-02-08 17:00:38 UTC
This is fixed in slibtool-9999 and will be fixed in the next release.