Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS build failed - yaracpp-project #291

Closed
don1001 opened this issue May 3, 2018 · 8 comments
Closed

macOS build failed - yaracpp-project #291

don1001 opened this issue May 3, 2018 · 8 comments

Comments

@don1001
Copy link

don1001 commented May 3, 2018

Hi, I'm trying to build retdec on macOS unfortunately I get build failed when its get to building
yaracpp-project is this know issue ?

[  8%] No patch step for 'yaracpp-project'
[  8%] No update step for 'yaracpp-project'
[  8%] Performing configure step for 'yaracpp-project'
-- yaracpp-project configure command succeeded.  See also /Users/don1001/Desktop/my_dev/retdec/build/external/src/yaracpp-project-stamp/yaracpp-project-configure-*.log
[  9%] Performing build step for 'yaracpp-project'
CMake Error at /Users/don1001/Desktop/my_dev/retdec/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/don1001/Desktop/my_dev/retdec/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
make: *** [all] Error 2

--
don1001s-MBP:retdec don1001$ cat  /Users/don1001/Desktop/my_dev/retdec/build/external/src/yaracpp-project-stamp/yaracpp-project-build-*.log
./bootstrap.sh: line 2: autoreconf: command not found
make[5]: *** [deps/yara/src/yara-stamp/yara-configure-linux] Error 127
make[4]: *** [deps/CMakeFiles/yara.dir/all] Error 2
make[3]: *** [all] Error 2
Scanning dependencies of target yara
[  7%] Creating directories for 'yara'
[ 14%] Performing download step (download, verify and extract) for 'yara'
-- Downloading...
   dst='/Users/don1001/Desktop/my_dev/retdec/build/external/src/yaracpp-project-build/deps/yara/src/yara-v1.0-retdec.zip'
   timeout='none'
-- Using src='https://github.com/avast-tl/yara/archive/v1.0-retdec.zip'
-- [download 0% complete]
-- [download 1% complete]
...
-- [download 100% complete]
-- Downloading... done
-- extracting...
     src='/Users/don1001/Desktop/my_dev/retdec/build/external/src/yaracpp-project-build/deps/yara/src/yara-v1.0-retdec.zip'
     dst='/Users/don1001/Desktop/my_dev/retdec/build/external/src/yaracpp-project-build/deps/yara/src/yara'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 21%] No patch step for 'yara'
[ 28%] No update step for 'yara'
[ 35%] No configure step for 'yara'
[ 42%] Performing configure-linux step for 'yara'
don1001s-MBP:retdec don1001$
@metthal
Copy link
Member

metthal commented May 3, 2018

It seems like autoreconf is missing in your system. Please, make sure you have installed every single dependency mentioned here. Let us know if it helps.

@don1001
Copy link
Author

don1001 commented May 3, 2018

I do have autoreconf version 2.69 installed

@metthal
Copy link
Member

metthal commented May 3, 2018

Make sure you have your PATH properly set up so even newly started shell can find your autoreconf. I would advise you following:

  1. Clone yaracpp separately.
  2. Replace line 48 in yaracpp/deps/CMakeLists.txt with ${CMAKE_COMMAND} -E environment.
  3. Build yaracpp. It should fail and print you out all variables from your environment. Check whether PATH contains path to your autoreconf.

@don1001
Copy link
Author

don1001 commented May 3, 2018

seems I need to do some stuff with autoreconf

[ 42%] Performing configure-linux step for 'yara'
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
make[2]: *** [deps/yara/src/yara-stamp/yara-configure-linux] Error 1
make[1]: *** [deps/CMakeFiles/yara.dir/all] Error 2
make: *** [all] Error 2
don1001-Mac-mini:build bob$ autoreconf
autoreconf: 'configure.ac' or 'configure.in' is required

@metthal
Copy link
Member

metthal commented May 3, 2018

Now it seems like autoreconf was found but it didn't find aclocal. Do you have it installed? It should be part of automake package.

@don1001
Copy link
Author

don1001 commented May 3, 2018

you're right I was missing automake for some reason I believed it was already installed with autotools
but brew install automake solve the issue. Thank you for help.

It build successfully but when I try to run it I get gibberish:

bash-4.4$ ./retdec-decompiler.sh --help
Error: Invalid options: 'a:e:hkl:m:o:p:', '-l' ...

I need to read build and installation perhaps I missed something again

@metthal
Copy link
Member

metthal commented May 3, 2018

This is caused by different version of getopt. You need to have GNU getopt in your PATH before getopt that comes with Mac OS X. Follow these instructions.

@don1001
Copy link
Author

don1001 commented May 3, 2018

thanks! seems to work now

bash-4.4$ brew install gnu-getopt
bash-4.4$ export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
bash-4.4$ echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bash_profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants