From 98b6e788727889dcde33ffe52b9bf8f2d5309c6a Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Mon, 5 Jan 2026 16:46:15 +0100 Subject: [PATCH 1/4] add g++ to fix build error Added build-essential package for compilation. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 553cc57f..af564005 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,8 @@ ADD doc /app/doc ADD tutorials /app/doc ADD MANIFEST.in LICENSE LICENSE.txt .gitmodules .gitignore setup.py /app/ +# add compiler +RUN apt-get update && apt-get install -y build-essential # compile/setup pytom RUN python setup.py install --prefix $CONDA_PREFIX From 65c1f32ca8f4fb2af6467f0e05001cd623927fc5 Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Mon, 5 Jan 2026 16:52:42 +0100 Subject: [PATCH 2/4] Add stdlib.h include for standard library functions --- pytom/pytomc/sh_alignment/SpharmonicKit27/test_stability_naive.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pytom/pytomc/sh_alignment/SpharmonicKit27/test_stability_naive.c b/pytom/pytomc/sh_alignment/SpharmonicKit27/test_stability_naive.c index 3321095d..bd2d41db 100644 --- a/pytom/pytomc/sh_alignment/SpharmonicKit27/test_stability_naive.c +++ b/pytom/pytomc/sh_alignment/SpharmonicKit27/test_stability_naive.c @@ -61,6 +61,7 @@ #include #include +#include #include "naive_synthesis.h" From e5fe2c8cf4806db577ec26105a5891fc9c785fed Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Mon, 5 Jan 2026 17:01:13 +0100 Subject: [PATCH 3/4] Update function signatures for get_rot_matrix and deviation_cosine as suggested by copilot --- pytom/pytomc/sh_alignment/frm/src/lib_eul.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pytom/pytomc/sh_alignment/frm/src/lib_eul.c b/pytom/pytomc/sh_alignment/frm/src/lib_eul.c index 986736fe..9ee498ff 100644 --- a/pytom/pytomc/sh_alignment/frm/src/lib_eul.c +++ b/pytom/pytomc/sh_alignment/frm/src/lib_eul.c @@ -379,8 +379,8 @@ void eu_lattman (double eu_range[3][2], double delta, unsigned long *eu_count, f double sparsing_cosine = cos(0.5*delta*ROT_CONV); /* suggested Lattman sparsing tolerance: 0.5 delta */ - double deviation_cosine(); - void get_rot_matrix(); + double deviation_cosine(double [3][3], double [3][3); + void get_rot_matrix(double [3][3], double, double, double); psi_steps = (int)ceil((eu_range[0][1]-eu_range[0][0])/delta); theta_steps = (int)ceil((eu_range[1][1]-eu_range[1][0])/delta); @@ -485,8 +485,8 @@ char similar_eulers(double a1,double a2,double a3,double b1,double b2,double b3) /* checks if two orientations are within 1 degree */ /* this can be slow if one of the orientations remains the same in a loop */ - void get_rot_matrix (); - double deviation_cosine (); + void get_rot_matrix (double [3][3], double, double, double); + double deviation_cosine (double [3][3], double [3][3); double matrix1[3][3],matrix2[3][3]; From f78e833dc2123b2cabac8d94a4a9eba0c02695b4 Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Mon, 5 Jan 2026 17:04:22 +0100 Subject: [PATCH 4/4] Modify get_rot_matrix declaration in frm.c Updated the function declaration of get_rot_matrix to include parameters for rotation matrices and angles. As sugested by copilot --- pytom/pytomc/sh_alignment/frm/swig/frm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytom/pytomc/sh_alignment/frm/swig/frm.c b/pytom/pytomc/sh_alignment/frm/swig/frm.c index 4b63eef3..106a21a8 100644 --- a/pytom/pytomc/sh_alignment/frm/swig/frm.c +++ b/pytom/pytomc/sh_alignment/frm/swig/frm.c @@ -723,7 +723,7 @@ static double distance_eulers(unsigned long i, unsigned long j, double *corr[]){ /* returns the distance between the rotations given by the Euler angles in corr[1,2,3][i] and corr[1,2,3][j] */ - extern void get_rot_matrix (); + extern void get_rot_matrix (double [3][3], double, double, double); double matrix1[3][3],matrix2[3][3]; int k, l; double temp, trace; @@ -748,7 +748,7 @@ static double distance_eulers(unsigned long i, unsigned long j, double *corr[]){ double angle_distance(double a1, double a2, double a3, double b1, double b2, double b3) /* psi, the, phi order */ { - extern void get_rot_matrix (); + extern void get_rot_matrix (double [3][3], double, double, double); double matrix1[3][3],matrix2[3][3]; int k, l; double temp, trace;