← All tasks
cpplibigl/libigl #2029Not a task: not reproduced

cmake using -isystem for cgal includes and finding homebrew install instead?

envgap__libigl__libigl-2029

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
91f6c503f62d16f4d27709ea5be0d9ab43611942
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

libigl/libigl #2029 · read the original issue
On my local mac, I noticed that the cgal tests were failing. After some long debugging I traced it down to the compilation paramters:



```

-isystem /Users/ajx/Repos/libigl/build-header-only/_deps/cgal-src/include

```



if I replaced this with 



```

-I /Users/ajx/Repos/libigl/build-header-only/_deps/cgal-src/include

```



Everything works. My _guess_ is that [because isystem includes come later](https://stackoverflow.com/a/2579600/148668), the compiler was finding the cgal headers in `/usr/local/include/` where homebrew had put them. This compiled fine, but resulted in memory issues and crashes at runtime. I imagine due to a CGAL mismatch.



The easy fix for me was to uninstall cgal from homebrew. However, I wonder if this is something we could be doing better to prevent via our cmake scripts?



I'm not entirely sure why we use `isystem` for cgal or if that's something we're choosing or cgal is choosing. I believe `isystem` vs `I` also affects whether compilation warnings are displayed, but if that's the only reason then I'd rather see warnings than this hard to debug crash.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]