tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Math/gsl compilation hangs



I’m trying to build math/gsl on my Mac, but clang (Apple clang version 12.0.0 (clang-1200032.29) hangs when libtool compiles randist/discrete.c. It comes down to, I think, accessing this data structure:
typedef struct {
 size_t N; /* max number of elts on stack */
 size_t *v; /* array of values on the stack */
 size_t i; /* index of top of stack */
} gsl_stack_t;
in this function:
static int
push_stack(gsl_stack_t *s, size_t v)
{
 if ((s->i) >= (s->N)) {
 return -1; /* stack overflow (shouldn't happen) */
 }
 (s->v)[s->i] = v;
 s->i += 1;
 return 0;
}
I am not seeing anything wrong with this code, but perhaps something subtle is off. In any case, the compilation hangs here:
/Users/brook/Pkgsrc/pkg-2023Q2/bin/mksh ../libtool --tag=CC --mode=compile clang -DHAVE_CONFIG_H -I. -I.. -I.. -O2 -march=native -MT discrete.lo -MD -MP -MF .deps/discrete.Tpo -c -o discrete.lo discrete.c
libtool: compile: clang -DHAVE_CONFIG_H -I. -I.. -O2 -march=native -MT discrete.lo -MD -MP -MF .deps/discrete.Tpo -c discrete.c -fno-common -DPIC -o .libs/discrete.o
Various modifications of the push_stack() function body (and nothing else) allow compilation to complete, but anything that accesses the elements of s seems to hang the process.
Any ideas?
Cheers,
Brook


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /