$ ld --version
GNU ld (Gentoo 2.37_p1 p0) 2.37
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ find . -name 'libkeystone.so*'|xargs ls -lh
lrwxrwxrwx 1 mark mark 16 Jan 17 15:00 ./deps/build/keystone/build/llvm/lib64/libkeystone.so -> libkeystone.so.0
-rwxr-xr-x 1 mark mark 6.9M Jan 17 15:00 ./deps/build/keystone/build/llvm/lib64/libkeystone.so.0
lrwxrwxrwx 1 mark mark 16 Jan 17 15:00 ./deps/lib64/libkeystone.so -> libkeystone.so.0
-rwxr-xr-x 1 mark mark 6.9M Jan 17 15:00 ./deps/lib64/libkeystone.so.0
$ sha1sum ./deps/build/keystone/build/llvm/lib64/libkeystone.so.0 ./deps/lib64/libkeystone.so.0
c8953989c7f8bb4de3b5dc22508ecc17f788b3c0 ./deps/build/keystone/build/llvm/lib64/libkeystone.so.0
c8953989c7f8bb4de3b5dc22508ecc17f788b3c0 ./deps/lib64/libkeystone.so.0
$ file ./deps/lib64/libkeystone.so.0
./deps/lib64/libkeystone.so.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
Eventually I realized there were two dirs:
$ ls ./deps/lib
libunicorn.a libunicorn.so libunicorn.so.1 pkgconfig
$ ls ./deps/lib64
libcapstone.so libcapstone.so.5 libcapstone.so.5.0.0 libkeystone.so libkeystone.so.0 pkgconfig
... so unicorn is writing to deps/lib but capstone and keystone now use deps/lib64.
Took me a while to realize what was going on. There's a patch at the bottom to fix this.
This is with the unstable branch; with stable, I had this issue as well as risc-v errors.
Eventually I realized there were two dirs:
... so unicorn is writing to deps/lib but capstone and keystone now use deps/lib64.