0

I'm a new user of binder and I followed the installation steps but when I run the last following command:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=ON .. && ninja

It says: CMake Error: The source directory "/Users/cuinjune/prefix" does not appear to contain CMakeLists.txt.

Am I missing something? I followed the steps twice but am still stuck at the last step. Any guidance would be appreciated.

Zack Lee
  • 2,784
  • 6
  • 35
  • 77

1 Answers1

2

I couldn't successfully build binder using this installation steps. I too received the following error :

CMake Error: The source directory "$HOME/prefix" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.

However, the installation steps seem to be obsolete. You can find the latest installation steps here and the binder repository here.

As mentioned in the docs, you can clone the binder repository and run build-and-run-tests.py for a default installation.


While running the build-and-run-tests.py, if you are at this step Building tool: binder..., it might seem as if the process is taking forever as there is no immediate verbose output available.

Instead you can terminate the build and manually execute the commands in the terminal to get verbose output.

For example, consider the below output :

Building tool: binder...
cd /home/test/binder/build/llvm-6.0.1/build_6.0.1.linux.ubuntu.release && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=ON  .. && ninja bin/binder clang -j1

You can terminate (Ctrl+C) the build and run the commands manually in a sequence in the terminal (run the build-and-run-tests.py again to continue the build after manual execution of the commands),

cd /home/test/binder/build/llvm-6.0.1/build_6.0.1.linux.ubuntu.release
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=ON  ..
ninja bin/binder clang -j1

Furthermore, in the last command you can increase the number of jobs being executed in parallel.

From man page,

-j N

run N jobs in parallel [default=derived from CPUs available]


Also make sure that prerequisites such as clang and ninja-build are installed as noted in this issue here

Saurabh P Bhandari
  • 6,014
  • 1
  • 19
  • 50
  • I followed the latest installation steps but it fails with the same problem. And when I run `build-and-run-tests.py` script, it seems to freeze so the build takes forever. – Zack Lee Jan 12 '20 at 23:13
  • @ZackLee, at which step does it freeze ? Based on this [issue](https://github.com/RosettaCommons/binder/issues/72) it can take hours too – Saurabh P Bhandari Jan 13 '20 at 03:10
  • 1
    @ZackLee, I was able to successfully build `binder` by running `build-and-run-tests.py` script (_took a lot of time though_), note that the tests might fail but that should be ok as mentioned by the author [here](https://github.com/RosettaCommons/binder/issues/72#issuecomment-495006527) in response to [this](https://github.com/RosettaCommons/binder/issues/72#issuecomment-493845631) – Saurabh P Bhandari Jan 13 '20 at 18:35
  • How long did it take for you to build it? Did you change setting the `-j` flag? – Zack Lee Jan 13 '20 at 23:01
  • 1
    @ZackLee, It took almost a day to complete however I was using a VM and I did try changing the `-j` flag (it does help but sometimes the build fails if N > 2 and I need to restart the build, however it resumes from where it left), I recommend you to manually execute the commands as it indicates how many objects are left to be build in verbose which is atleast an indicator of progress, also note that you need to run the script once after manually executing the commands so that it can complete the remaining steps – Saurabh P Bhandari Jan 14 '20 at 02:19
  • I tried everything but it fails with `ld: symbol(s) not found for architecture x86_64` I think I will just give up. Thank you for your help anyway. – Zack Lee Jan 14 '20 at 06:52
  • @ZackLee, I suggest you to share more info on the platform you are using and the step at which you are facing the error. You can ask a new question on SO with detailed logs of where the script is failing and update your issue [here](https://github.com/RosettaCommons/binder/issues/89) too – Saurabh P Bhandari Jan 14 '20 at 07:06
  • @ZackLee, `ld: symbol(s) not found for architecture x86_64` this error seems to be related to `clang` and `c++`, so probably a new question with these tags will help – Saurabh P Bhandari Jan 14 '20 at 07:09