Skip to content

Conversation

@vanzod
Copy link
Member

@vanzod vanzod commented Jan 20, 2017

If statically linking against the ncurses library built with separate terminfo library (i.e. configured with --with-termlib), Python building step fails to find required symbols unless the terminfo library is added to the linking paths.

if os.path.isfile(tinfo_static_lib):
readline = "readline readline.c %s %s %s" % (readline_static_lib, ncurses_static_lib, tinfo_static_lib)
else:
readline = "readline readline.c %s %s" % (readline_static_lib, ncurses_static_lib)
Copy link
Member

Choose a reason for hiding this comment

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

@vanzod I'd prefer avoiding to copy-paste as much as possible, how about this:

ncurses_static_libs = os.path.join(ncurses, ncurses_libdir, 'libncurses.a')
tinfo_static_lib = os.path.join(ncurses, ncurses_libdir, 'libtinfo.a')
# if libtinfo.a exists, we also need to link it in to resolve all ncurses symbols
if os.path.exists(tinfo_static_lib):
    ncurses_static_libs += ' ' + tinfo_static_lib
readline = "readline readline.c %s %s" % (readline_static_lib, ncurses_static_libs)

@boegel boegel added this to the 3.1.0 milestone Jan 21, 2017
@vanzod
Copy link
Member Author

vanzod commented Jan 23, 2017

@boegel Do not merge this PR yet since there are still issues with the terminfo library.

@boegel boegel modified the milestones: 3.2.0, 3.1.0 Jan 30, 2017
@boegel boegel modified the milestones: 3.3.0, 3.2.0 May 2, 2017
@vanzod
Copy link
Member Author

vanzod commented May 22, 2017

Closing as issue has been solved. See easybuilders/easybuild-easyconfigs#4049

@boegel
Copy link
Member

boegel commented Aug 10, 2017

@pforai Just mentioned to me that he was hitting the problem being fixed here after enabling the use of --add-dummy-to-minimal-toolchains with --minimal-toolchains.

Due to this, ncurses-6.0.eb is being picked up, where libtinfo.a is split off, as opposed to in the other ncurses easyconfigs.

So maybe this change should be applied after all?

@vanzod Did you run into other problems with the Python you obtained with this patch applied? Which other issues with the terminfo library made you put this on hold?

@vanzod
Copy link
Member Author

vanzod commented Aug 10, 2017

No, this fix does not solve the problem either since I still got an error because the libtinfo.a is not position independent despite -fPIC. See my Jan 23 comment in easybuilders/easybuild-easyconfigs#4049.

edit: see easybuilders/easybuild-easyconfigs#4049 (comment)

@ocaisa
Copy link
Member

ocaisa commented Aug 28, 2017

Hopefully this is solved with easybuilders/easybuild-easyconfigs#5067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants