I tried again today and it worked. It really was a -fPIC question. I found that "python3 setup.py clean" does not clean all * .so files, so my previous experiments never actually restore them. So here is what you need to do:
(0) download the latest numpy source package and unzip it
(1) Make sure Python.h is first in the following files
numpy/core/src/multiarray/methods.c numpy/core/src/umath/test_rational.c.src numpy/core/src/umath/operand_flag_test.c.src
The following do not include Python.h at all and must have compilation for them:
numpy/core/src/npysort/heapsort.c.src numpy/core/src/npysort/quicksort.c.src numpy/core/src/npysort/mergesort.c.src
(2)
export CC="gcc -fPIC"
(3)
python3 setup.py build
(4)
python3 setup.py install
source share