|
wxMaxima
|
To build wxMaxima from sources you need to have a C++ compiler (C++20 is required), wxWidgets >= 3.0 (>= 3.2 recommended) (including development headers) and CMake >= 3.16 installed.
wxMaxima is built using the CMake build system.
The following steps will build and install wxMaxima using CMake. Download and extract wxMaxima (the latest release or a git clone or zip snapshot of the latest development version) and change in the wxMaxima tree. Then:
Now you can test your wxMaxima build (or just use it without installation) by calling:
If everything is okay install wxMaxima with:
If you want to install into a special prefix (not /usr/local), add -DCMAKE_INSTALL_PREFIX=/your/installation/prefix to the first cmake invocation. E.g.
By default a "Debug" build will be made (less optimization, debug symbols) - and this build shows the wxMaxima log window (may contain helpful log messages) when started; if you want to create a "Release" build (more optimization, the log window is not shown by default, it can be toggled on and off using "View->Toggle log window") set the build type (CMake supports other build types too) using:
Of course you can use the CMake GUI (cmake-gui) or curses based CMake (ccmake) for the configure step and change some CMake variables.
If you want to create binary packages (tar.gz, tar.bz2, DEB & RPM, on macOS also .dmg), the following command will create them:
To update the locale files (po and pot) in the source code:
You can use (or test) a fresh compiled wxMaxima (without installation) by calling ./wxmaxima-local from the build-directory.
wxMaxima comes with several tests, which can be run using
from the build directory. If you want to run a single test, you can use the option -R <name-of-the-test> when calling ctest. The tests (and their names) can be seen in the file test/CMakeLists.txt of the source code.
On Linux/Unix the tests usually require a X Server; if you start the tests without an X server (e.g. automatic tests using cron, when doing tests using a continuous integration system, etc.) you can use xvfb-run to create a virtual X Server environment, e.g. just run: xvfb-run ctest
This requires wxWidgets to be installed, e.G. using MacPorts. If you are in the extracted wxMaxima directory, call e.g.
(libfribidi-dev is optional – see "New optional dependency: libfribidi" under "Additional information for packagers" below. po4a needs to be version 0.70 or newer – an older one (e.g. Ubuntu 24.04's own po4a 0.69 package) is detected and silently not used, with a CMake warning explaining why, rather than risk it corrupting the translated manual; see CheckPo4aVersion.cmake.)
beforehand or (if apt-get is configured to load the source package repositories and not only the binary packages) by the simpler
You must use the apt-get install command when the version you are building has dependencies which are not listed as dependencies in your distro's repository version of wxmaxima.
On macOS X you most probably need the command-line compiler one can tell Xcode to install. Additionally wxWidgets needs to be installed, which can be done using Homebrew, Fink or MacPorts and should be named wxWidgets or wxMac there. XCode versions older than version 13.0 have problems compiling wxMaxima. Optionally, brew install fribidi – see "New optional
dependency: libfribidi" under "Additional information for packagers" below.
Additional information about building on macOS:
You can use the MinGW-w64 (https://www.mingw-w64.org/) compilers.
You can also build using MS Visual Studio 2019 or newer. Since MSVS provides adequate versions of both cmake and ninja, there's no need to install those. The build has to start from within the x64 Native Tools Command Prompt, and you have to first build wxWidgets before you build wxmaxima. You can get some inspiration about how to do both of these steps by examining the MSVC build steps in .github/workflows/compile_windows.yml.
These compilers come with two forms of thread support - win32 and posix. The win32 thread version does not support std::thread, which wxMaxima uses for multithreading, so be sure to install or reconfigure the posix version.
On Ubuntu Linux the crosscompiler x86_64-w64-mingw32-g++ can be reconfigured using:
(For 32 bit the same works for the 32 bit crosscompiler i686-w64-mingw32-g++.)
Some information how to build for Android 9 can be found in the wxMaxima discussion forum: https://github.com/wxMaxima-developers/wxmaxima/discussions/1594
An HTML version of wxMaxima's source code documentation can be found at https://wxmaxima-developers.github.io/wxmaxima/Doxygen-documentation/
A local version of the documentation of wxMaxima's source can be generated using doxygen and the doxygen target:
CMake has currently (Feb 2022) problems finding a wxWidgets that was compiled using CMake. If that is the reason maybe wxWidgets was compiled without wxWebView. In that case
might allow cmake to find wxWidgets at the cost of losing the integrated dockable help browser.
One can use the option -DWXM_DISABLE_QA=on to disable that library, if necessary. Reported in issue #2064.
wxMaxima can optionally link libfribidi for correct caret placement, mouse clicks, arrow-key movement and selection highlighting on a worksheet line that mixes left-to-right and right-to-left text (e.g. a Farsi word next to a German one). It is detected automatically via pkg-config at configure time (WXM_USE_FRIBIDI, a CMake option, defaults to ON) and needs no other configuration; without it (or with -DWXM_USE_FRIBIDI=off) wxMaxima builds and runs exactly as before, just with the older, single-direction-only approximation on a mixed-direction line. Packages that don't need right-to-left support, or that target a system libfribidi doesn't cover, can skip the -dev package entirely.
The package is called libfribidi-dev on Debian/Ubuntu, fribidi-devel on Fedora/RHEL, fribidi on Homebrew/MacPorts/Arch, and mingw-w64-x86_64-fribidi under MSYS2.
wxMaxima, if linked statically, is pretty standalone and therefore fit for creating a portable app:
If a wxMaxima install should come without manual or translation files that might not be the end of the world, neither:
If you have problems when compiling wxMaxima, maybe a look in the configurations for various CI-Systems (the files in .github/workflows/) may be helpful to see, how wxMaxima is compiled on these systems.
If something is not clear / should be improved in that document, please open an issue. This document should help YOU to compile wxMaxima.