Skip to content

Debugging build errors

Mahrud Sayrafi edited this page Nov 10, 2023 · 1 revision

Start with building M2 with:

brew install M2 --build-bottle --keep-tmp

Once the build fails, you should see a message:

One sec, cleaning up...
==> Temporary files retained at:
/tmp/macaulay2-20231110-1218252-1y8ibl7

Navigate to the build directory inside the temporary directory:

cd /tmp/macaulay2-20231110-1218252-1y8ibl7
cd M2-release-1.22/M2/BUILD/build-brew/

Now you can use cmake and ninja to continue the build manually and see where the failure occurs:

cmake .
ninja install-packages

When opening an issue, please provide the relevant part of the build output; for instance:

 -- making example results for "oppositeRing"                               
 ulimit -c unlimited; ulimit -t 700; ulimit -m 850000; ulimit -s 8192; ulimit -n 512;  cd /tmp/M2-99240-0/34-rundir/; GC_MAXIMUM_HEAP_SIZE=400M "/tmp/macaulay2-20231110-1218252-1y8ibl7/M2-release-1.22/M2/BUILD/build-brew//usr-dist/x86_64-Linux-Ubuntu-22.04/bin/M2-binary" -q --no-randomize --no-readline --silent --stop --print-width 77 -e 'needsPackage("AssociativeAlgebras",Reload=>true,FileName=>"/home/runner/work/M2/M2/M2/Macaulay2/packages/AssociativeAlgebras.m2")' <"/tmp/M2-99240-0/0_opposite__Ring.m2" >>"/tmp/macaulay2-20231110-1218252-1y8ibl7/M2-release-1.22/M2/BUILD/build-brew//usr-dist/common/share/doc/Macaulay2/AssociativeAlgebras/example-output/_opposite__Ring.errors" 2>&1
/tmp/macaulay2-20231110-1218252-1y8ibl7/M2-release-1.22/M2/BUILD/build-brew//usr-dist/common/share/doc/Macaulay2/AssociativeAlgebras/example-output/_opposite__Ring.errors:0:1:(3):[12]: (output file) error: Macaulay2 killed by signal 6
/tmp/M2-99240-0/0_opposite__Ring.m2:0:1: (input file)
M2: *** Error 6
 -- 2.6642 seconds elapsed

And attach the error file indicated in the above message:

/tmp/macaulay2-20231110-1218252-1y8ibl7/M2-release-1.22/M2/BUILD/build-brew/usr-dist/common/share/doc/Macaulay2/AssociativeAlgebras/example-output/_opposite__Ring.errors
Clone this wiki locally