Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ toolchain = {'name': 'dummy', 'version': ''}
sources = ['lua-%s.tar.gz' % version.replace('-', '.')]
source_urls = ['http://sourceforge.net/projects/lmod/files/']

dependencies = [('ncurses', '6.0')]
builddependencies = [
('ncurses', '6.0'),
('libreadline', '6.3')
]

# Use static linking for ncurses so it's not a runtime dep
configopts = "--with-static=yes"

sanity_check_paths = {
'files': ["bin/lua"],
Expand Down
31 changes: 31 additions & 0 deletions easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
easyblock = 'ConfigureMake'

name = 'libreadline'
version = '6.3'

homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html'
description = """The GNU Readline library provides a set of functions for use by applications that
allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available.
The Readline library includes additional functions to maintain a list of previously-entered command lines,
to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands."""

toolchain = {'name': 'dummy', 'version': ''}

sources = ['readline-%(version)s.tar.gz']
source_urls = ['http://ftp.gnu.org/gnu/readline']

patches = ['libreadline-%(version)s-bugfix.patch']

dependencies = [('ncurses', '6.0')]

# for the termcap symbols, use EB ncurses
preconfigopts = "env LDFLAGS='-lncurses'"

sanity_check_paths = {
'files': ['lib/libreadline.a', 'lib/libhistory.a'] +
['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h',
'rlstdc.h', 'rltypedefs.h', 'tilde.h']],
'dirs': [],
}

moduleclass = 'lib'
7 changes: 4 additions & 3 deletions easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ sources = [SOURCE_TAR_GZ]

configopts = [
# default build
'--with-shared --enable-overwrite',
'--with-shared --enable-overwrite --with-termlib',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocaisa this should be reflected in the sanity_check_paths too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocaisa Why exactly was this required here? It makes this ncurses easyconfig that uses dummy different from the other ncurses easyconfigs, which causes problems (see also easybuilders/easybuild-easyblocks#1088).

I'm not saying we should blindly revert this change, since the split is already taken into account elsewhere (for example in https://github.com/easybuilders/easybuild-easyconfigs/pull/4977/files#diff-03dfb6d80d1923383727d96e696cc53fR20), just wondering what the exact reason was for this.

cc @pforai

Copy link
Member Author

@ocaisa ocaisa Aug 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only had to do this to be able to build lua at the dummy level, it was never an issue for me, it was an issue for the tests. (from what I remember)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for clarifying.

Looking back at the test report at https://gist.github.com/boegel/5c3303ac90ceea87960a213cf33fc024, building Lua-5.1.4-8.eb was indeed failing without the split:

gcc -o lua  lua.o liblua.a -lm -Wl,-E -ldl -Wl,-Bstatic -lhistory -lreadline -ltinfo -lncurses  -Wl,-Bdynamic
gcc -o luac  luac.o print.o liblua.a -lm -Wl,-E -ldl -Wl,-Bstatic -lhistory -lreadline -ltinfo -lncurses  -Wl,-Bdynamic
/usr/bin/ld: cannot find -ltinfo
/usr/bin/ld: cannot find -ltinfo

Maybe the proper fix would have been to not let Lua link with -ltinfo though...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vanzod
Ok, I think I have a fix for this but some may consider it hackish.

Some systems do expect a separate tinfo by default (Ubuntu 16.04) and in that case if we don't provide libtinfo from ncurses, some configures (such as the Lua one in the original PR) will pick it up from the OS. To get around this we can just do a soft link of libtinfo.so -> libncurses.so after installing ncurses which is what debian has done in the past.

I also found (what I think is) a problem with our libreadline easyconfigs. I'm not sure of the purpose of the linking to ncurses there, but if we are expecting ncurses to be force-linked in the final .so then we are not doing it right, the correct option ( for v6.3) is

buildopts = "SHLIB_LIBS='-lncurses'"

(from http://www.linuxfromscratch.org/lfs/view/7.4/chapter06/readline.html)

With those two options I can revert the ncurses build to be more like the rest. I'll open a PR and we can discuss further there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #5067

# the UTF-8 enabled version (ncursesw)
'--with-shared --enable-overwrite --enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/'
'--with-shared --enable-overwrite --with-termlib ' +
'--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/'
]

libs = ["form", "menu", "ncurses", "panel"]
libs = ["form", "menu", "ncurses", "panel", "tinfo"]
sanity_check_paths = {
'files': ['bin/%s' % x for x in ["captoinfo", "clear", "infocmp", "infotocap", "ncurses%(version_major)s-config",
"reset", "tabs", "tic", "toe", "tput", "tset"]] +
Expand Down