Hi Davide, On Wed, Jan 18, 2017 at 9:05 PM, Vanzo, Davide <[email protected]> wrote: > When trying to build Python-2.7.12-foss-2016b it fails with the error below. > > ========= > /usr/software/software/Compiler/GCC/5.4.0-2.26/libreadline/6.3/lib/libreadline.a > /usr/software/software/Core/ncurses/6.0/lib/libncurses.a -lm > ./libpython2.7.so: error: undefined reference to 'tputs' > ./libpython2.7.so: error: undefined reference to 'tgoto' > ./libpython2.7.so: error: undefined reference to 'tgetnum' > ./libpython2.7.so: error: undefined reference to 'PC' > ./libpython2.7.so: error: undefined reference to 'BC' > ./libpython2.7.so: error: undefined reference to 'UP' > ./libpython2.7.so: error: undefined reference to 'tgetent' > ./libpython2.7.so: error: undefined reference to 'tgetstr' > ./libpython2.7.so: error: undefined reference to 'tgetflag' > collect2: error: ld returned 1 exit status > make: *** [python] Error 1 > > ========== > > The weird thing is that libreadline.a contains such symbols when checking > with readelf. Has anyone had this problem before?
Yes, I've seen this before. That's why we link libreadline to ncurses. I'm surprise you get this error when both the static archive for libreadline and ncurses are include. So you are sure that those symbols exists in libncurses.a and it is defined? Can you try what happens if you put the paths for libncurses and libreadline before -lpython2.7? > On a side note, while digginig into libreadline and ncurses, I noticed that > although we want libreadline linked to our custom version of ncurses 6.0, it > gets actually linked to the system ncurses library. This can be solved by > modifying the easyconfig to read as follows: > > preconfigopts = 'env LDFLAGS="-lncurses -L$EBROOTNCURSES/lib"' > > Is it just me having this problem or can be something worth enhancing? That's definitely a bug. Please open an issue on github (or pull request). Ward

