souffle icon indicating copy to clipboard operation
souffle copied to clipboard

Tests failing on Apple M1

Open remysucre opened this issue 3 years ago • 4 comments

After adding -Wno-error=sign-compare, soufflé compiles on OSX but many tests fail. See attached log for failures. @b-scholz suspects they are caused by broken "brie” data-structure on ARM. LastTest.log LastTestsFailed.log

remysucre avatar Jan 14 '22 04:01 remysucre

For the failing test evaluation/indexed_inequalities_compare_csv -> I created a PR #2172.

Though I'm not too sure about the other failures (other than seeing that they are dependency issues)... I was able to get all tests succeeding in an Arch Linux ARM VM (virtualised on Apple M1) after the above PR.

brofranks avatar Jan 15 '22 11:01 brofranks

I can confirm that the PR fixes evaluation/indexed_inequalities_compare_csv and semantic/negative_numbers_compare_csv, but all other tests are still failing on M1.

remysucre avatar Jan 15 '22 18:01 remysucre

FWIW I'm able to get tests to pass by adding a hack to statically link to gcc. Add to CMakeLists.txt:

set(CMAKE_C_COMPILER "/opt/homebrew/bin/gcc-11")
set(CMAKE_CXX_COMPILER "/opt/homebrew/bin/g++-11")

Assuming you have all the dependencies installed (e.g. brew install bison cmake gcc mcpp).

I believe the issue on M1 is related to the Homebrew path changing on ARM (from /usr/local to /opt/homebrew) and it seems CMake is not able to find gcc even though the PATH includes /opt/homebrew/bin correctly.

I think Apple Clang itself may not be compatible with the Soufflé build.

brofranks avatar Jan 16 '22 09:01 brofranks

That did the trick thanks! Now only 8 (really 2) profile tests are failing:

3116 - profile/lrg_attr_id_cmp_prof_rul_C2.1 (Failed)
3120 - profile/lrg_attr_id_cmp_prof_graph_R2_copy_t (Failed)
3122 - profile/lrg_attr_id_cmp_prof_graph_C2.1_tot_t (Failed)
3124 - profile/lrg_attr_id_cmp_prof_graph_ver_C2.1_tuples (Failed)
3140 - profile/recursive_cmp_prof_rul_C2.1 (Failed)
3144 - profile/recursive_cmp_prof_graph_R2_copy_t (Failed)
3146 - profile/recursive_cmp_prof_graph_C2.1_tot_t (Failed)
3148 - profile/recursive_cmp_prof_graph_ver_C2.1_tuples (Failed)

I printed out the relations but can't tell what they are meant to represent: LastTest.log

remysucre avatar Jan 16 '22 23:01 remysucre