Last active
April 10, 2023 19:35
-
-
Save xrq-phys/129558c2abf20c828b8123244566d43f to your computer and use it in GitHub Desktop.
Compile Wolfram Engine Backend for TeXmacs on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Installation location of the Wolfram Engine | |
WOLFRAMROOT=/usr/local/Wolfram/WolframEngine/12.1 | |
# 2. MathLink path. Consider saving it for reasons in 4. | |
MLINKROOT=$WOLFRAMROOT/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions | |
# 3. Compile | |
gcc -m64 -o ~/.TeXmacs/bin/tm_mathematica.bin \ | |
/usr/share/TeXmacs/plugins/mathematica/src.lazy/tm_mathematica.c \ | |
-I $MLINKROOT -L $MLINKROOT -lML64i4 -lrt -lm -lpthread -lstdc++ -ldl -luuid | |
# 4. To get it to work we should additionally specify the following at TeXmacs launch time: | |
export LD_LIBRARY_PATH=$MLINKROOT | |
# 5. Launch. | |
# Note: For new versions of Ubuntu with no TeXmacs in apt, | |
# please change the above TeXmacs paths to your own binary installation. | |
texmacs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment