I wonder if anyone has got a recent version of Maple running in a TeXmacs session?
I’m running Maple 2024 on an iMac-M3 under macOS 14.5 having the latest MacPorts libraries and compilers installed. This is what I’ve done and figured out sofar:
- I’ve created the soft link
sudo ln -sf /Library/Frameworks/Maple.framework/Versions/Current/bin/maple /usr/local/bin/maple
so that maple is in the path. Note that maple is a shell script that reads in $MAPLE/bin/maple.system.type
, and on my system, sets $SYS_TYPE
to bin.APPLE_ARM64_MACOS
. This implies that the maple cli is the ARM binary.
-
Next, I copied Joris’ maple plugin that ships with latest TeXmacs-2.1.4.m1.signed.dgm as of 2024/05/03 to
$HOME/.TeXmacs/plugins/maple
. -
Then I edited the make-file Makefile.9:
a) uncommenting thePATH
settings in lines 13-15, and
b) adjustingMAPLE_LDFLAGS
to fit my system type,bin.APPLE_ARM64_MACOS
-
Running
make -f Makefile all
ended with
make: Nothing to be done for ‘all’,
as there is already a (pre)compiled binary tm_maple_5 in $HOME/.TeXmacs/plugins/maple/bin/
. Note, I later on compiled tm_maple_5 for my computer. Yet this did non have a positive impact on the steps carried out below.
- Finally I ran
make -f Makefile.9 all
receiving 6 error messages (see file below). As a result of this run
-
a shell script tm_maple_9.sh is created in $HOME/.TeXmacs/bin, which is basically identical to the maple shellscript in /Library/Frameworks/Maple.framework/Versions/Current/bin/maple except for the end where it wants to read in the binary tm_maple_9,
-
however that binary is not created during the compile run.
-
Subsequently, trying to launch a maple session results in a freeze.
As I’m not a C programmer, the error messages below are all Greek to me. Does anyone know
→ what they exactly mean?
→ how they can be fixed?
→ have an idea how to get the plugin going, i.e., get tm_maple_9 compiled?
Any help and suggestions appreciated.
Cheers, Tilda
Error messages produced by running make:
make -f Makefile.9 all
cat /Library/Frameworks/Maple.framework/Versions/2024/bin/maple | sed 's%${MAPLE}/$MAPLE_SYS_BIN/cmaple%${HOME}/.TeXmacs/bin/tm_maple_9%' | sed 's%${MAPLE}/$MAPLE_SYS_BIN/maplew%${HOME}/.TeXmacs/bin/tm_maple_9%' > /Users/tilda/.TeXmacs/bin/tm_maple_9.sh
chmod a+x /Users/tilda/.TeXmacs/bin/tm_maple_9.sh
gcc -L/Library/Frameworks/Maple.framework/Versions/2024/bin.APPLE_ARM64_MACOS -Wl,-rpath,/Library/Frameworks/Maple.framework/Versions/2024/bin.APPLE_ARM64_MACOS -lmaplec -I/Library/Frameworks/Maple.framework/Versions/2024/extern/include src.9/tm_maple_9.c -o /Users/tilda/.TeXmacs/bin/tm_maple_9
src.9/tm_maple_9.c:115:31: error: incompatible function pointer types initializing ‘void ()(void *, int, const char *)’ with an expression of type ‘void (void *, int, char *)’ [-Wincompatible-function-pointer-types]
MCallBackVectorDesc cb = { textCallBack,
^~~~~~~~~~~~
src.9/tm_maple_9.c:116:10: error: incompatible function pointer types initializing 'void ()(void *, intptr_t, const char )’ (aka 'void ()(void *, long, const char *)’) with an expression of type ‘void (void *, intptr_t, char *)’ (aka ‘void (void *, long, char *)’) [-Wincompatible-function-pointer-types]
errorCallBack,
^~~~~~~~~~~~~
src.9/tm_maple_9.c:144:3: error: call to undeclared library function ‘strcpy’ with type ‘char *(char *, const char *)’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
strcpy (init, “read (‘”);
^
src.9/tm_maple_9.c:144:3: note: include the header <string.h> or explicitly provide a declaration for ‘strcpy’
src.9/tm_maple_9.c:145:3: error: call to undeclared library function ‘strcat’ with type ‘char *(char *, const char *)’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
strcat (init, tm_path);
^
src.9/tm_maple_9.c:145:3: note: include the header <string.h> or explicitly provide a declaration for ‘strcat’
src.9/tm_maple_9.c:160:15: error: call to undeclared library function ‘strlen’ with type ‘unsigned long (const char *)’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
while (in[strlen(in)-1] == ‘;’) in[strlen(in)-1]= ‘\0’;
^
src.9/tm_maple_9.c:160:15: note: include the header <string.h> or explicitly provide a declaration for ‘strlen’
src.9/tm_maple_9.c:161:9: error: call to undeclared library function ‘strncmp’ with type ‘int (const char *, const char *, unsigned long)’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (strncmp (in, “quit”, 4) == 0) break;
^
src.9/tm_maple_9.c:161:9: note: include the header <string.h> or explicitly provide a declaration for ‘strncmp’
6 errors generated.
make: *** [/Users/tilda/.TeXmacs/bin/tm_maple_9] Error 1