retdec: Fails to build with Xcode 10 on macOS Mojave, openssl and yaracpp issue
I’ve been trying to get this to build with Xcode 10 on macOS Mojave, but it seems to be running into trouble with 2 of the dependencies.
CMake Error at /Users/user/Software/RetDec/0.7/retdec-master/build/deps/openssl/openssl/src/openssl-stamp/openssl-build-Release.cmake:16 (message):
Command failed: 2
'make' '-j8'
See also
/Users/user/Software/RetDec/0.7/retdec-master/build/deps/openssl/openssl/src/openssl-stamp/openssl-build-*.log
make[2]: *** [deps/openssl/openssl/src/openssl-stamp/openssl-build] Error 1
make[1]: *** [deps/openssl/CMakeFiles/openssl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
…
CMake Error at /Users/user/Software/RetDec/0.7/retdec-master/build/external/src/yaracpp-project-stamp/yaracpp-project-build-Release.cmake:16 (message):
Command failed: 2
'/Applications/Xcode.app/Contents/Developer/usr/bin/make'
See also
/Users/user/Software/RetDec/0.7/retdec-master/build/external/src/yaracpp-project-stamp/yaracpp-project-build-*.log
make[2]: *** [external/src/yaracpp-project-stamp/yaracpp-project-build] Error 1
make[1]: *** [deps/yaracpp/CMakeFiles/yaracpp-project.dir/all] Error 2
Attached are the log files detailing the errors.
openssl-build-err.log yaracpp-project-build-err.log
Based on the log file info, I suspect this issue may be related to Apple dropping support for 32-bit code.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 43 (23 by maintainers)
Commits related to this issue
- deps/openssl: bump version from 1.1.0f to 1.1.1c. This should fix some (not all) macOS compilation issues from #439. — committed to avast/retdec by PeterMatula 5 years ago
- deps/openssl: bump version from 1.1.0f to 1.1.1c. (#601) * deps/openssl: bump version from 1.1.0f to 1.1.1c. This should fix some (not all) macOS compilation issues from #439. * deps/openssl: a... — committed to avast/retdec by PeterMatula 5 years ago
- deps/yaracpp: update reference to yaracpp version that uses xcrun. Fix #439. — committed to avast/retdec by PeterMatula 5 years ago
Hi, I had the same issue and I’ve been able to fix it by these steps:
OpenSSL issue occurred because
cmake
was unable to locate it. I fixed this issue by explicitly exporting environment variables with brew installedopenssl
paths:Then I stumbled on the same issue with
yaracpp
as you. The version of clang that is used byautoconf
(installed by Xcode’s command-line tools) has invalid include paths which result in basic c program compilation to fail.To fix this I reinstalled macOS SDK headers:
After this, I was able to install RetDec successfully.
Edit: If OpenSSL is installed from
brew
then a more generic solution for the specification of OpenSSL path would be:Thank you @appleguru for the files.
I have prepared branch
macos-build
in yaracpp repo where we tried to setsysroot
of compiler to macOS SDK when configuring yara. It would be really helpful if you or anyone else tried to compile it WITHOUT installed SDK headers.