cb-multios icon indicating copy to clipboard operation
cb-multios copied to clipboard

2 errors occured while building all the challenge binaries

Open halsalem opened this issue 3 years ago • 7 comments

Hi, I was trying to build the all challenge binaries in Ubuntu-18.04 for and it is not the first time. I made cmake clean to build again every time by typing "cmake --build . --target clean" but with building all programs with code coverage flags as you can see in the attachement "buildco.sh" it works one time building all of the challenge binaries however next building stopped on "target Carbonate_pov_1" the I left it and wait about 12hrs when I came back I found it the same as it stopped at " Carbonate_pov_1" then I stop it by ctrl+C then clean agian and build it with buildco.sh and the errors showed up as same as on the screenshot.

I am trying to test all the challenge binaries and get the code coverage for them. Also, I am continuing to test all the challenges more times for different purposes how can solve the problem if I face it next times or can you fix the problem?

Thank you

buildco.txt error

halsalem avatar Jan 30 '21 19:01 halsalem

Hi @halsalem. A couple of things:

  • The error message in your screenshot is in Clang, not our build system. In particular, it's (one of) the error messages that commonly occurs when Clang (or LLVM) runs out of memory. How much memory does your system/VM have? I'd recommend at least 8GB for this build, and probably more (depending on how many jobs you're running)

  • Running the CMake build directly currently isn't supported. We haven't done anything to break it, but we strongly recommend that people use the build.sh script. You can peruse that script to see how to pass additional build arguments through it.

Let me know if either of those points helps.

woodruffw avatar Feb 01 '21 15:02 woodruffw

I have 16GB Memory (RAM) in my system. I tried with build.sh but it is stopped the building as the same thing before at "Carbonate_pov_1". I tried with "cmake --build . Carbonate_pov_1" but it donet build it it just stop without doing anything build

halsalem avatar Feb 01 '21 19:02 halsalem

Hmm. pov.c is over 30MB of C, so it's very possible you're running out of memory even with 16GB due to the added coverage instrumentation.

This isn't something we've tested; does it compile normally without your added coverage flags?

woodruffw avatar Feb 01 '21 19:02 woodruffw

It compile with challenges programs normally with coverage flags. What I am trying to compile only the src folders for the challenges as an example "cb-multios/build/challenges/Accel/CmakeFiles/Accel.dir/src/" or challenges that come with more than one executables such as "commerce_webscale" "cb-multios/build/challenges/commerce_webscale/CmakeFiles/commerce_webscale_1.dir/cb_1/src/" and "cb-multios/build/challenges/commerce_webscale/CmakeFiles/commerce_webscale_2.dir/cb_2/src/" I don't need the "povs" for challenges how can I discard other folders "povs" from compiling or building.

halsalem avatar Feb 01 '21 19:02 halsalem

I don't need the "povs" for challenges how can I discard other folders "povs" from compiling or building.

There currently isn't an easy way to do that. Your best best is probably to modify the buildCB function in the main CMakeLists.txt so that it doesn't actually call buildPOV for each discovered POV.

We'd be happy to accept a PR that adds a CMake option for that, e.g. NO_BUILD_POVS.

woodruffw avatar Feb 01 '21 19:02 woodruffw

How can change the CMakeLists.txt to not compile the povs?

halsalem avatar Feb 01 '21 20:02 halsalem

How can change the CMakeLists.txt to not compile the povs?

Take a look at the buildCB function. It calls buildPOV in a loop for each POV discovered for the challenge. You should be able to just comment that loop out.

woodruffw avatar Feb 01 '21 20:02 woodruffw