Hi,
with the last version of SWI (pull from master) i get a building error:
/mnt/c/Users/damia/Desktop/Mio/swipl-devel/packages/xpce/src/win/frame.c: In function ‘makeClassFrame’:
/mnt/c/Users/damia/Desktop/Mio/swipl-devel/packages/xpce/src/win/frame.c:2036:31: error: ‘NAME_mappedFrames’ undeclared (first use in this function)
MappedFrames = globalObject(NAME_mappedFrames, ClassChain, EAV);
^
Last week, I saw this error (or something similar) on Ubuntu … and then it went away a few days later. I’m guessing that some underlying dependency got updated. (I also saw some weird “inconsistent history” messages when I did “git pull” … and those mysteriously disappeared later)
Suggestions: do another “git pull --recurse” and do a clean build (delete the “build” directory first)
This indeed fixes my problem. However, i’m still whondering why sometimes i have to delete the build folder and rebuild the whole project from scratch…
In this case, a missing dependency. Adding this dependency is doable, but the toolchain is rather complicated and would cause a full rebuild of the XPCE graphics library on any change to it. Adding “names” (XPCE’s atoms) to the source happens so rarely that I didn’t bother.
Otherwise you should typically be fine with an incremental build unless one of the dependencies is updated to a new version. Thus, after an OS upgrade you typically have to restart in a clean build directory.
The overall rule of thumb:
git pull
git submodule update --init
cd build
ninja
ninja # Should not be needed, but some dependencies do not always work correctly
On a persistent failure
Make sure your git tree is clean (git status or git diff)
Remove the build dir, recreate it, run cmake and ninja.
I think that git pull --recurse avoids the need for submodule update --init. Similarly, you can do initial checkout with git clone --recurse. (And adding -j8 speeds things up by updating the submodules in parallel)