WordNet with swi-prolog - macos

I'm trying to use the WordNet package for swi-prolog and I can't seem to be able to use it after install. I'm on MacOS Big Sur. I have tried fresh installs with both homebrew and macports, and I've even tried the docker container and I get the same error every time.
This is the process and ouput:
derek#Dereks-MBP-2 thelazyreader % swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.2.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- pack_install(wordnet).
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
Select download location for wordnet#0.9.3
(1) * https://api.github.com/repos/JanWielemaker/wordnet/zipball/V0.9.3
(2) GIT repository at https://github.com/JanWielemaker/wordnet.git
(3) Cancel
Your choice?
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
% "V0.9.3" was downloaded 46 times
Package: wordnet
Title: Access to WordNet database
Installed version: 0.9.3
Author: Jan Wielemaker <jan#swi-prolog.org>
Home page: https://github.com/JanWielemaker/wordnet
Download URL: https://github.com/JanWielemaker/wordnet/releases/*.zip
Install "wordnet-0.9.3" (7,451 bytes) Y/n?
true.
?- pack_list_installed.
Installed packages (1):
i wordnet#0.9.3 - Access to WordNet database
true.
?- use_module(library(wordnet)).
ERROR: source_sink `library(wordnet)' does not exist
ERROR: In:
ERROR: [19] throw(error(existence_error(source_sink,...),_12810))
ERROR: [15] '$resolve_source_path'(library(wordnet),_12842,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2318
ERROR: [14] '$load_file'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2292
ERROR: [9] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
?-
If I run in debug mode this is the output I get...
[debug] ?- use_module(library(wordnet)).
ERROR: source_sink `library(wordnet)' does not exist
ERROR: In:
ERROR: [19] throw(error(existence_error(source_sink,...),_4386))
ERROR: [18] '$existence_error'(source_sink,library(wordnet)) at /opt/local/lib/swipl/boot/init.pl:3794
ERROR: [17] '$abs_file_error'(library(wordnet),[],[file_type(prolog),...]) at /opt/local/lib/swipl/boot/init.pl:1221
ERROR: [16] absolute_file_name(library(wordnet),_4496,[file_type(prolog),...]) at /opt/local/lib/swipl/boot/init.pl:1157
ERROR: [15] '$resolve_source_path'(library(wordnet),_4544,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2318
ERROR: [14] '$load_file'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2292
ERROR: [13] '$load_one_file'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2128
ERROR: [12] '$load_files'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2105
ERROR: [11] load_files(user:library(wordnet),[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2085
ERROR: [10] use_module(user:library(wordnet)) at /opt/local/lib/swipl/boot/init.pl:2023
ERROR: [9] <user>
I'm stumped here. Any direction on where I can look or what I can try would be most welcome. Thanks!

Pack page: Package "wordnet"
Explainer on Wikipedia: WordNet
The module is in a file called wn.pl, not wordnet.pl.
On my machine, after having run pack_install(wordnet)., one finds this:
$HOME/.local/share/swi-prolog/pack/wordnet
|
├── pack.pl
├── prolog
│   ├── wn.pl
│   └── wn_portray.pl
└── README.md
So:
?- use_module(library(wn)).
However:
ERROR: Cannot find WordNet data files. Please set the environment
ERROR: variable WNDB to point at the directory holding the WordNet files
So these files need to be installed, too.

Related

Problems using R after update in loadNamespace

I am very new to R. Working mostly with Seurat package to evaluate my single-cell RNAseq data.
Today I wanted to update the R version and RStudio. After that I had problems using installed packages. This is my problem:
> install.packages("Seurat", dependencies = TRUE)
Installing package into ‘C:/Users/benne/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘S4Vectors’, ‘SummarizedExperiment’, ‘SingleCellExperiment’, ‘MAST’, ‘DESeq2’, ‘BiocGenerics’, ‘GenomicRanges’, ‘GenomeInfoDb’, ‘IRanges’, ‘rtracklayer’, ‘monocle’, ‘Biobase’, ‘limma’ are not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/Seurat_4.2.0.zip'
Content type 'application/zip' length 2376157 bytes (2.3 MB)
downloaded 2.3 MB
package ‘Seurat’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\benne\AppData\Local\Temp\RtmpIlveV0\downloaded_packages
> library(Seurat)
Error: package or namespace load failed for ‘Seurat’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘spatstat.data’
I think, there is no problem with the installation of Seurat-package but I cannot make the library-function work. I found other topics that tried to solve that problem but they did not help me.
What could be the problem? With the old R/RStudio version everything worked well. After the update I had to install the RTools42 because it said I have to do that. I have never done that before, why today??
I really hope, you guys may help me. I am totally lost!!
Attached my sessionInfo():
> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.utf8 LC_CTYPE=German_Germany.utf8 LC_MONETARY=German_Germany.utf8
[4] LC_NUMERIC=C LC_TIME=German_Germany.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.4.4 tidyr_1.2.1 viridisLite_0.4.1 jsonlite_1.8.2 splines_4.2.1
[6] leiden_0.4.3 shiny_1.7.2 sp_1.5-0 ggrepel_0.9.1 globals_0.16.1
[11] pillar_1.8.1 lattice_0.20-45 glue_1.6.2 reticulate_1.26 digest_0.6.29
[16] RColorBrewer_1.1-3 promises_1.2.0.1 colorspace_2.0-3 plyr_1.8.7 cowplot_1.1.1
[21] htmltools_0.5.3 httpuv_1.6.6 Matrix_1.5-1 pkgconfig_2.0.3 listenv_0.8.0
[26] purrr_0.3.5 xtable_1.8-4 patchwork_1.1.2 scales_1.2.1 RANN_2.6.1
[31] later_1.3.0 Rtsne_0.16 spatstat.utils_2.3-1 tibble_3.1.8 generics_0.1.3
[36] ggplot2_3.3.6 ellipsis_0.3.2 ROCR_1.0-11 pbapply_1.5-0 SeuratObject_4.1.2
[41] lazyeval_0.2.2 cli_3.4.1 survival_3.3-1 magrittr_2.0.3 mime_0.12
[46] future_1.28.0 fansi_1.0.3 parallelly_1.32.1 MASS_7.3-57 ica_1.0-3
[51] progressr_0.11.0 tools_4.2.1 fitdistrplus_1.1-8 data.table_1.14.2 lifecycle_1.0.3
[56] matrixStats_0.62.0 stringr_1.4.1 plotly_4.10.0 munsell_0.5.0 cluster_2.1.3
[61] irlba_2.3.5.1 compiler_4.2.1 rlang_1.0.6 scattermore_0.8 grid_4.2.1
[66] ggridges_0.5.4 RcppAnnoy_0.0.19 htmlwidgets_1.5.4 igraph_1.3.5 miniUI_0.1.1.1
[71] gtable_0.3.1 codetools_0.2-18 reshape2_1.4.4 R6_2.5.1 gridExtra_2.3
[76] zoo_1.8-11 dplyr_1.0.10 fastmap_1.1.0 future.apply_1.9.1 rgeos_0.5-9
[81] utf8_1.2.2 KernSmooth_2.23-20 stringi_1.7.8 parallel_4.2.1 Rcpp_1.0.9
[86] sctransform_0.3.5 vctrs_0.4.2 png_0.1-7 tidyselect_1.2.0 lmtest_0.9-40
Thank you so much!
I tried to find out what the problem could be. I had hope that the installation of RTools42 may work but that does not make it better. The error still occurs.
Issue occurred for me as well after upgrading to R-4.2.1. Following steps helped me resolve the issue:
Restart the computer after successful installation of R Tools
Run following commands
install.packages('spatstat.data')
install.packages('spatstat.core')
After RTools wraps up it's compilation as mentioned in answer by Maso Sato
Library(Seurat) should load fine!
I had a similar problem with my installation of R, RStudio, and Seurat today (2022/10/26).
(I did not have a problem on another computer a few weeks ago).
install.packages('Seurat') said that I should install RTools.
I did so, and I got a similar error messages as yours when executing library(Seurat).
Then, I executed install.packages('spatstat.data').
RTools had to recompile various things (gcc), but at the end, library(Seurat) ran smoothly.

Bitbake tries to fetch sources from unavailable URL and they fail

I'm currently trying to set up an environment for Yocto project for my personal study.
I was clueless about where to start Yocto so I bought the book Embedded Linux Projects Using Yocto Project Cookbook but it keeps failing to build the environment.
I've run only simple commands. I ran source oe-init-build-env <dir name> to make a directory and ran bitbake core-image-minimal.
But bitbake command keeps giving me errors like this. This is the log.
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100%
|#################################################################################| Time: 00:00:25Parsing of 891 .bb files complete (0 cached, 891 parsed). 1287 targets, 61 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-18.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "qemuarm"
DISTRO = "poky"
DISTRO_VERSION = "1.7.3"
TUNE_FEATURES = "arm armv5 thumb dsp"
TARGET_FPU = "soft"
meta
meta-yocto
meta-yocto-bsp = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL http://www.zlib.net/zlib-1.2.8.tar.xz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://www.multiprecision.org/mpc/download/mpc-1.0.2.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://ftp.gmplib.org/pub/gmp-6.0.0/gmp-6.0.0a.tar.bz2, attempting MIRRORS if available
WARNING: Failed to fetch URL http://ymorin.is-a-geek.org/download/kconfig-frontends/kconfig-frontends-3.12.0.0.tar.xz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://download.gna.org/cryptodev-linux/cryptodev-linux-1.6.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/bzip2-1.0.6.tar.gz to /opt/yocto/poky/qemuarm/downloads/bzip2-1.0.6.tar.gz_bad-checksum_2ae3e6c958d83d2855a37f13fe29fd95
WARNING: Failed to fetch URL http://gnome-build-stage-1.googlecode.com/files/uuid-1.6.2.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://rpm5.org/files/popt/popt-1.16.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/popt-1.16.tar.gz to /opt/yocto/poky/qemuarm/downloads/popt-1.16.tar.gz_bad-checksum_9e09d0bf772649c5ba385c48ba2d3547
WARNING: Failed to fetch URL http://zlib.net/pigz/pigz-2.3.1.tar.gz, attempting MIRRORS if available
WARNING: Checksum failure encountered with download of http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz - will attempt other sources if available
WARNING: Renaming /opt/yocto/poky/qemuarm/downloads/rpm-5.4.14-0.20131024.src.rpm to /opt/yocto/poky/qemuarm/downloads/rpm-5.4.14-0.20131024.src.rpm_bad-checksum_6a8d9bc6a7e0162d7ff72fefc9e841e5
WARNING: Failed to fetch URL http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://invisible-island.net/byacc/byacc-20140422.tgz, attempting MIRRORS if available
WARNING: Failed to fetch URL http://pkg-shadow.alioth.debian.org/releases/shadow-4.2.1.tar.xz, attempting MIRRORS if available
I checked the URLs in the log and it turned out they are all 404 pages. And most importantly, it terminates by showing this message.
ERROR: Error executing a python function in /opt/yocto/poky/meta/recipes-devtools/gcc/gcc-source_4.9.bb:
The stack trace of python calls that resulted in this exception/failure was:
File: 'do_preconfigure', lineno: 12, function: <module>
0008: cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/configure")
0009: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
0010:
0011:
*** 0012:do_preconfigure(d)
0013:
File: 'do_preconfigure', lineno: 5, function: do_preconfigure
0001:
0002:def do_preconfigure(d):
0003: import subprocess
0004: cmd = d.expand('PATH=/opt/yocto/poky/scripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/opt/yocto/poky/qemuarm/tmp/sysroots/qemuarm/usr/bin/crossscripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/bin:/opt/yocto/poky/scripts:/opt/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/kimth/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kimth/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/:/mnt/c/Users/kimth/AppData/Roaming/TinyTeX/bin/win32:/snap/bin cd /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1 && gnu-configize')
*** 0005: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
0006: # See 0044-gengtypes.patch, we need to regenerate this file
0007: bb.utils.remove(d.expand("/opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/gengtype-lex.c"))
0008: cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' /opt/yocto/poky/qemuarm/tmp/work-shared/gcc-4.9.1-r0/gcc-4.9.1/gcc/configure")
0009: subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
File: '/usr/lib/python2.7/subprocess.py', lineno: 223, function: check_output
0219: if retcode:
0220: cmd = kwargs.get("args")
0221: if cmd is None:
0222: cmd = popenargs[0]
*** 0223: raise CalledProcessError(retcode, cmd, output=output)
0224: return output
0225:
0226:
0227:def list2cmdline(seq):
Exception: CalledProcessError: Command 'PATH=/opt/yocto/poky/scripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi:/opt/yocto/poky/qemuarm/tmp/sysroots/qemuarm/usr/bin/crossscripts:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/usr/bin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/sbin:/opt/yocto/poky/qemuarm/tmp/sysroots/x86_64-linux/bin:/opt/yocto/poky/scripts:/opt/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/kimth/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kimth/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/:/mnt/c/Users/kimth/AppData/Roaming/TinyTeX/bin/win32:/snap/bin cd /opt/yocto/poky/qemuarm
I feel like I need to modify conf files to fetch available URLs but I'm new to Yocto and Bitbake so I'm very lost now. I would appreciate if anyone could tell me where to find solutions. Thank you and stay safe everyone.
You seem to use quite an old yocto version 1.7.3 while there is already 3.3 released. This means also you try to build recipes for some packages that are also old and hence some URLs might be unavailable. Might it be an option for you to use a newer version?
If this is no option for you, one thing to try would be setting MIRROR (see [1]) to a mirror [2] where those packages are still available. But this approach I would not prefer.
[1] https://www.yoctoproject.org/docs/1.7/bitbake-user-manual/bitbake-user-manual.html#var-MIRRORS
[2] could be: http://downloads.yoctoproject.org/mirror/sources/
1.7.3 is a very old release of the project, originally released in 2015 with a last point release in 2016. The fetcher warnings you see aren't the problem, they're warnings but it will fall back to the project mirrors. If it hadn't fallen back correctly, it would have shown errors as well as the warnings. The bigger problem is in fact this:
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Since Ubuntu 18.04 is three years newer than the project release you're using, there is no way it would be compatible with that release. You need to use a host OS from the era of the release, so Ubuntu 16.04 may work better. This is because the host OS provides gcc used to build the cross tools and the newer gcc versions don't tend to work with 100% of old code without tweaks.
So in short, use an older distro if you want to try and get that to build.

SWI-Prolog: No permission to load source when "Non-module file" already loaded into some module)

This error may be a duplicate of
SWI Prolog ensure_loaded error
Since that question is not fully answered, I decide to post mine here.
There are some dynamic loaded files using <name>:compile(Filename) clause, which I suspect could be a reason for the error.
➜ chill git:(master) ✗ swipl --traditional [18/06/20| 8:54AM]
Welcome to SWI-Prolog (threaded, 64 bits, version 7.6.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- expects_dialect(sicstus).
true.
?- consult('chill-test.pl').
true.
?- set_prolog_flag(double_quotes, chars).
true.
?- run_trials('orig-db', 'raw250-split1.pl', 'orig-db-evaluate', 25, 200, 'raw250-res1.out').
Reading Split File: raw250-split1.pl
Specializing with 25 top-level examples
Beginning Example Analysis
Attempting Example 1 ....
<omitted output>
BEGINING INDUCTION: 1 5
ERROR: No permission to load source `'/home/vimos/git/SP/mooney/chill/orig-db.i'' (Non-module file already loaded into module test; trying to load into thetheory)
ERROR: In:
ERROR: [36] throw(error(permission_error(load,source,'/home/vimos/git/SP/mooney/chill/orig-db.i'),context(...,'Non-module file already loaded into module test; trying to load into thetheory')))
ERROR: [34] '$assert_load_context_module'('/home/vimos/git/SP/mooney/chill/orig-db.i',thetheory,[expand(false),...]) at /usr/lib/swi-prolog/boot/init.pl:2439
ERROR: [33] '$mt_do_load'(<clause>(0x559a46329ea0),'orig-db.i','/home/vimos/git/SP/mooney/chill/orig-db.i',thetheory,[expand(false),...]) at /usr/lib/swi-prolog/boot/init.pl:2069
ERROR: [32] setup_call_catcher_cleanup(system:with_mutex('$load_file',...),system:'$mt_do_load'(<clause>(0x559a46329ea0),'orig-db.i','/home/vimos/git/SP/mooney/chill/orig-db.i',thetheory,...),_142002,system:'$mt_end_load'(<clause>(0x559a46329ea0))) at /usr/lib/swi-prolog/boot/init.pl:443
ERROR: [21] make_theory('orig-db.i',op/2,_142072) at /home/vimos/git/SP/mooney/chill/spchillin-nr.pl:966
ERROR: [20] top_induction('orig-db.i',[op(...,_142120)],[op(...,_142132),...|...],_142108) at /home/vimos/git/SP/mooney/chill/spchillin-nr.pl:129
ERROR: [19] chill_lib:cpu_time(user:top_induction('orig-db.i',...,...,_142186),_142170) at /home/vimos/git/SP/mooney/chill/chill_lib.pl:136
ERROR: [18] induce_control_definition('orig-db.i',[op(...,_142230)],[op(...,_142242),...|...],_142216,_142218) at /home/vimos/git/SP/mooney/chill/chill.pl:109
ERROR: [17] add_each_optimization(cxit([...|...]),'orig-db.i',fail,[(... :- ...),...],[],_142282,_142284) at /home/vimos/git/SP/mooney/chill/chill.pl:85
ERROR: [14] add_rules_for_targets([tr(...,function,fail)],'orig-db.i',[... - ...,...|...],[],[],_142346,_142348) at /home/vimos/git/SP/mooney/chill/chill.pl:79
ERROR: [12] chill_lib:cpu_time(user:create_optimized_rules(...,'orig-db.i',_142426,_142428),_142412) at /home/vimos/git/SP/mooney/chill/chill_lib.pl:136
ERROR: [11] chill_specialize('orig-db','<garbage_collected>','orig-db.i','orig-db-opt.pl') at /home/vimos/git/SP/mooney/chill/chill.pl:11
ERROR: [9] run_trials_loop(25,'orig-db',225,200,[[...],...|...],[ti(...,...,...),...|...],'raw250-res1.out') at /home/vimos/git/SP/mooney/chill/chill-test.pl:188
ERROR: [7] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
^ Exception: (32) setup_call_catcher_cleanup(system:with_mutex('$load_file', '$mt_start_load'('/home/vimos/git/SP/mooney/chill/orig-db.i', <clause>(0x559a46329ea0), [expand(false), expand(true)])), system:'$mt_do_load'(<clause>(0x559a46329ea0), 'orig-db.i', '/home/vimos/git/SP/mooney/chill/orig-db.i', thetheory, [expand(false), expand(true)]), _142584, system:'$mt_end_load'(<clause>(0x559a46329ea0))) ? creep
^ Call: (34) call(system:'$mt_end_load'(<clause>(0x559a46329ea0))) ? creep
^ Exit: (34) call(system:'$mt_end_load'(<clause>(0x559a46329ea0))) ? creep
There are two dynamic compiled modules test and thetheory. They are both compiled from the same file orig-db.i.
If I force one of them to read from a different file like orig-db.ii, the error will be different.
I tried the same code with yap, it didn't complain with this error.
➜ chill git:(master) ✗ yap [18/06/20| 9:21AM]
% Restoring file /usr/lib/Yap/startup.yss
YAP 6.2.2 (x86_64-linux): Sat Sep 17 13:59:03 UTC 2016
?- consult('chill-test.pl').
yes
?- run_trials('orig-db', 'raw250-split1.pl', 'orig-db-evaluate', 25, 200, 'raw250-res1.out').
<omitted output>
BEGINING INDUCTION: 1 5
% reconsulting /home/vimos/git/SP/mooney/chill/orig-db.i...
% reconsulted /home/vimos/git/SP/mooney/chill/orig-db.i in module thetheory, 0 msec 1344 bytes
Induction Time: 0.00
op(ps([traverse(pvar(1),freevar):[],const(pvar(1),riverid(mississippi)):[mississippi],answer(pvar(0),state(pvar(0))):[which,through]],[run,?]),G9) :-
db_lib:coref_vars(traverse,2,2,answer,2,1,ps([traverse(pvar(1),freevar):[],const(pvar(1),riverid(mississippi)):[mississippi],answer(pvar(0),state(pvar(0))):[which,through]],[run,?]),G9).
op(A,B) :-
introduce(density(_,_),[density],A,B).
op(A,B) :-
db_lib:coref_vars(density,2,1,state,1,1,A,B).
op(A,B) :-
db_lib:coref_vars(density,2,2,smallest,2,1,A,B).
op(A,B) :-
db_lib:lift_conj(state,1,smallest,2,2,A,B).
op(A,B) :-
db_lib:drop_conj(density,2,smallest,2,2,A,B).
Replacing ensure_loaded to reconsult does not solve the error in Swi-Prolog.
I need some hint to understand this error, is this an implementation issue of Swi-Prolog?
If you want to try it, the code can be found from the ftp url below.
Thank you for the help!
I am trying to migrate an earlier code to SWI-Prolog, which was written in
SICStus 3 #3: Thu Sep 12 09:54:27 CDT 1996 or earlier
by Raymond J. Mooney ftp://ftp.cs.utexas.edu/pub/mooney/chill/.
All the questions with this tag are all related to this task. I'm new to prolog, helps and suggestions are welcomed!
This is a documented, current limitation of SWI-Prolog, related to its make mechanism. A possible workaround is to duplicate the orig-db.i file. This way the two modules, test and thetheory, will be loading different files.

Julia Error Building Mongo.jl Package on Windows 10

I installed Julia v0.6.2 on Windows 10.
Every other package was installed without a problem, but Mongo.jl give me this error while building it.
Pkg.build("Mongo")
INFO: Building LibBSON
===============================[ ERROR: LibBSON ]===============================
LoadError: None of the selected providers can install dependency libbson.
Use BinDeps.debug(package_name) to see available providers
while loading C:\Users\"user"\.julia\v0.6\LibBSON\deps\build.jl, in expression starting on line 27
================================================================================
INFO: Building Mongo
================================[ ERROR: Mongo ]================================
LoadError: None of the selected providers can install dependency libmongoc.
Use BinDeps.debug(package_name) to see available providers
while loading C:\Users\"user"\.julia\v0.6\Mongo\deps\build.jl, in expression starting on line 26
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: LibBSON and Mongo had build errors.
- packages with build errors remain installed in C:\Users\ciko9\.julia\v0.6
- build the package(s) and all dependencies with Pkg.build("LibBSON", "Mongo")
- build a single package by running its deps/build.jl script
================================================================================
I already opened an issue on github, but I'd like to fix it asap. Any idea on how to solve this problem?
The solution is first to install manually the mongo c drivers.
Second, to copy the mongo-c-drivers folder to the mongo e libbson folder inside julia, then make a new file deps.jl for each package and write this:
# Macro to load a library
macro checked_lib(libname, path)
((VERSION >= v"0.4.0-dev+3844" ? Base.Libdl.dlopen_e : Base.dlopen_e)(path) == C_NULL) && error("Unable to load \n\n$libname ($path)\n\nPlease re-run Pkg.build(package), and restart Julia.")
quote const $(esc(libname)) = $path end
end
# Load dependencies
#checked_lib libbson "C:\\Users\\"userName"\\.julia\\v0.6\\LibBSON\\mongo-c-driver\\bin\\libbson-1.0.dll"
# Load-hooks

Can't build rebar on Windows7

I am trying to build this (https://github.com/dch/rebar/) rebar.
C:\Projects\rebar>bootstrap
Recompile: src/rebar_core
==> rebar (compile)
Uncaught error in rebar_core: {'EXIT',
{badarg,
[{re,split,
[[85,83,69,82,68,79,77,65,73,78,61,65,108,
101,120,45,1055,1050],
"=",
[{return,list},{parts,2}]],
[{file,"re.erl"},{line,154}]},
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
1,
[{file,"src/rebar_port_compiler.erl"},
{line,371}]},
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
1,
[{file,"src/rebar_port_compiler.erl"},
{line,372}]},
{rebar_port_compiler,os_env,0,
[{file,"src/rebar_port_compiler.erl"},
{line,371}]},
{rebar_port_compiler,setup_env,1,
[{file,"src/rebar_port_compiler.erl"},
{line,150}]},
{rebar_core,'-setup_envs/2-lc$^0/1-0-',2,
[{file,"src/rebar_core.erl"},{line,364}]},
{rebar_core,'-setup_envs/2-lc$^0/1-0-',2,
[{file,"src/rebar_core.erl"},{line,365}]},
{rebar_core,setup_envs,2,
[{file,"src/rebar_core.erl"},{line,364}]}]}}
I have not the same version of erlang as you (line 154 of re.erl is not the split function) so I cannot finish the analysis. But you can try to understand from where come these weird characters [1055,1050] at the end of the answer from windows to the function os:getenv(). It seems it crash the re:split.

Resources