Keri Harris | 5 Jul 06:48
Favicon

[BUG] CHR install doesn't work with DESTDIR

The Yap CHR install doesn't play nice with DESTDIR. If there is an older 
version of yap installed (say yap-5.1.2) and we want to use DESTDIR to 
install yap-5.1.3 outside the standard install location (say into a staging 
area) then the CHR compile is likely to fail since YAPSHAREDIR still points 
to the old libraries. This can result in a variety of errors:

on linux-ppc (old version 5.1.2; new version 5.1.3):

make[1]: Entering directory 
`/var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/LGPL/chr'
.../../yap ../../startup -f -l chr_swi_bootstrap.yap \
                      -g "chr_compile_step1
('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt." \
                      -z 'halt(1).'
make[1]: *** [chr_translate_bootstrap1.pl] Segmentation fault

Even if there is *no* previous installation, then using DESTDIR will cause yap 
to fail to find the required libraries:

make[1]: Entering directory 
`/var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/LGPL/chr'
.../../yap ../../startup -f -l chr_swi_bootstrap.yap \
                      -g "chr_compile_step1
('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt." \
                      -z 'halt(1).'
% Restoring file /var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/startup
YAP version Yap-5.1.3
     ERROR!!  at 
file /var/tmp/portage/dev-lang/yap-5.1.3/work/Yap-5.1.3/LGPL/chr/chr_swi_bootstrap.yap, 
near line 6.
     PERMISSION ERROR- use_module(library(swi)): cannot read from library(swi)

The attached patch fixes this for me.

Keri
Attachment (yap-5.1.3-chr.patch): text/x-diff, 1502 bytes
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Gmane