Re: (no subject)
Jan Wielemaker <[email protected]> Tue, 26 Aug 2014 17:34:14 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 08/26/2014 04:40 PM, Carlo Capelli wrote: > it's some time now (after I installed ex-novo on my machine Ubuntu 14.04) > that I experiment a > crash near the end of build process. So many people did that without problems ... > .... > make[2]: Leaving directory `/home/carlo/swipl-devel/packages/pengines' > *** Forcing update of library index *** > rm -f /home/carlo/lib/swipl-7.1.21/library/INDEX.pl > ./swipl.sh -C "/home/carlo/lib/swipl-7.1.21/library" -f none -F none -g > "make_library_index(.)" -t halt > % Updating index for library /home/carlo/lib/swipl-7.1.21/library/ > ./swipl.sh -C "/home/carlo/lib/swipl-7.1.21" --home=. -f none -g make -t > halt > > SWI-Prolog [thread 1]: received fatal signal 11 (segv) > Segmentation fault (core dumped) > make[1]: *** [install] Error 139 > make[1]: Leaving directory `/home/carlo/swipl-devel/packages' > make: *** [install-world] Error 2 > > Overall, the installation has been completed. The system works as usual, > what's left out, apparently, it's (part of) the local documentation (I have > a contextual help in my Qt environment, that's running plDoc and presenting > those nice pages via QtWebKit). While previously I had the full > documentation, now some part is missing. > > I tried to debug it, but the core dump file (enabled by ulimit -c 1000) > apparently doesn't report the stack trace (even if ulimit -a show 'stack > size (kbytes, -s) 8192'). Getting normal core dumps in Ubuntu is a bit complicated as they are normally caught and analyzed by apport (?) :-( I managed to enable them, but forgot how ... > So I was going blind, so I added an echo in swipl.sh... > > In the end, I found a workaround, printing the command issued by swipl.sh, > the problem seems to be the flag --home=. > > > carlo@carlo-ubuntu-64:~/swipl-devel/packages$ ./swipl.sh -C > "/home/carlo/lib/swipl-7.1.21" --home=. -f none -g make -t halt > /home/carlo/swipl-devel/src/swipl --home=. -f none -g make -t halt > SWI-Prolog [thread 1]: received fatal signal 11 (segv) > Segmentation fault (core dumped) This should definitely work. One way to get sensible output is by - Uncomment the # export COFLAGS="-O2 -gdwarf-2 -g3" line in build - Make sure the addr2line utility is installed. If that still fails to produce sensible info, I'd edit swipl.sh and replace $bdir/swipl "$@" || exit 1 by gdb --args $bdir/swipl "$@" Then, when in gdb, simply do (gdb) run > carlo@carlo-ubuntu-64:~/swipl-devel/packages$ swipl --home=. -f none -g > make -t halt > [FATAL ERROR: > Could not find system resources] That is correct, as swipl-devel/packages is not a valid SWI-Prolog homedir. > carlo@carlo-ubuntu-64:~/swipl-devel/packages$ swipl -f none -g make -t > halt% Updating index for library /home/carlo/lib/swipl-7.1.21/library/ > % Updating index for library /home/carlo/lib/swipl-7.1.21/xpce/prolog/lib/ That indeed suggests some issue with processing the options. They are needed though. This command may pick an old swipl somewhere in $PATH. We want to be sure we're using the just compiled version and ensure it works in chrooted environments used by some packaging systems. Cheers --- Jan