Subject: libm compile problem, possible fix ...
To: None <>
From: d'red scientist <>
List: current-users
Date: 02/08/2001 14:41:19
hello all,
on my ss4 running -current with sources sup'ed last this morning
(2001.02.08) at 03:00 'make build' had been failing in libm with
the following:

cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -c -pg /usr/src/lib/libm/src/w_fmodf.c -o w_fmodf.po
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -c -fPIC -DPIC /usr/src/lib/libm/src/w_fmodf.c -o
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -c /usr/src/lib/libm/src/w_gamma.c cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -c -pg /usr/src/lib/libm/src/w_gamma.c -o w_gamma.po
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -c -fPIC -DPIC /usr/src/lib/libm/src/w_gamma.c -o
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS -c /usr/src/lib/libm/src/w_gamma_r.c
cc1: warnings being treated as errors
/usr/src/lib/libm/src/w_gamma_r.c:31: warning: no previous prototype for 'gamma_r'
*** Error code 1


On examining w_gamma_r.c and the include files i found the prototype in
"math.h" depended on _REENTRANT being defined.  adding a -D_REENTRANT
to the CPPFLAGS in the libm Makefile allowed it to build.

ikhala <d'red scientist>
Running NetBSD-current
Nuff said!!!