Open lwzhenglittle opened 5 months ago
通过一些非常 Dirty 的 Hack ,勉强 Workaround 掉了 Tachyon 的问题,看看下面还能有啥包需要调整。
新进展:已经编译出来了!
目前正在进行 make test
更新进度: make test 有失败
失败部分的摘要
sage -t --random-seed=148981849284651241199665828132196767613 src/sage/schemes/elliptic_curves/ell_rational_field.py # 14 doctests failed
sage -t --random-seed=148981849284651241199665828132196767613 src/sage/modular/abvar/abvar.py # 1 doctest failed
sage -t --random-seed=148981849284651241199665828132196767613 src/sage/modular/hecke/submodule.py # 1 doctest failed
sage -t --random-seed=148981849284651241199665828132196767613 src/sage/lfunctions/sympow.py # 10 doctests failed
简单观察发现和 sympow 这个组件有关,尝试直接编译运行 sympow
发现不能正常编译运行,先睡觉了,明天再研究
找到问题了,构建 sympow 时会自动开启 -DFPUCONTROLH
,
相关代码 fpu.c
:
/* David Kirkby 21st August 2010
Licenced under the GPL version 2 or at your option any later version.
Set the FPU's precision control to 53 bits (double precision) instead of
the default 64-bits (extended precision). I've commented it fairly
liberally, with the hope it's helpful if anyone needs to edit it.
Note, the extended precision uses 80 bits in total,
of which 64 are for the mantissa.
Double precsion uses 64 bits in total, but ony 53 are
for the mantissa.
The precision is set by bits 8 and 9 of the Control Word in the floating
point processor. The Control word has 16 bits.
Data taken from The 80387 Programmer's reference Manual, Intel,
1987.
00 = 24-bits (single precision)
01 = reserved (or at least it was at the time the 387 was released)
10 = 53-bits (double precision)
11 = 64-bits (extended precision).
FLDCW is an x86 instruction to "Load the Control Word"
FNSTCW is an x88 instruction to "Store FPU Control Word"
It does so without checking for pending unmasked floating-point
exceptions. (A similar FSTCW checks for them first).
*/
/*
* Rrefreshed and revisited for Debian on behalf of the Debian Science Team
* by Jerome Benoit <calculus@rezozer.net>, 2014-10-07.
*/
#if defined(ISOC99_FENV)
#include <fenv.h>
#elif defined(FPUCONTROLH)
#include <fpu_control.h>
#define ADHOC__FPU_OR_MASK_EXTENDED (((fpu_control_t)(0x1) << 8) | ((fpu_control_t)(0x1) << 9))
#define ADHOC__FPU_AND_MASK_DOUBLE (~((fpu_control_t)(0x1) << 8))
#elif defined(x86)
#define _SET_FPU_CONTROL_WORD(x) asm volatile ("fldcw %0": :"m" (x));
#define _READ_FPU_CONTROL_WORD(x) asm volatile ("fnstcw %0":"=m" (x));
#else
#endif
void fpu_53bits()
{
#if defined(ISOC99_FENV)
fesetprec(FE_DBLPREC);
#elif defined(FPUCONTROLH)
fpu_control_t fpu_control=_FPU_DEFAULT;
_FPU_GETCW(fpu_control);
fpu_control|=ADHOC__FPU_OR_MASK_EXTENDED;
fpu_control&=ADHOC__FPU_AND_MASK_DOUBLE;
_FPU_SETCW(fpu_control);
#elif defined(x86)
/* The control word is 16 bits, numbered 0 to 15 */
volatile unsigned short control_word;
_READ_FPU_CONTROL_WORD(control_word); /* Read the FPU control word */
control_word=control_word & 0xfeff; /* Set bit 8 = 0 */
control_word=control_word | 0x200; /* Set bit 9 = 1 */
_SET_FPU_CONTROL_WORD(control_word); /* Force double-precision, 53-bit mantissa */
#endif
}
去掉这个选项重新构建即可通过以上几个 test。
目前没有比较好的 patch 方法,有 idea 可以直接回复。
同时发现了 clang 和 gcc 不一致的行为,分别运行
clang -O3 -g -std=gnu17 -fno-fast-math -ffp-contract=on -c -o fpu.o fpu.c -DFPUCONTROLH
gcc -O3 -g -std=gnu17 -fno-fast-math -ffp-contract=on -c -o fpu.o fpu.c -DFPUCONTROLH
gcc 没有输出
clang 输出
fpu.c:55:5: error: invalid operand for instruction
55 | _FPU_GETCW(fpu_control);
| ^
/usr/include/fpu_control.h:94:42: note: expanded from macro '_FPU_GETCW'
94 | #define _FPU_GETCW(cw) __asm__ volatile ("movfcsr2gr %0,$r0" : "=r"(cw))
| ^
<inline asm>:1:18: note: instantiated into assembly here
1 | movfcsr2gr $a0,$r0
| ^
fpu.c:58:3: error: invalid operand for instruction
58 | _FPU_SETCW(fpu_control);
| ^
/usr/include/fpu_control.h:95:42: note: expanded from macro '_FPU_SETCW'
95 | #define _FPU_SETCW(cw) __asm__ volatile ("movgr2fcsr $r0,%0" : : "r"(cw))
| ^
<inline asm>:1:14: note: instantiated into assembly here
1 | movgr2fcsr $r0,$a0
| ^
2 errors generated.
同时发现了 clang 和 gcc 不一致的行为,分别运行
clang -O3 -g -std=gnu17 -fno-fast-math -ffp-contract=on -c -o fpu.o fpu.c -DFPUCONTROLH gcc -O3 -g -std=gnu17 -fno-fast-math -ffp-contract=on -c -o fpu.o fpu.c -DFPUCONTROLH
gcc 没有输出
clang 输出
fpu.c:55:5: error: invalid operand for instruction 55 | _FPU_GETCW(fpu_control); | ^ /usr/include/fpu_control.h:94:42: note: expanded from macro '_FPU_GETCW' 94 | #define _FPU_GETCW(cw) __asm__ volatile ("movfcsr2gr %0,$r0" : "=r"(cw)) | ^ <inline asm>:1:18: note: instantiated into assembly here 1 | movfcsr2gr $a0,$r0 | ^ fpu.c:58:3: error: invalid operand for instruction 58 | _FPU_SETCW(fpu_control); | ^ /usr/include/fpu_control.h:95:42: note: expanded from macro '_FPU_SETCW' 95 | #define _FPU_SETCW(cw) __asm__ volatile ("movgr2fcsr $r0,%0" : : "r"(cw)) | ^ <inline asm>:1:14: note: instantiated into assembly here 1 | movgr2fcsr $r0,$a0 | ^ 2 errors generated.
https://sourceware.org/pipermail/libc-alpha/2024-April/156376.html
设备在学校,五一假期期间估计没啥进度,等节后开始研究进一步的补丁和打包。
最近事情比较多,在参考其他发行版研究打包格式和 sage 运行所需要的环境变量。
喜报,现在 https://github.com/lwzhenglittle/sage-loongarch 已经可以在龙芯上构建了,只需:
git clone https://github.com/lwzhenglittle/sage-loongarch.git
cd sage-loongarch
make configure
./configure
make -j4
构建完成后即可在项目根目录下执行 ./sage
来运行 Sagemath。
目前正在测试 make ptestlong
。
Sagemath 简介
SageMath(简称Sage)是一个开源的数学软件系统,旨在提供一个包含数学软件的完整环境,以便于数学建模、数值计算、符号计算和数据可视化等任务。它集成了多个数学软件包和工具,如NumPy、SciPy、SymPy、Matplotlib等,同时提供了一个Python编程接口。
SageMath 的目标是为数学家、科学家和工程师提供一个统一的平台,使他们能够进行各种复杂的数学计算和研究。SageMath 支持大量的数学领域,包括代数、数论、几何、拓扑学、概率论等等。
SageMath 是免费开源软件,用户可以自由地使用、修改和分发它。
情况说明
Repo: https://github.com/lwzhenglittle/sage-loongarch
Upstream: https://github.com/sagemath/sage
目前正在使用 AOSC OS 在 3A5000 上尝试构建 Sagemath,正在把一些构建相关的 patch 推到 lwzhenglittle/sage-loongarch,起码让构建系统能够正常运行(目前还没推)。
Sagemath 本身自带一套 “SPKG” 系统,用于管理其第三方依赖库,目前尝试使用其自带的 SPKG 进行依赖补全,而不是使用发行版软件源中的依赖包。
目前遇到的问题
相关日志文件,脚本文件:
Sagemath 提供的用于构建 Tachyon 的脚本
```bash #!/usr/bin/env bash export SAGE_ROOT="/home/lwzheng/sagemath/sage-10.3" export SAGE_SRC="/home/lwzheng/sagemath/sage-10.3/src" export SAGE_PKG_DIR="/home/lwzheng/sagemath/sage-10.3/local/var/tmp/sage/build/tachyon-0.98.9.p7" export SAGE_SPKG_SCRIPTS="/home/lwzheng/sagemath/sage-10.3/local/var/lib/sage/scripts" export SAGE_SPKG_WHEELS="/home/lwzheng/sagemath/sage-10.3/local/var/lib/sage/wheels" export PKG_NAME="tachyon-0.98.9.p7" export PKG_BASE="tachyon" export PKG_VER="0.98.9.p7" for lib in "$SAGE_ROOT/build/bin/sage-dist-helpers" "$SAGE_SRC/bin/sage-src-env-config" "$SAGE_SRC/bin/sage-env-config" "$SAGE_SRC/bin/sage-env" "$SAGE_ROOT/build/bin/sage-build-env-config" "$SAGE_ROOT/build/bin/sage-build-env"; do source "$lib" if [ $? -ne 0 ]; then echo >&2 "Error: failed to source $lib" echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?" exit 1 fi done export SAGE_INST_LOCAL="/home/lwzheng/sagemath/sage-10.3/local" sdh_guard if [ $? -ne 0 ]; then echo >&2 "Error: sdh_guard not found; Sage environment was not set up properly" exit 1 fi cd "$SAGE_PKG_DIR" if [ $? -ne 0 ]; then echo >&2 "Error: could not cd to the package build directory $SAGE_PKG_DIR" exit 1 fi CUR=`pwd` cd "$CUR/src/unix" TARGET="" case "$UNAME" in "Darwin") TARGET=macosx ;; "FreeBSD") # Tachyon doesn't have a threaded option for FreeBSD (though it shouldn't # be too difficult to add). There's no need for an explicit 64-bit version # since the only difference is a slight performance optimisation. TARGET=bsd ;; "Linux") case "$($CC -dumpmachine)" in i[3456]86*) TARGET=linux-thr ;; ia64*) TARGET=linux-ia64-thr ;; amd64*|x86_64*) TARGET=linux-64-thr ;; ppc*|powerpc*) TARGET=linux-ppc ;; armv6l*|armv7l*) TARGET=linux-arm-thr ;; esac ;; "SunOS") TARGET=solaris-pthreads-gcc ;; # TODO: I don't think we even support these platforms anymore "AIX") CFLAGS="$CFLAGS -g -O2" export CFLAGS TARGET=aix-generic-thr ;; "HP-UX") CFLAGS="$CFLAGS -g -O2" export CFLAGS TARGET=hpux-generic-thr ;; esac if [ -z "$TARGET" ]; then sdh_die "Error: Sorry, your platform isn't supported by Tachyon and/or Sage. Exiting..." fi sdh_make "$TARGET" echo "Installing the Tachyon binary..." cd "$CUR" binary_name=tachyon # The '*' is a place-holder for the arch just built: sdh_install src/compile/*/"${binary_name}" "$SAGE_LOCAL/bin" ```Tachyon 的 Makefile
```makefile # Makefile for the Tachyon parallel ray tracing library. # Copyright 1994-2007 John E. Stone # All Rights Reserved # # $Id: Makefile,v 1.100 2007/02/13 03:39:08 johns Exp $ # #.SILENT: # # Include the machine dependent compilation flags etc. # include Make-opengl include Make-config include Make-arch include Make-distrib COMPILEDIR=../compile ARCHDIR=../compile/${ARCH} OBJDIR=${ARCHDIR}/libtachyon # # Name of raytracing library file to create # RAYLIB=${ARCHDIR}/libtachyon.a RAYLIBDIR=${ARCHDIR} # # Extra parsers and such # PARSEOBJS = ${OBJDIR}/mgfparse.o ${OBJDIR}/ac3dparse.o PARSEINC = ${MGFINC} PARSEDIRS = ${MGFDIR} PARSELIBS = ${MGFLIB} # # Miscellaneous object files etc. # MISC= ${OBJDIR}/mainanim.o \ ${OBJDIR}/animspheres.o \ ${OBJDIR}/animspheres \ ${OBJDIR}/animspheres2.o \ ${OBJDIR}/animskull.o \ ${OBJDIR}/animskull \ ${OBJDIR}/animspheres2 \ ${OBJDIR}/fire.o \ ${OBJDIR}/fire \ ${OBJDIR}/hypertex.o \ ${OBJDIR}/hypertex \ ${OBJDIR}/tgatoyuv \ ${OBJDIR}/tachyon \ ${OBJDIR}/animray \ ${OBJDIR}/main.o \ ${OBJDIR}/spaceball.o \ ${OBJDIR}/trackball.o \ ${OBJDIR}/getargs.o \ ${OBJDIR}/parse.o \ ${OBJDIR}/nffparse.o \ ${OBJDIR}/glwin.o # # Test programs included.. # #BINARIES = ${COMPILEDIR} ${ARCHDIR} ${OBJDIR} ${PARSEDIRS} \ # ${RAYLIB} ${PARSELIB} ${ARCHDIR}/tachyon \ # ${ARCHDIR}/fire ${ARCHDIR}/hypertex ${ARCHDIR}/tgatoyuv \ # ${ARCHDIR}/animray ${ARCHDIR}/animspheres ${ARCHDIR}/animskull \ # ${ARCHDIR}/animspheres2 # # No test programs included.. # BINARIES = ${COMPILEDIR} ${ARCHDIR} ${OBJDIR} ${PARSEDIRS} \ ${RAYLIB} ${PARSELIB} ${ARCHDIR}/tachyon #---------------------------------------------------------------------- # Demo Programs etc #---------------------------------------------------------------------- DEMOINC= -I${SRCDIR} -I${DEMOSRC} all : mesg directories ${MAKE} ${BINARIES} @echo "" @echo "Build Complete" directories : @if [ ! -d ${COMPILEDIR} ] ; then \ echo "Making compile directory ${COMPILEDIR}"; \ mkdir ${COMPILEDIR}; \ fi; @if [ ! -d ${ARCHDIR} ] ; then \ echo "Making architecture directory ${ARCHDIR}"; \ mkdir ${ARCHDIR}; \ fi; @if [ ! -d ${OBJDIR} ] ; then \ echo "Making library directory ${OBJDIR}"; \ mkdir ${OBJDIR}; \ fi; mesg : @echo "Building Tachyon Parallel Ray Tracing library" @echo "Copyright 1994-2007, John E. Stone" @echo "All Rights Reserveed" ${MGFDIR} : ${ARCHDIR} @if [ ! -d ${MGFDIR} ] ; then \ echo "Making libmgf directory ${MGFDIR}"; \ mkdir ${MGFDIR}; \ fi; # # MGF Library compilation # ${MGFLIB} : ../libmgf/Makefile {cd ../libmgf; \ ${MAKE} -f Makefile RANLIB=${RANLIB} MGFLIBDIR=${MGFLIBDIR} \ MGFLIB=${MGFLIB} AR=${AR} ARFLAGS=${ARFLAGS} \ }; ${ARCHDIR}/tachyon : ${RAYLIB} ${PARSELIB} ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${LDFLAGS} ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS} ${STRIP} ${ARCHDIR}/tachyon ${ARCHDIR}/animray : ${RAYLIB} ${OBJDIR}/mainanim.o ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/animray ${LDFLAGS} ${OBJDIR}/mainanim.o -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/animray ${ARCHDIR}/animspheres : ${RAYLIB} ${OBJDIR}/animspheres.o ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/animspheres ${LDFLAGS} ${OBJDIR}/animspheres.o -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/animspheres ${ARCHDIR}/animspheres2 : ${RAYLIB} ${OBJDIR}/animspheres2.o ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/animspheres2 ${LDFLAGS} ${OBJDIR}/animspheres2.o -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/animspheres2 ${ARCHDIR}/hypertex : ${RAYLIB} ${OBJDIR}/hypertex.o ${DEMOSRC}/hypertex.c ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/hypertex ${LDFLAGS} ${OBJDIR}/hypertex.o -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/hypertex ${ARCHDIR}/fire : ${RAYLIB} ${OBJDIR}/fire.o ${DEMOSRC}/fire.c ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/fire ${LDFLAGS} ${OBJDIR}/fire.o -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/fire ${ARCHDIR}/animskull : ${RAYLIB} ${OBJDIR}/animskull.o ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/animskull ${LDFLAGS} ${OBJDIR}/animskull.o -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/animskull ${ARCHDIR}/tgatoyuv : ${RAYLIB} ${DEMOSRC}/tgatoyuv.c ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/tgatoyuv ${LDFLAGS} ${DEMOSRC}/tgatoyuv.c -L${RAYLIBDIR} ${LIBS} ${STRIP} ${ARCHDIR}/tgatoyuv # # Rules for building demo .o files # ${OBJDIR}/animskull.o : ${DEMOSRC}/animskull.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/animskull.c -o ${OBJDIR}/animskull.o ${OBJDIR}/hypertex.o : ${DEMOSRC}/hypertex.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/hypertex.c -o ${OBJDIR}/hypertex.o ${OBJDIR}/fire.o : ${DEMOSRC}/fire.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/fire.c -o ${OBJDIR}/fire.o ${OBJDIR}/mainanim.o : ${DEMOSRC}/mainanim.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/mainanim.c -o ${OBJDIR}/mainanim.o ${OBJDIR}/main.o : ${DEMOSRC}/main.c ${DEMOSRC}/getargs.h ${DEMOSRC}/parse.h ${DEMOSRC}/nffparse.h ${DEMOSRC}/ac3dparse.h ${DEMOSRC}/glwin.h ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/main.c -o ${OBJDIR}/main.o ${OBJDIR}/getargs.o : ${DEMOSRC}/getargs.c ${DEMOSRC}/getargs.h ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/getargs.c -o ${OBJDIR}/getargs.o ${OBJDIR}/glwin.o : ${DEMOSRC}/glwin.c ${DEMOSRC}/glwin.h ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/glwin.c -o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o : ${DEMOSRC}/spaceball.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/spaceball.c -o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o : ${DEMOSRC}/trackball.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/trackball.c -o ${OBJDIR}/trackball.o ${OBJDIR}/animspheres.o : ${DEMOSRC}/animspheres.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/animspheres.c -o ${OBJDIR}/animspheres.o ${OBJDIR}/animspheres2.o : ${DEMOSRC}/animspheres2.c ${CC} ${CFLAGS} ${DEMOINC} -c ${DEMOSRC}/animspheres2.c -o ${OBJDIR}/animspheres2.o ${OBJDIR}/parse.o : ${DEMOSRC}/parse.c ${DEMOSRC}/parse.h ${CC} ${CFLAGS} ${PARSEINC} ${DEMOINC} -c ${DEMOSRC}/parse.c -o ${OBJDIR}/parse.o ${OBJDIR}/mgfparse.o : ${DEMOSRC}/mgfparse.c ${DEMOSRC}/mgfparse.h ${CC} ${CFLAGS} ${PARSEINC} ${DEMOINC} ${MGFINC} -c ${DEMOSRC}/mgfparse.c -o ${OBJDIR}/mgfparse.o ${OBJDIR}/nffparse.o : ${DEMOSRC}/nffparse.c ${DEMOSRC}/nffparse.h ${CC} ${CFLAGS} ${PARSEINC} ${DEMOINC} -c ${DEMOSRC}/nffparse.c -o ${OBJDIR}/nffparse.o ${OBJDIR}/ac3dparse.o : ${DEMOSRC}/ac3dparse.c ${DEMOSRC}/ac3dparse.h ${CC} ${CFLAGS} ${PARSEINC} ${DEMOINC} -c ${DEMOSRC}/ac3dparse.c -o ${OBJDIR}/ac3dparse.o #---------------------------------------------------------------------- # End of demo programs #---------------------------------------------------------------------- OBJDEPS= ${SRCDIR}/tachyon.h \ ${SRCDIR}/machine.h \ ${SRCDIR}/rtcommon.h \ ${SRCDIR}/types.h \ ${SRCDIR}/hash.h \ ${SRCDIR}/macros.h \ ${SRCDIR}/render.h \ ${SRCDIR}/quadric.h \ ${SRCDIR}/texture.h \ ${SRCDIR}/light.h \ ${SRCDIR}/util.h RAYOBJS= ${OBJDIR}/api.o \ ${OBJDIR}/apigeom.o \ ${OBJDIR}/box.o \ ${OBJDIR}/global.o \ ${OBJDIR}/hash.o \ ${OBJDIR}/parallel.o \ ${OBJDIR}/threads.o \ ${OBJDIR}/camera.o \ ${OBJDIR}/render.o \ ${OBJDIR}/trace.o \ ${OBJDIR}/grid.o \ ${OBJDIR}/intersect.o \ ${OBJDIR}/sphere.o \ ${OBJDIR}/plane.o \ ${OBJDIR}/ring.o \ ${OBJDIR}/triangle.o \ ${OBJDIR}/cylinder.o \ ${OBJDIR}/quadric.o \ ${OBJDIR}/extvol.o \ ${OBJDIR}/vol.o \ ${OBJDIR}/ui.o \ ${OBJDIR}/util.o \ ${OBJDIR}/vector.o \ ${OBJDIR}/shade.o \ ${OBJDIR}/texture.o \ ${OBJDIR}/coordsys.o \ ${OBJDIR}/imap.o \ ${OBJDIR}/light.o \ ${OBJDIR}/imageio.o \ ${OBJDIR}/jpeg.o \ ${OBJDIR}/pngfile.o \ ${OBJDIR}/ppm.o \ ${OBJDIR}/psd.o \ ${OBJDIR}/sgirgb.o \ ${OBJDIR}/tgafile.o \ ${OBJDIR}/winbmp.o ${RAYLIB} : ${RAYOBJS} rm -f ${RAYLIB} ${AR} ${ARFLAGS} ${RAYLIB} ${RAYOBJS} ${RANLIB} ${RAYLIB} ${OBJDIR}/vol.o : ${SRCDIR}/vol.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/vol.c -o ${OBJDIR}/vol.o ${OBJDIR}/extvol.o : ${SRCDIR}/extvol.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/extvol.c -o ${OBJDIR}/extvol.o ${OBJDIR}/winbmp.o : ${SRCDIR}/winbmp.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/winbmp.c -o ${OBJDIR}/winbmp.o ${OBJDIR}/vector.o : ${SRCDIR}/vector.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/vector.c -o ${OBJDIR}/vector.o ${OBJDIR}/triangle.o : ${SRCDIR}/triangle.c ${OBJDEPS} ${SRCDIR}/triangle.h ${CC} ${CFLAGS} -c ${SRCDIR}/triangle.c -o ${OBJDIR}/triangle.o ${OBJDIR}/trace.o : ${SRCDIR}/trace.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/trace.c -o ${OBJDIR}/trace.o ${OBJDIR}/threads.o : ${SRCDIR}/threads.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/threads.c -o ${OBJDIR}/threads.o ${OBJDIR}/tgafile.o : ${SRCDIR}/tgafile.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/tgafile.c -o ${OBJDIR}/tgafile.o ${OBJDIR}/util.o : ${SRCDIR}/util.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/util.c -o ${OBJDIR}/util.o ${OBJDIR}/ui.o : ${SRCDIR}/ui.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/ui.c -o ${OBJDIR}/ui.o ${OBJDIR}/texture.o : ${SRCDIR}/texture.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/texture.c -o ${OBJDIR}/texture.o ${OBJDIR}/sphere.o : ${SRCDIR}/sphere.c ${OBJDEPS} ${SRCDIR}/sphere.h ${CC} ${CFLAGS} -c ${SRCDIR}/sphere.c -o ${OBJDIR}/sphere.o ${OBJDIR}/sgirgb.o : ${SRCDIR}/sgirgb.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/sgirgb.c -o ${OBJDIR}/sgirgb.o ${OBJDIR}/shade.o : ${SRCDIR}/shade.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/shade.c -o ${OBJDIR}/shade.o ${OBJDIR}/ring.o : ${SRCDIR}/ring.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/ring.c -o ${OBJDIR}/ring.o ${OBJDIR}/render.o : ${SRCDIR}/render.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/render.c -o ${OBJDIR}/render.o ${OBJDIR}/quadric.o : ${SRCDIR}/quadric.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/quadric.c -o ${OBJDIR}/quadric.o ${OBJDIR}/jpeg.o : ${SRCDIR}/jpeg.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/jpeg.c -o ${OBJDIR}/jpeg.o ${OBJDIR}/pngfile.o : ${SRCDIR}/pngfile.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/pngfile.c -o ${OBJDIR}/pngfile.o ${OBJDIR}/ppm.o : ${SRCDIR}/ppm.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/ppm.c -o ${OBJDIR}/ppm.o ${OBJDIR}/psd.o : ${SRCDIR}/psd.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/psd.c -o ${OBJDIR}/psd.o ${OBJDIR}/plane.o : ${SRCDIR}/plane.c ${OBJDEPS} ${SRCDIR}/plane.h ${CC} ${CFLAGS} -c ${SRCDIR}/plane.c -o ${OBJDIR}/plane.o ${OBJDIR}/parallel.o : ${SRCDIR}/parallel.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/parallel.c -o ${OBJDIR}/parallel.o ${OBJDIR}/objbound.o : ${SRCDIR}/objbound.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/objbound.c -o ${OBJDIR}/objbound.o ${OBJDIR}/light.o : ${SRCDIR}/light.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/light.c -o ${OBJDIR}/light.o ${OBJDIR}/intersect.o : ${SRCDIR}/intersect.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/intersect.c -o ${OBJDIR}/intersect.o ${OBJDIR}/imageio.o : ${SRCDIR}/imageio.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/imageio.c -o ${OBJDIR}/imageio.o ${OBJDIR}/imap.o : ${SRCDIR}/imap.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/imap.c -o ${OBJDIR}/imap.o ${OBJDIR}/grid.o : ${SRCDIR}/grid.c ${SRCDIR}/grid.h ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/grid.c -o ${OBJDIR}/grid.o ${OBJDIR}/global.o : ${SRCDIR}/global.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/global.c -o ${OBJDIR}/global.o ${OBJDIR}/hash.o : ${SRCDIR}/hash.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/hash.c -o ${OBJDIR}/hash.o ${OBJDIR}/cylinder.o : ${SRCDIR}/cylinder.c ${OBJDEPS} ${SRCDIR}/cylinder.h ${CC} ${CFLAGS} -c ${SRCDIR}/cylinder.c -o ${OBJDIR}/cylinder.o ${OBJDIR}/coordsys.o : ${SRCDIR}/coordsys.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/coordsys.c -o ${OBJDIR}/coordsys.o ${OBJDIR}/camera.o : ${SRCDIR}/camera.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/camera.c -o ${OBJDIR}/camera.o ${OBJDIR}/box.o : ${SRCDIR}/box.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/box.c -o ${OBJDIR}/box.o ${OBJDIR}/bndbox.o : ${SRCDIR}/bndbox.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/bndbox.c -o ${OBJDIR}/bndbox.o ${OBJDIR}/apigeom.o : ${SRCDIR}/apigeom.c ${OBJDEPS} ${CC} ${CFLAGS} -c ${SRCDIR}/apigeom.c -o ${OBJDIR}/apigeom.o ${OBJDIR}/api.o : ${SRCDIR}/api.c ${OBJDEPS} ${SRCDIR}/sphere.h ${SRCDIR}/plane.h ${SRCDIR}/triangle.h ${SRCDIR}/cylinder.h ${CC} ${CFLAGS} -c ${SRCDIR}/api.c -o ${OBJDIR}/api.o clean : @echo "Cleaning object files, binaries etc." @echo "" rm -rf ${COMPILEDIR}/* valgrind: /usr/local/encap/valgrind-3.2.3/bin/valgrind --tool=memcheck --error-limit=no --track-fds=yes --num-callers=1000 ../compile/linux-debug/tachyon ../scenes/*.dat -res 32 32 -aasamples 1 -nosave valgrind-full: /usr/local/encap/valgrind-3.2.3/bin/valgrind --tool=memcheck --leak-check=full --error-limit=no --track-fds=yes --num-callers=1000 ../compile/linux-debug/tachyon ../scenes/*.dat -res 32 32 -aasamples 1 -nosave valgrind-debug: /usr/local/encap/valgrind-3.2.3/bin/valgrind --tool=memcheck --db-attach=yes --error-limit=no --track-fds=yes --num-callers=1000 --gen-suppressions=yes ../compile/linux-debug/tachyon ../scenes/*.dat -res 32 32 -aasamples 1 -nosave ```Sagemath 构建系统提供的失败日志
``` Attempting to download package tachyon-0.98.9.tar.bz2 from mirrors https://github.com/sagemath/sage/releases/download/10.3/tachyon-0.98.9.tar.bz2 [......................................................................] tachyon-0.98.9.p7 ==================================================== Setting up build directory for tachyon-0.98.9.p7 Finished extraction Applying patches from ../patches... Applying ../patches/Make-arch.patch patching file unix/Make-arch Applying ../patches/Make-config.patch patching file unix/Make-config Applying ../patches/Makefile.patch patching file unix/Makefile Applying ../patches/main.c.patch patching file demosrc/main.c **************************************************** Host system: Linux lwzheng-3a5k 6.9.0-aosc-main #1 SMP PREEMPT_DYNAMIC Wed Apr 10 16:51:47 UTC 2024 loongarch64 GNU/Linux **************************************************** C compiler: gcc C compiler version: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/loongarch64-aosc-linux-gnu/13.2.0/lto-wrapper Target: loongarch64-aosc-linux-gnu Configured with: /var/cache/acbs/build/acbs.epohdmgh/gcc-13.2.0/configure --build=loongarch64-aosc-linux-gnu --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --bindir=/usr/bin --sbindir=/usr/bin --mandir=/usr/share/man --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://github.com/AOSC-Dev/aosc-os-core --enable-shared --enable-threads=posix --with-system-zlib --enable-gnu-indirect-function --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --with-isl=/usr --enable-lto --enable-plugin --enable-install-libiberty --disable-multilib --disable-werror --enable-pie --enable-checking=release --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new --enable-default-pie --enable-default-ssp --enable-bootstrap --enable-languages=c,c++,fortran,lto,objc,obj-c++,m2,d --with-abi=lp64d --with-arch=loongarch64 --with-tune=la464 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.2.0 20230727 (AOSC OS, Core) (GCC) **************************************************** Package 'tachyon' is currently not installed No legacy uninstaller found for 'tachyon'; nothing to do ******************************************************************************************************************************************* Error: Sorry, your platform isn't supported by Tachyon and/or Sage. Exiting... ******************************************************************************************************************************************* real 0m0.091s user 0m0.070s sys 0m0.019s ************************************************************************ Error installing package tachyon-0.98.9.p7 ************************************************************************ Please email sage-devel (http://groups.google.com/group/sage-devel) explaining the problem and including the log files /home/lwzheng/sagemath/sage-10.3/logs/pkgs/tachyon-0.98.9.p7.log and /home/lwzheng/sagemath/sage-10.3/config.log Describe your computer, operating system, etc. If you want to try to fix the problem yourself, *don't* just cd to /home/lwzheng/sagemath/sage-10.3/local/var/tmp/sage/build/tachyon-0.98.9.p7 and type 'make' or whatever is appropriate. Instead, the following commands setup all environment variables correctly and load a subshell for you to debug the error: (cd '/home/lwzheng/sagemath/sage-10.3/local/var/tmp/sage/build/tachyon-0.98.9.p7' && '/home/lwzheng/sagemath/sage-10.3/sage' --buildsh) When you are done debugging, you can type "exit" to leave the subshell. ************************************************************************ ```