Maxima for Windoows is compiled with SBCL but somehow is missing ASDF3 support. Here is the output of *FEATURES* from Maxima:
(QUICKLISP ASDF2 ASDF ASDF-UNICODE CL MK-DEFSYSTEM CLTL2 64-BIT
64-BIT-REGISTERS ALIEN-CALLBACKS ANSI-CL ASH-RIGHT-VOPS
C-STACK-IS-CONTROL-STACK COMMON-LISP COMPARE-AND-SWAP-VOPS COMPLEX-FLOAT-VOPS
CYCLE-COUNTER FLOAT-EQL-VOPS FP-AND-PC-STANDARD-SAVE GENCGC
IEEE-FLOATING-POINT INLINE-CONSTANTS INTEGER-EQL-VOP LINKAGE-TABLE
LITTLE-ENDIAN MEMORY-BARRIER-VOPS MULTIPLY-HIGH-VOPS OS-PROVIDES-DLOPEN
OS-PROVIDES-PUTWC PACKAGE-LOCAL-NICKNAMES PRECISE-ARG-COUNT-ERROR
RAW-INSTANCE-INIT-VOPS RAW-SIGNED-WORD SB-DOC SB-DYNAMIC-CORE SB-EVAL SB-FUTEX
SB-LDB SB-PACKAGE-LOCKS SB-QSHOW SB-SAFEPOINT SB-SAFEPOINT-STRICTLY
SB-SIMD-PACK SB-SOURCE-LOCATIONS SB-THREAD SB-THRUPTION SB-UNICODE SB-WTIMER
SBCL STACK-ALLOCATABLE-CLOSURES STACK-ALLOCATABLE-FIXED-OBJECTS
STACK-ALLOCATABLE-LISTS STACK-ALLOCATABLE-VECTORS
STACK-GROWS-DOWNWARD-NOT-UPWARD SYMBOL-INFO-VOPS UNBIND-N-VOP
UNDEFINED-FUN-RESTARTS UNWIND-TO-FRAME-AND-CALL-VOP WIN32 X86-64)
It must have picked-up QUICKLISP from my .sbclrc file and it actually can load some systems, like ALEXANDRIA. However, it fails to load the systems that involve more complex compilation, like LAPACK, MINPACK or ODEPACK. For example,
MAXIMA> (ql:quickload :uiop)
To load "uiop":
Load 1 ASDF system:
uiop
; Loading "uiop"
(:UIOP)
MAXIMA> (ql:quickload :lapack)
While evaluating the form starting at line 5, column 0
of #P"C:/Users/alexe_000/quicklisp/dists/quicklisp/software/f2cl-20170403-git/packages/lapack.asd":
Maxima encountered a Lisp error:
Error while trying to load definition for system lapack from pathname
C:/Users/alexe_000/quicklisp/dists/quicklisp/software/f2cl-20170403-git/packages/lapack.asd:
The name "F2CL-ASDF" does not designate any package.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
MAXIMA> (ql:quickload :f2cl-asdf)
To load "f2cl-asdf":
Load 1 ASDF system:
f2cl-asdf
; Loading "f2cl-asdf"
[package f2cl-asdf]
Maxima encountered a Lisp error:
The name "ASDF/COMPONENT" does not designate any package.
Comparing with features with my local SBCL installation, I tracked the problem down to ASDF3 being available on my SBCL, but not Maxima's.
I have managed to compile Maxima from sources on Linux and it works fine there. The compilation procedure on Windows is rather complicated and I would prefer to avoid it if I can. So, is there a way to make ASDF3 available somehow?
Related
I really hope that someone could help me out with my problem.
I want to start an exe File (VSeeFace - see https://www.vseeface.icu for more information) on my Mac with wineskin. VseeFace is an application for Vtubing.
The application starts normally via Wineskin, but as soon as I try to open my avatar (a .vrm file), the software stops and I don't know why. I have searched everywhere and found nothing about my problem, but perhaps that is also due to my limited knowledge of development skills.
Can anyone help me please?
My Mac:
MacOS Monterey Version 12.4
Radeon Pro 575X 4 GB
My Wineskin Setup:
Wrapper Version Wineskin 2.9.1.5
Engine WS11WineCX64Bit22.0.1-1
Config Utility - Windows-Version 8
VseeFace Software – https://www.vseeface.icu/#download
They also describe how it will work on Linux or maybe Mac,
https://www.vseeface.icu/#running-on-linux-and-maybe-mac
For the Facetracking I run OpenSeeFace (but that seemed to work, I could see the green light of the iMac camera, but I couldn't test it because of my software problem).
I mean I could run the application but on the most important Screen it stops working.
In the debug.log file I noticed the following messages:
0024:err:shell:HCR_GetFolderAttributes should be called for simple PIDL's only!
0024:fixme:exec:SHELL_execute flags ignored: 0x0000000c
0118:err:module:import_dll Library dsound.dll (which is needed by L"C:\windows\system32\devenum.dll") not found
0118:trace:loaddll:build_module Loaded L"C:\windows\system32\msdmo.dll" at 000000034ABC0000: builtin
0118:err:ole:apartment_add_dll couldn't load in-process dll L"C:\windows\system32\devenum.dll"
0118:err:ole:com_get_class_object no class object {62be5d10-60eb-11d0-bd3b-00a0c911ce86} could be created for context 0x1
0118:err:module:import_dll Library dsound.dll (which is needed by L"C:\windows\system32\devenum.dll") not found
0118:err:ole:apartment_add_dll couldn't load in-process dll L"C:\windows\system32\devenum.dll"
0118:err:ole:com_get_class_object no class object {62be5d10-60eb-11d0-bd3b-00a0c911ce86} could be created for context 0x1
0118:err:ole:apartment_add_dll couldn't find function DllGetClassObject in L"C:\windows\system32\devenum.dll"
0118:err:ole:com_get_class_object no class object {62be5d10-60eb-11d0-bd3b-00a0c911ce86} could be created for context 0x1
0118:err:ole:com_get_class_object no class object {62be5d10-60eb-11d0-bd3b-00a0c911ce86} could be created for context 0x1
0118:trace:loaddll:build_module Loaded L"C:\windows\system32\Avrt.dll" at 00000002F2930000: builtin
0118:trace:loaddll:build_module Loaded L"C:\VSeeFace\VSeeFace_Data\Plugins\x86_64\LeapCV4.dll" at 000000010A220000: native
0118:trace:loaddll:build_module Loaded L"C:\windows\system32\VCRUNTIME140_1.dll" at 00000002F7F20000: builtin
0118:err:module:import_dll Loading library MSVCP140_2.dll (which is needed by L"C:\VSeeFace\VSeeFace_Data\Plugins\x86_64\LeapCV5.dll") failed (error c000007b).
0118:trace:loaddll:build_module Loaded L"C:\VSeeFace\VSeeFace_Data\Plugins\x86_64\CONCRT140.dll" at 0000000104CA0000: native
0118:err:module:import_dll Loading library MSVCP140_2.dll (which is needed by L"C:\VSeeFace\VSeeFace_Data\Plugins\x86_64\LeapCV5.dll") failed (error c000007b).
[mvk-info] Created 2 swapchain images with initial size (1280, 720) and contents scale 1.0 for screen Integriertes Retina-Display.
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 2):
Vertex attribute v4(4) of type int4 cannot be read using MTLAttributeFormatUInt4.
0118:trace:loaddll:build_module Loaded L"C:\VSeeFace\UnityPlayer.dll" at 0000000180000000: native
0118:fixme:thread:get_thread_times not implemented on this platform
0118:trace:loaddll:build_module Loaded L"C:\windows\system32\mmdevapi.dll" at 0000000336850000: builtin
0118:trace:loaddll:build_module Loaded L"C:\windows\system32\winecoreaudio.drv" at 00000001C92D0000: builtin
0118:fixme:coreaudio:ca_channel_layout_to_channel_mask Unhandled channel 0xffffffff
0
01b0:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000000066D6FE10
01b0:trace:loaddll:build_module Loaded L"C:\windows\system32\avrt.dll" at 00000002F2930000: builtin
01b0:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",0000000066D6FDB8): stub
01b0:trace:loaddll:free_modref Unloaded module L"C:\windows\system32\avrt.dll" : builtin
***If needed I could post the complete log file. ***
I have installed the dlls and they are in all the folders. I have also tried the installation via Winetricks, where it displays the following message:
Executing mkdir -p /Applications/Wineskin/VSeeFace.app/Contents/SharedSupport
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
Using winetricks 20220411-next - sha256sum: 846f79cac49697fd818f06a6aebf36ca408661f89b97633e9872025b33bc0e7b with wine-7.7 (WineskinCX 22.0.1) and WINEARCH=win64
Unknown arg UnityPlayer.dll
Usage: Applications/Wineskin/VSeeFace.app/Wineskin.app/Contents/Resources/winetricks [options] [command|verb|path-to-verb] ...
Executes given verbs. Each verb installs an application or changes a setting.
Options:
--country=CC Set country code to CC and don't detect your IP address
-f, --force Don't check whether packages were already installed
--gui Show gui diagnostics even when driven by commandline
--gui=OPT Set OPT to kdialog or zenity to override GUI engine
--isolate Install each app or game in its own bottle (WINEPREFIX)
--self-update Update this application to the last version
--update-rollback Rollback the last self update
-k, --keep_isos Cache isos (allows later installation without disc)
--no-clean Don't delete temp directories (useful during debugging)
-q, --unattended Don't ask any questions, just install automatically
-r, --ddrescue Retry hard when caching scratched discs
-t --torify Run downloads under torify, if available
--verify Run (automated) GUI tests for verbs, if available
-v, --verbose Echo all commands as they are executed
-h, --help Display this message and exit
-V, --version Display version and exit
Commands:
list list categories
list-all list all categories and their verbs
apps list list verbs in category 'applications'
benchmarks list list verbs in category 'benchmarks'
dlls list list verbs in category 'dlls'
fonts list list verbs in category 'fonts'
games list list verbs in category 'games'
settings list list verbs in category 'settings'
list-cached list cached-and-ready-to-install verbs
list-download list verbs which download automatically
list-manual-download list verbs which download with some help from the user
list-installed list already-installed verbs
arch=32|64 create wineprefix with 32 or 64 bit, this option must be
given before prefix=foobar and will not work in case of
the default wineprefix.
prefix=foobar select WINEPREFIX=/Users/myusername/.local/share/wineprefixes/foobar
annihilate Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX
Winetricks Commands Finished!!
I am trying to get Common Lisp running on my Windows 10 machine and I have run into a problem with getting ASDF/(ql:quickload "...") to load a project. I generated the given project with the following command (after creating a C:\Users\ig88t\src\lisp folder):
(ql:quickload "quickproject")
(quickproject:make-project "~/src/lisp/swatchblade/" :depends-on '(vecto hunchentoot))
Which correctly generates the project and I can view the source at ~/src/lisp/swatchblade.
But I am unable to load it via
(ql:quickload "swatchblade")
Instead of loading, I get an error saying
System "swatchblade" not found [Condition of type
QUICKLISP-CLIENT:SYSTEM-NOT-FOUND]
I am going by two manuals, one that Xach wrote and another tailored for Windows. Xach recommends ~/.config/common-lisp/source-registry.conf.d/projects.conf whereas the second recommends ~/.config/common-lisp/source-registry.conf.d/asdf.conf. I am currently using the version Xach wrote as it has worked for me on Linux.
Going by the manual for ASDF it seems that ~/AppData/Local/ is where I should store .config/common-lisp/source-registry.conf.d/projects.conf. I have tried storing it at ~/AppData/Local/config/... as well as ~/AppData/Local/.config/... to no avail. I noticed that Clozure CL installs some quicklisp data in ~/AppData/Local/common-lisp, so I tried putting the source-registry.conf.d folder there as in ~/AppData/Local/common-lisp/source-registry.conf.d/projects.conf as well but it didn't work.
I have tried a lot of different variations of placing the folder in different places but I have not managed to figure out the right one. I would really appreciate any help/suggestions by anyone using Common Lisp and Quicklisp on Windows.
I am using Clozure CL, 1.11.5, and the wx86cl64 binary which comes with ASDF version 3.1.5 in case that matters.
--- edit ---
After talking with Xach about this issue, I tried:
(quickproject:make-project "~/quicklisp/local-projects/swatch"
:depends-on '(vecto hunchentoot))
and then ran:
(ql:register-local-projects)
but upon running:
(ql:quickload "swatch")
it failed yet again with:
System "swatch" not found [Condition of type
QUICKLISP-CLIENT:SYSTEM-NOT-FOUND]
He said it might be related to this PR for quickproject.
--- edit #2 ---
I recently tried using SBCL and things seemed to be working. I could create projects using quickproject and load them. Note that I am unable to load projects created with quickproject under CCL. However, when I restart slime/emacs, I am unable to load any projects previously created under SBCL.
; SLIME 2.20
CL-USER> (ql:quickload "quickproject")
To load "quickproject":
Load 1 ASDF system:
quickproject
; Loading "quickproject"
("quickproject")
CL-USER> (quickproject:make-project "~/quicklisp/local-projects/test/"
:depends-on '(vecto))
"test"
CL-USER> (ql:quickload "test")
To load "test":
Load 1 ASDF system:
test
; Loading "test"
[package test]
("test")
CL-USER>
--- intermission... restarting slime ---
; SLIME 2.20
CL-USER> (ql:quickload "test")
; Evaluation aborted on #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {10034555B3}>.
CL-USER>
So I have no clue what could be causing the issue or how to resolve it, but it appears that creating/loading projects never works under Clozure CL and to works only within the current session in SBCL.
--- edit #3 ---
It seems I was wrong about SBCL. It seems that when I run
(quickproject:make-project "~/quicklisp/local-projects/test/"
:depends-on '(vecto))
It creates a folder in C:\Users\ig88t\AppData\Roaming\quicklisp\local-projects and not in C:\Users\ig88t\quicklisp\local-projects. It can load projects created within the current session as I said earlier, but is unable to find them in a new session.
(asdf::user-source-registry :direction :output)
How do I build a standalone executable in SBCL? I've tried
; SLIME 2.20
CL-USER> (defun hullo ()
(format t "hullo"))
HULLO
CL-USER> (sb-ext:save-lisp-and-die "hullo" :toplevel #'hullo :executable t)
but that just produces the following error.
Cannot save core with multiple threads running.
Interactive thread (of current session):
#<THREAD "main thread" RUNNING {10019563F3}>
Other threads:
#<THREAD "Swank Sentinel" RUNNING {100329E073}>,
#<THREAD "control-thread" RUNNING {1003423A13}>,
#<THREAD "reader-thread" RUNNING {1003428043}>,
#<THREAD "swank-indentation-cache-thread" RUNNING
{1003428153}>,
#<THREAD "auto-flush-thread" RUNNING {1004047DA3}>,
#<THREAD "repl-thread" RUNNING {1004047FA3}>
[Condition of type SB-IMPL::SAVE-WITH-MULTIPLE-THREADS-ERROR]
What am I doing wrong?
What you are doing wrong is trying to save an image while multiple threads are running. Unlike many errors in Lisp the error message explains exactly what the problem is.
If you look up the function in the sbcl manual here then you find that indeed one may not save an image with multiple threads running. The extra threads come from swank (the CL half of SLIME). The manual says that you may add functions to *save-hooks* which destroy excess threads and functions to *init-hooks* to restore threads.
One way around all this is to not save the image when it is running through slime but instead to start sbcl directly at a terminal (note: no readline support), load your program and save from there.
Working with slime is different. In theory there is a SWANK-BACKEND:SAVE-IMAGE function but I’m not sure if that works. Also as saving an image kills the process you may want to fork (SB-POSIX:FORK) first, unless you are on Windows. But forking causes problems due to not being well specified and file descriptor issues (i.e. if you try fork->close swank connection->save and die then you may find that the connection in the parent process is closed (or worse, corrupted by appearing open but being closed at some lower level)). One can read about such things online. Note that due to the way sbcl threads are implemented, forking clones only the thread that forks and the other threads are not cloned. Thus forking and then saving should work but may cause problems when running the executable due to partial slime state.
You may be interested in buildapp.
If you want to be able to use slime with your saved application you can load swank and start listening on a socket or port (maybe with some command line argument) and then in Emacs you may connect to that swank backend with slime.
You have to run save-lisp-and-die from a new sbcl, not from Slime. Dan Robertson explains more.
It is cumbersome the first time, but you can put it in a Makefile and re-use it. Don't forget to load your dependencies.
build:
sbcl --load cl-torrents.asd \
--eval '(ql:quickload :torrents)' \
--eval '(use-package :torrents)' \ # not mandatory
--eval "(sb-ext:save-lisp-and-die #p\"torrents\" :toplevel #'main :executable t)"
The quickload implies Quicklisp is already loaded, which may be the case if you installed Quicklisp on your machine, because then your ~/.sbclr contains quicklisp loading script ((load quicklisp-init)).
However sb-ext is not portable across implementations. asdf:make is the cross-platform equivalent. Add this in your .asd system definition:
:build-operation "program-op" ;; leave as is
:build-pathname "<binary-name>"
:entry-point "<my-package:main-function>"
and then call asdf:make to build the executable.
You can have a look at buildapp (mentioned above), a still popular app to do just that, for SBCL and CCL. It is in Debian. http://lisp-lang.org/wiki/article/buildapp An example usage looks like
buildapp --output myapp \
--asdf-path . \
--asdf-tree ~/quicklisp/dists \
--load-system my-app \
--entry my-app:main
But see also Roswell, a more general purpose tool, also supposed to build executables, but it is less documented. https://roswell.github.io/
If you want to build an executable on a CI system (like Gitlab CI), you may appreciate a lisp Docker image which has already SBCL, others lisps and Quicklisp installed, and if you want to parse command line arguments, see https://lispcookbook.github.io/cl-cookbook/testing.html#gitlab-ci and (my) tutorial: https://vindarel.github.io/cl-torrents/tutorial.html#org8567d07
I've installed GnuCOBOL 2.2 on my Ubuntu 17.04 system. I've written a basic hello world program to test the compiler.
1 IDENTIFICATION DIVISION.
2 PROGRAM-ID. HELLO-WORLD.
3 *---------------------------
4 DATA DIVISION.
5 *---------------------------
6 PROCEDURE DIVISION.
7 DISPLAY 'Hello, world!'.
8 STOP RUN.
This program is entitled HelloWorld.cbl. When I compile the program with the command
cobc HelloWorld.cbl
HelloWorld.so is produced. When I attempt to run the compiled program using
cobcrun HelloWorld
I receive the following error:
libcob: entry point 'HelloWorld' not found
Can anyone explain to me what an entry point is in GnuCOBOL, and perhaps suggest a way to fix the problem and successfully execute this COBOL program?
According to the official manual of GNUCOBOL, you should compile your code with:
cobc -x HelloWorld.cbl
then run it with
./HelloWorld
You can also read GNUCOBOL wiki page which contains some exmaples for further information.
P.S. As Simon Sobisch said, If you change your file name to HELLO-WORLD.cbl to match the program ID, the same commands that you have used will be ok:
cobc HELLO-WORLD.cbl
cobcrun HELLO-WORLD
Can anyone explain to me what an entry point is in GnuCOBOL, and perhaps suggest a way to fix the problem and successfully execute this COBOL program?
An entry point is a point where you may enter a shared object (this is actually more C then COBOL).
GnuCOBOL generates entry points for each PROGRAM-ID, FUNCTION-ID and ENTRY. Therefore your entry point is HELLO-WORLD (which likely gets a conversion as - is no valid identifier in ANSI C - you won't have to think about this when CALLing a program as the conversion will be done internal).
Using cobcrun internally does:
search for a shared object (in your case HelloWord), as this is found (because you've generated it) it will be loaded
search for an entry point in all loaded modules - which isn't found
There are three possible options to get this working:
As mentioned in Ho1's answer: use cobc -x, the reason that this works is because you don't generate a shared object at all but a C main which is called directly (= the entry point doesn't apply at all)
preload the shared object and calling the program by its PROGRAM-ID (entry point), either manually with COB_PRE_LOAD=HelloWorld cobcrun HELLO-WORLD or through cobcrun (option available since GnuCOBOL 2.x) cobcrun -M HelloWorld HELLO-WORLD
change the PROGRAM-ID to match the source name (either rename or change the source, I'd do the second: PROGRAM-ID. HelloWorld.)
I spent the afternoon trying to get the ritz-swank package to work with emacs and Clojure. (Googling the error message and much more gave no useful leads.) I hope somebody can give me some pointers that'll get me up and running.
The error is Symbol's value as variable is void: slime-ritz.
According to http://www.delorie.com/gnu/docs/elisp-manual-21/elisp_142.html:
"If you have never given a symbol any value as a global variable, we say that that symbol's global value is void. In other words, the symbol's value cell does not have any Lisp object in it. If you try to evaluate the symbol, you get a void-variable error rather than a value.... A void variable does not have any value."
I tried to find the value of slime-ritz, using Emacs 'describe-variable' (C-h v), but it didn't return anything. Doing an appropos search on "ritz" turned up nothing, but searching for "slime" returned bunches of functions (so I assume that the slime package is present).
My installation procedure
I followed the instructions in the Install section of https://github.com/pallet/ritz/tree/develop/swank (the pallet/ritz project page), starting from scratch twice to make sure I was doing things right. Here is the sequence of my last attempt:
Began with a system containing neither Emacs nor a ~/.emacs.d directory.
Installed Emacs 24.2, the latest available Mac OS X version (from http://emacsformacosx.com/)
Installed Emacs Prelude through a curl command (see http://batsov.com/prelude/)
Downloaded (as the project page said to) specific versions of slime and slime-ritz
Installed both of them manually using M-x package-install-file
Exited and relaunched emacs, just in case....
Installed lein-ritz as per the page's instructions and successfully got:
Greggs-Mac-Pro:combolock gr$ lein ritz
user=> Swank server listening on local port 51521
M-x slime-connect (which is supposed to make the connection from Emacs to the Swank server) returned the error Symbol's value as variable is void: slime-ritz in the Emacs minibuffer.
Diagnostic data
Running M-x package-activated-list produced the following list of loaded packages:
(ace-jump-mode ack-and-a-half elisp-slime-nav exec-path-from-shell expand-region flycheck gist gh guru-mode helm-projectile helm logito magithub magit melpa paredit pcache projectile dash rainbow-delimiters rainbow-mode s slime slime-ritz solarized-theme undo-tree volatile-highlights yasnippet zenburn-theme)
Running M-x package-list-packages listed the following packages as installed:
ace-jump-mode 20121104....
ack-and-a-half 20130204....
dash 20130223....
elisp-slime-nav 20130127....
exec-path-from-... 20121108.945
expand-region 20130223....
flycheck 20130223....
gh 20121231.208
gist 20121231.212
guru-mode 20121016....
helm 20130223....
helm-projectile 20130131....
logito 20120225....
magit 20130222....
magithub 20121130....
melpa 20120202....
paredit 20110508....
pcache 20120408....
projectile 20130220....
rainbow-delimiters 20120428.45
rainbow-mode 0.6
s 20130216....
slime 20101113.1 <-- manually installed, from sources
slime-ritz 0.6.0 <-- specified by pallet/ritz page
solarized-theme 20130215....
undo-tree 20130119.926
volatile-highli... 20120215.9
yasnippet 20130218....
zenburn-theme 20130215....
I noticed that clojure-mode wasn't present, so I added that, but step 8, above, gave the same error message.
Some shot-in-the-dark questions
1) Do I need to install pallet?
2) Do I need to install any other package from the ritz family (https://github.com/pallet/ritz)?
I'm really looking forward to using ritz-swank--it looks really powerful! (Thanks to Hugo Duncan for all the hard work!)
Emacs Predule ships nrepl.el instead of swank-clojure. You need to install nrepl-ritz instead of swank-ritz. Swank-clojure is a dead project, that's no longer supported in clojure-mode 2.0.0 (the one that comes with Predule).