# src/input regression suite, 67 files; run it on demand: # rpmbuild --with tests %bcond tests 0 %global commit 46f424034f9bbd8ba751f2dfc8a7636641a0f70d %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260831 # FRICASsys is an SBCL save-lisp-and-die :executable image: the multi-MB Lisp # core is appended after the ELF, so RPM's strip/debuginfo pass discards it and # the binary then falls back to the system /usr/lib/sbcl/sbcl.core (silently # broken when sbcl is installed, hard-failing when it is not). %global debug_package %{nil} %global __brp_strip %{nil} %global __brp_strip_comment_note %{nil} Name: fricas Version: 1.3.13 Release: 2^%{snapdate}git%{shortcommit}%{?dist} Summary: An advanced computer algebra system License: BSD-3-Clause URL: https://fricas.github.io Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # hypertex gets ~40 ms to reach the FriCAS server before it gives up, keeps # running unconnected and dereferences a null socket; sman ignores its death # and waits forever, so src/doc stalls instead of failing. Rare on x86_64, # every .pht file on aarch64. # https://github.com/fricas/fricas/issues/221 Patch0: fricas-hyper-connect-timeout.patch # Belt and braces for the same stall: bound every sman -paste and retry, so a # regression costs minutes and names the file instead of timing out the builder. Patch1: fricas-doc-viewport-retry.patch # Let src/doc build with an empty paste list: htadd rejects an empty file list # and copy-phts globs *.pht unconditionally. Needed by the aarch64 workaround # in %%build. Patch2: fricas-doc-empty-pastes.patch BuildRequires: make BuildRequires: gcc BuildRequires: sbcl BuildRequires: gmp-devel # graphics BuildRequires: ImageMagick BuildRequires: gnuplot BuildRequires: libX11-devel BuildRequires: xorg-x11-server-Xvfb BuildRequires: pkgconfig(ice) BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xpm) # Latex https://fricas.github.io/install.html#latex-optional BuildRequires: tex(amsmath.sty) BuildRequires: tex(breqn.sty) BuildRequires: tex(tensor.sty) BuildRequires: tex(mleftright.sty) BuildRequires: tex(epsf.sty) BuildRequires: tex(verbatim.sty) BuildRequires: tex(hyperref.sty) BuildRequires: tex(color.sty) BuildRequires: tex(listings.sty) BuildRequires: tex(makeidx.sty) BuildRequires: tex(xparse.sty) BuildRequires: tex(tikz.sty) BuildRequires: tex(framed.sty) BuildRequires: texlive-dvips BuildRequires: texlive-dvipng BuildRequires: texlive-latex BuildRequires: texlive-makeindex BuildRequires: texlive-pdftex #emacs Requires: emacs Requires: emacs-auctex Requires: gnuplot %description FriCAS is an advanced computer algebra system, is a fork (2007) of the Axiom computer algebra system. %prep %autosetup -n %{name}-%{commit} -p1 %build # Old FriCAS C code trips GCC's incompatible-pointer-types, an error by default # since GCC 14; keep Fedora's hardening flags and only relax that one. export CFLAGS="%{build_cflags} -Wno-incompatible-pointer-types" # HyperDoc viewports are enabled and run under xvfb-run automatically by # configure once it detects xvfb-run (from xorg-x11-server-Xvfb). %configure --with-lisp="sbcl --control-stack-size 512 --dynamic-space-size 6000" \ --enable-gmp --with-x \ --enable-algebra-optimization="((speed 3) (safety 1))" # HyperDoc paste generation deadlocks on aarch64, on every file: hypertex # connects to the FriCAS server and then blocks in read() while the server # waits in select(), so sman never returns. x86_64 loses the same race only # sporadically. Build aarch64 without the pasted example pages until upstream # fixes the handshake; the algebra, graphics and HyperDoc itself are # unaffected. HT_PASTEFILES and HTEX_PASTEFILES feed only # GEN_NONVIEWPORTFILES_PHT, and MAYBE_VIEWPORTS only GEN_VIEWPORTFILES_PHT, # so emptying the three drops exactly the paste targets. # https://github.com/fricas/fricas/issues/221 %ifarch aarch64 %global no_pastes MAYBE_VIEWPORTS= HT_PASTEFILES= HTEX_PASTEFILES= %endif %make_build %{?no_pastes} %install %make_install %{?no_pastes} %check %if %{with tests} # upstream's own test target, https://fricas.github.io/install.html # (Makefile.in: check: all-src -> cd src/input; make check), which builds # the 67 REGRESS0 outputs and runs check_result over them. Serial on # purpose, src/input has no parallel-safe dependencies. make check %endif %files %license LICENSE.txt %doc ChangeLog README.rst %{_bindir}/fricas %{_bindir}/efricas %{_libdir}/fricas %changelog * Wed Sep 02 2026 Ilia Gradina - 1.3.13-2^20260831git46f4240 - fix the aarch64 build: all three aarch64 copr chroots were killed at the builder's 18000 s limit while every x86_64 chroot finished in 328-543 s - root cause, found by reproducing under mock --forcearch aarch64. hyper.c:421 gives a non-server hypertex wait_time = 2, which open_client() reads as two connect() attempts separated by fricas_sleep(40) - about 40 ms to reach FRICASsys, a full SBCL image that needs seconds. Having lost the race, hypertex keeps running with MenuServerOpened = 0 and dereferences a null socket; sman.c:477 started it with death_action NadaDelShitsky, so monitor_children ignores the death and FRICASsys waits in select() forever. A startup race, not an architecture bug: lost occasionally on x86_64, lost on all 125 paste files on aarch64. Reported upstream in fricas#221 - add fricas-hyper-connect-timeout.patch, wait_time 2 -> 250. Removes the null dereference but not the stall: hypertex then blocks in read() waiting for the server's reply instead - fricas-doc-viewport-retry.patch now covers all 125 sman invocations rather than the 11 viewport ones it started with. GEN_NONVIEWPORTFILES_PHT (113) and mobius.VIEW were unbounded, which is why aarch64 stalled silently for five hours instead of failing. On expiry it dumps /proc/*/comm and /proc/*/wchan, read directly because a minimal buildroot has no procps - add fricas-doc-empty-pastes.patch so src/doc survives an empty paste list: htadd exits 255 on an empty file list, copy-phts globs *.pht unconditionally, and ht.db is created by stamp-initial-ht-db - an edge carried only transitively through the .pht prerequisites - skip paste generation on aarch64 until upstream fixes the handshake. Costs 780 of 3095 files: 124 *.pht example pages and 145 *.VIEW graphics directories. The algebra, the binaries and all 1420 .fasl are unchanged * Tue Sep 01 2026 Ilia Gradina - 1.3.13-1^20260831git46f4240 - update to master 46f4240 of 2026-08-31 (use default fricas script) - add fricas-doc-viewport-retry.patch. src/doc/Makefile.in:499 runs one sman per viewport file, and that command sometimes never returns: sman, hypertex and viewman stay in select() at 0%% CPU with the work already done, so the build stalls forever instead of failing - five times in fourteen builds here, including on an idle machine. Reported as fricas#221; the patch only bounds each attempt with timeout and retries it, which turns the stall into three extra minutes. Over five consecutive builds it fired twice and both finished with "no unexpected failures" - add an opt-in %%check running upstream's make check, 67 regression files - algebra optimization (safety 0 -> 1). Measured on this snapshot, medians of five A-B-C blocks on an idle machine, startup floor subtracted: on rational matrix arithmetic (200x200 Hilbert determinant, cube of a 120x120) all three policies land inside the run-to-run spread, 8.22 / 8.41 / 8.32 s. On polynomial arithmetic over Z (expand of a degree 60 trivariate, gcd and resultant of degree 900 univariates) they separate: 4.52 s at (speed 3) (safety 0), 4.76 s at (speed 3) (safety 1), 5.14 s at the upstream default. So speed 3 is worth keeping, but the extra 5%% from safety 0 costs every type check in the algebra, and upstream's own words for it are "may crash without any hint why and take user data with it". The 67 file regression suite passes in all three - snapdate now carries the commit date, not the packaging date, so the same spec always rebuilds to the same NVR - Release separator . -> ^: 1.3.13 is tagged upstream, so this is a post-release snapshot and must sort above a plain 1.3.13-1 * Sun Jun 07 2026 Ilia Gradina - 1.3.13-1.%{snapdate}git%{shortcommit} - update to 1.3.13 (last commit 606d514) - disable strip/debuginfo so the SBCL executable image keeps its embedded core (fixes breakage when the system sbcl is installed) - add -Wno-incompatible-pointer-types for GCC 14+ - add %%{?dist}, move snapshot id from Version to Release for correct upgrade ordering - drop bogus --enable-FEATURE and redundant MAYBE_VIEWPORTS * Wed Jan 28 2026 Ilia Gradina - 1.3.12.7b0dd2a-1 - rebuild by last commit 21 Jan 2026 * Tue Oct 28 2025 Ilia Gradina - 1.3.12.%{shortcommit}-1 - rebuild by last commit 28 Oct 2025 * Fri Nov 01 2024 Ilia Gradina - 1.3.11.%{shortcommit}-1 - rebuild by last commit 01 Nov 2024 * Sun Oct 27 2024 Ilia Gradina - 1.3.11.%{shortcommit}-1 - rebuild by last commit 27 Oct 2024 * Wed Jul 17 2024 Ilia Gradina - 1.3.11.%{shortcommit}-1 - rebuild by last commit 17 Jul 2024 * Sat Jun 15 2024 Ilia Gradina - 1.3.10.%{shortcommit}-2 - rebuild by last commit 12 Jun 2024 * Thu Jun 6 2024 Ilia Gradina - 1.3.10.%{shortcommit}-1 - rebuild with new version sbcl 2.4.5 and update with commit above * Mon May 6 2024 Ilia Gradina - 1.3.10-5 - rebuid with new version sbcl 2.4.4 * Tue Apr 23 2024 Ilia Gradina - 1.3.10-4 - rebuild with new version sbcl 2.4.3 * Sat Mar 9 2024 Ilia Gradina - 1.3.10-3 - rebuild with new version sbcl 2.4.2 * Wed Jan 31 2024 Ilia Gradina - 1.3.10-2 - rebuild with new version sbcl * Sun Jan 14 2024 Ilia Gradina - 1.3.10-1 - update to 1.3.10 * Fri Dec 29 2023 Ilia Gradina - 1.3.9.%{shortcommit}-1 - rebuild with new version sbcl and update with commit above * Fri Dec 15 2023 Ilia Gradina - 1.3.9.%{shortcommit}-1 - init commit from 14.12.2023