ghidra: buildNatives_osx64 build is broken
Describe the bug
gradle buildNatives_osx64 fails with error message
> Task :CabExtract:osx64CabExtractMake
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
gcc -DHAVE_CONFIG_H -I. -I./mspack -DMSPACK_NO_DEFAULT_SYSTEM -g -O2 -c -o system.o `test -f 'mspack/system.c' || echo './'`mspack/system.c
gcc -DHAVE_CONFIG_H -I. -I./mspack -DMSPACK_NO_DEFAULT_SYSTEM -g -O2 -c -o cabd.o `test -f 'mspack/cabd.c' || echo './'`mspack/cabd.c
gcc -DHAVE_CONFIG_H -I. -I./mspack -DMSPACK_NO_DEFAULT_SYSTEM -g -O2 -c -o lzxd.o `test -f 'mspack/lzxd.c' || echo './'`mspack/lzxd.c
gcc -DHAVE_CONFIG_H -I. -I./mspack -DMSPACK_NO_DEFAULT_SYSTEM -g -O2 -c -o mszipd.o `test -f 'mspack/mszipd.c' || echo './'`mspack/mszipd.c
gcc -DHAVE_CONFIG_H -I. -I./mspack -DMSPACK_NO_DEFAULT_SYSTEM -g -O2 -c -o qtmd.o `test -f 'mspack/qtmd.c' || echo './'`mspack/qtmd.c
rm -f libmspack.a
ar cru libmspack.a system.o cabd.o lzxd.o mszipd.o qtmd.o
/opt/local/bin/ranlib: object: libmspack.a(system.o) malformed object (unknown load command 1)
ar: internal ranlib command failed
make[1]: *** [libmspack.a] Error 1
make: *** [all] Error 2
> Task :CabExtract:osx64CabExtractMake FAILED
To Reproduce Steps to reproduce the behavior: This applies to the current Ghidra github repo, the last commit was https://github.com/NationalSecurityAgency/ghidra/commit/cafbb77db0a2120c529aef45d2d6bc47fa1edc29
mkdir ~/git2
cd ~/git2
git clone https://github.com/NationalSecurityAgency/ghidra.git
cd ghidra/
gradle eclipse
gradle prepDev -x yajswDevUnpack eclipse
mkdir -p /git2/ghidra.bin/GhidraBuild/EclipsePlugins/GhidraDev/buildDependencies/
cp ~/git/ghidra.bin/GhidraBuild/EclipsePlugins/GhidraDev/buildDependencies/* ~/git2/ghidra.bin/GhidraBuild/EclipsePlugins/GhidraDev/buildDependencies/
gradle prepDev -x yajswDevUnpack eclipse
gradle buildNatives_osx64
Expected behavior Build should work.
Environment (please complete the following information):
- OS: macOS 10.14.5
- Java Version: openjdk 11.0.2 2019-01-15
- Ghidra Version: fresh clone from github
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (8 by maintainers)
Ok, I found the problem - apparently my
ranlib(“Apple Inc. version cctools-895”) was installed with another package, maybe libtools (?), and didn’t matchar.Now, with
everything builds ok.
It generates a warning
but it builds 😃
Thanks for your help.