Re: [easybuild] Python-2.7.12-foss-2016b undefined references

2017-01-19 Thread Alan O'Cais
He's using ncurses at dummy level and this does have the split tinfo lib...it 
was required to fix a build problem for a statically linked Lmod on some 
systems, see the mentioned PR

On 19 Jan 2017 2:39 pm, "Ward Poelmans" 
> wrote:
On 18-01-17 22:16, Vanzo, Davide wrote:
> Ward,
> the symbols exist in the libreadline.a, not in libncurses.a as you can
> see here:
>
> $ readelf --syms
> /usr/software/software/Compiler/GCC/5.4.0-2.26/libreadline/6.3/lib/libreadline.a
> | grep 'tputs\|tgoto\|tgetnum\|PC\|BC\|UP\|tgetent\|tgetstr\|tgetflag'
>97:  0 NOTYPE  GLOBAL DEFAULT  UND tputs
>   127:  0 NOTYPE  GLOBAL DEFAULT  UND tgoto
>70:  0 NOTYPE  GLOBAL DEFAULT  UND tgetnum
>97:  0 NOTYPE  GLOBAL DEFAULT  UND PC
>99:  0 NOTYPE  GLOBAL DEFAULT  UND BC
>   100:  0 NOTYPE  GLOBAL DEFAULT  UND UP
>   101:  0 NOTYPE  GLOBAL DEFAULT  UND tgetent
>   102:  0 NOTYPE  GLOBAL DEFAULT  UND tgetstr
>   104:  0 NOTYPE  GLOBAL DEFAULT  UND tgetflag
>   118:  0 NOTYPE  GLOBAL DEFAULT  UND tputs

The 'UND' means that the library needs the symbol but doesn't have it.

> $ readelf --syms
> /usr/software/software/Core/ncurses/6.0/lib/libncurses.a | grep
> 'tputs\|tgoto\|tgetnum\|PC\|BC\|UP\|tgetent\|tgetstr\|tgetflag'
>28:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
>41:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
>14:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
>25:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp

This is weird, they should be here. It can be put the libtinfo library
but the current easyconfigs don't build it. Can you share the build log
of ncurses? And check if they are in the .so version?

Ward





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt





Re: [easybuild] Python-2.7.12-foss-2016b undefined references

2017-01-19 Thread Ward Poelmans
On 18-01-17 22:16, Vanzo, Davide wrote:
> Ward,
> the symbols exist in the libreadline.a, not in libncurses.a as you can
> see here:
> 
> $ readelf --syms
> /usr/software/software/Compiler/GCC/5.4.0-2.26/libreadline/6.3/lib/libreadline.a
> | grep 'tputs\|tgoto\|tgetnum\|PC\|BC\|UP\|tgetent\|tgetstr\|tgetflag'
>97:  0 NOTYPE  GLOBAL DEFAULT  UND tputs
>   127:  0 NOTYPE  GLOBAL DEFAULT  UND tgoto
>70:  0 NOTYPE  GLOBAL DEFAULT  UND tgetnum
>97:  0 NOTYPE  GLOBAL DEFAULT  UND PC
>99:  0 NOTYPE  GLOBAL DEFAULT  UND BC
>   100:  0 NOTYPE  GLOBAL DEFAULT  UND UP
>   101:  0 NOTYPE  GLOBAL DEFAULT  UND tgetent
>   102:  0 NOTYPE  GLOBAL DEFAULT  UND tgetstr
>   104:  0 NOTYPE  GLOBAL DEFAULT  UND tgetflag
>   118:  0 NOTYPE  GLOBAL DEFAULT  UND tputs

The 'UND' means that the library needs the symbol but doesn't have it.

> $ readelf --syms
> /usr/software/software/Core/ncurses/6.0/lib/libncurses.a | grep
> 'tputs\|tgoto\|tgetnum\|PC\|BC\|UP\|tgetent\|tgetstr\|tgetflag'
>28:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
>41:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
>14:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
>25:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp

This is weird, they should be here. It can be put the libtinfo library
but the current easyconfigs don't build it. Can you share the build log
of ncurses? And check if they are in the .so version?

Ward


Re: [easybuild] Python-2.7.12-foss-2016b undefined references

