Differences

This shows you the differences between two versions of the page.

Link to this comparison view

talk:picore:welcome [2026/01/24 07:49] – created geev03talk:picore:welcome [2026/01/24 07:55] (current) geev03
Line 1: Line 1:
-A guide to compiling and packaging PARI/GP as a TinyCore .tcz extension + 
- +Overview
-**Overview**+
 PARI/GP is a fast computer‑algebra system widely used for number theory, algebra, and high‑precision arithmetic. This guide describes how to compile PARI/GP on piCore64 and package it into a proper TinyCore .tcz extension for persistent use. PARI/GP is a fast computer‑algebra system widely used for number theory, algebra, and high‑precision arithmetic. This guide describes how to compile PARI/GP on piCore64 and package it into a proper TinyCore .tcz extension for persistent use.
  
 The steps below were tested on piCore64 16.x running on Raspberry Pi hardware. The steps below were tested on piCore64 16.x running on Raspberry Pi hardware.
 +
 +Requirements
 +Load the required development tools and libraries:
 +
 +tce-load -wi compiletc perl5 gmp-dev readline-dev ncurses-dev squashfs-tools
 +
 +These provide the compiler, GMP support, readline, and the SquashFS utilities needed to build .tcz extensions.
 +
 +Download and Unpack PARI/GP
 +mkdir -p ~/src
 +cd ~/src
 +wget https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-2.17.3.tar.gz
 +tar xvf pari-2.17.3.tar.gz
 +cd pari-2.17.3
 +
 +Configure the Build
 +Configure PARI/GP to install into /usr/local and use GMP and readline:
 +
 +./Configure --prefix=/usr/local --with-gmp --with-readline
 +
 +Compile and Install
 +make -j4
 +sudo make install
 +
 +This installs:
 +
 +/usr/local/bin/gp
 +/usr/local/lib/pari/
 +/usr/local/share/pari/
 +Create the .tcz Staging Directory
 +mkdir -p ~/tcz/pari-gp/usr/local
 +
 +Copy the installed files into the staging area:
 +
 +cp -rf /usr/local/bin   ~/tcz/pari-gp/usr/local/
 +cp -rf /usr/local/lib   ~/tcz/pari-gp/usr/local/
 +cp -rf /usr/local/share ~/tcz/pari-gp/usr/local/
 +
 +Strip Binaries (Optional)
 +strip ~/tcz/pari-gp/usr/local/bin/gp
 +
 +This reduces the final extension size.
 +
 +Build the .tcz Extension
 +cd ~/tcz
 +mksquashfs pari-gp pari-gp.tcz -noappend
 +md5sum pari-gp.tcz > pari-gp.tcz.md5.txt
 +
 +You should now have:
 +
 +pari-gp.tcz
 +pari-gp.tcz.md5.txt
 +
 +Install the Extension into TinyCore
 +Move the files into the extension directory:
 +
 +sudo mv pari-gp.tcz /etc/sysconfig/tcedir/optional/
 +sudo mv pari-gp.tcz.md5.txt /etc/sysconfig/tcedir/optional/
 +
 +Add it to the boot list:
 +
 +echo "pari-gp.tcz" | sudo tee -a /etc/sysconfig/tcedir/onboot.lst
 +
 +Reboot and Test
 +sudo reboot
 +gp
 +
 +You should see the PARI/GP banner and be able to run commands normally.
 +
 +Notes
 +This extension is self‑contained and does not require persistence via filetool.sh.
 +If you want to include documentation or examples, place them under usr/local/share/pari/ before building the .tcz.
 +The same method works for other mathematical tools such as GMP‑based calculators or Rust‑compiled number‑theory utilities.
 +
 +
  
Print/export
QR Code
QR Code talk:picore:welcome (generated for current page)