pixell icon indicating copy to clipboard operation
pixell copied to clipboard

Understand why FFLAGS=-fPIC is required on some systems

Open msyriac opened this issue 7 years ago • 1 comments

msyriac avatar Nov 15 '18 23:11 msyriac

For future installation strugglers, on tiger and della I'll get a billion errors involving undefined references to python types if I attempt to build pixell, i.e.

input

python setup.py build_ext -i

output

[huge pile of errors]
...
    (.text+0x20): undefined reference to `main'
    build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/pixell/_interpol_32module.o: In function `double_from_pyobj':
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:128: undefined reference to `PyFloat_Type'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:128: undefined reference to `PyType_IsSubtype'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:136: undefined reference to `PyNumber_Float'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:146: undefined reference to `PyComplex_Type'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:146: undefined reference to `PyType_IsSubtype'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:158: undefined reference to `PyErr_Occurred'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:160: undefined reference to `PyErr_SetString'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-3.7/pixell/_interpol_32module.c:147: undefined reference to `PyObject_GetAttrString'
    /tigress/zequnl/shared/software/pixell/master/src/pixell/build/src.linux-x86_64-
...

This is resolved (thanks to Mat) as suggested above

export FFLAGS=-fPIC

xzackli avatar Feb 23 '20 19:02 xzackli