2017-01-18 Thread Vanzo, Davide
Alan,
thanks for pointing me to that PR. That "--with-termlib" is the problem. With 
that option the symbols are stripped on a separate library file (libtinfo.a) 
and the linking fails when building against the ncurses-6.0.eb build.

Since this is not a local problem I have created a dedicated issue here:

https://github.com/hpcugent/easybuild-easyconfigs/issues/4049

DV


On Jan 18 2017, at 3:12 pm, Alan O'Cais  wrote:
This sounds like it might be somehow related to 
https://github.com/hpcugent/easybuild-easyconfigs/pull/3545

On 18 Jan 2017 9:05 pm, "Vanzo, Davide" 
> wrote:
When trying to build Python-2.7.12-foss-2016b it fails with the error below.

=

gcc -L/usr/software/software/Core/GCCcore/5.4.0/lib64 
-L/usr/software/software/Core/GCCcore/5.4.0/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/OpenBLAS/0.2.18-LAPACK-3.6.1/lib
 
-L/usr/software/software/MPI/GCC/5.4.0-2.26/OpenMPI/1.10.3/ScaLAPACK/2.0.2-OpenBLAS-0.2.18-LAPACK-3.6.1/lib
 -L/usr/software/software/MPI/GCC/5.4.0-2.26/OpenMPI/1.10.3/FFTW/3.3.4/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/bzip2/1.0.6/lib 
-L/usr/software/software/Core/zlib/1.2.8/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/libreadline/6.3/lib 
-L/usr/software/software/Core/ncurses/6.0/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/SQLite/3.13.0/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/Tk/8.6.5/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/GMP/6.1.1/lib 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/libffi/3.2.1/lib64 
-L/usr/software/software/Compiler/GCC/5.4.0-2.26/libffi/3.2.1/lib -Xlinker 
-export-dynamic -o python \
Modules/python.o \
-L. -lpython2.7 -ldl -lm -lpthread -lutil 
/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?

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?


--
Davide Vanzo, PhD
Application Developer
Adjunct Assistant Professor of Chemical and Biomolecular Engineering
Advanced Computing Center for Research and Education (ACCRE)
Vanderbilt University - Hill Center 201
(615)-875-9137
www.accre.vanderbilt.edu




Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt





Re: [easybuild] Python-2.7.12-foss-2016b undefined references

2017-01-18 Thread Vanzo, Davide
Ward,
the symbols exist in the libreadline.a, not in libncurses.a as you can see here:

$ readelf --syms 
/usr/software/software/Compiler/GCC/5.4.0-2.26/libreadline/6.3/lib/libreadline.a
 | grep 'tputs\|tgoto\|tgetnum\|PC\|BC\|UP\|tgetent\|tgetstr\|tgetflag'
   97:  0 NOTYPE  GLOBAL DEFAULT  UND tputs
  127:  0 NOTYPE  GLOBAL DEFAULT  UND tgoto
   70:  0 NOTYPE  GLOBAL DEFAULT  UND tgetnum
   97:  0 NOTYPE  GLOBAL DEFAULT  UND PC
   99:  0 NOTYPE  GLOBAL DEFAULT  UND BC
  100:  0 NOTYPE  GLOBAL DEFAULT  UND UP
  101:  0 NOTYPE  GLOBAL DEFAULT  UND tgetent
  102:  0 NOTYPE  GLOBAL DEFAULT  UND tgetstr
  104:  0 NOTYPE  GLOBAL DEFAULT  UND tgetflag
  118:  0 NOTYPE  GLOBAL DEFAULT  UND tputs

$ readelf --syms /usr/software/software/Core/ncurses/6.0/lib/libncurses.a | 
grep 'tputs\|tgoto\|tgetnum\|PC\|BC\|UP\|tgetent\|tgetstr\|tgetflag'
   28:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
   41:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
   14:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp
   25:  0 NOTYPE  GLOBAL DEFAULT  UND tputs_sp

Davide

On Jan 18 2017, at 2:56 pm, Ward Poelmans  wrote:

Hi Davide,

On Wed, Jan 18, 2017 at 9:05 PM, Vanzo, Davide
 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


Re: [easybuild] Python-2.7.12-foss-2016b undefined references

2017-01-18 Thread Ward Poelmans
Hi Davide,

On Wed, Jan 18, 2017 at 9:05 PM, Vanzo, Davide
 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