Local rebuilds fail, but clean builds work
btalb opened this issue · 2 comments
btalb commented
Reproduce:
- run
pip install -e .
with a local copy (works) - run it again (crashes with unhelpful output)
Workaround: rm ./build/
between runs, but you lose your build cache which makes development tedious
btalb commented
Better workaround, but still not ideal:
rm build/temp.*/CMakeCache.txt; pip install -e .
The difference between CMakeCache.txt on fresh builds, and rebuilds is:
ben@ben-precision-3630:~/repos/gtsam_quadrics$ diff build_success/temp.linux-x86_64-3.8/CMakeCache.txt build_fail/temp.linux-x86_64-3.8/CMakeCache.txt
26,27c26,27
< //Build shared gtsam library, instead of static
< BUILD_SHARED_LIBS:BOOL=OFF
---
> //No help, variable specified on the command line.
> BUILD_SHARED_LIBS:UNINITIALIZED=OFF
197c197
< CMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-w8v9k1rc/overlay/bin/ninja
---
> CMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-zabdl3u3/overlay/bin/ninja
882c882
< CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=40
---
> CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
967,968d966
< //ADVANCED property for variable: GTSAM_COMPILE_DEFINITIONS_PUBLIC
< GTSAM_COMPILE_DEFINITIONS_PUBLIC-ADVANCED:INTERNAL=1
btalb commented
Issue is due to the caching of CMAKE_MAKE_PROGRAM (using a /tmp/pip-build-env
directory which is unique on every build).
Need to figure out how to stop this caching.