Bug #260

Ubuntu 12.04: can not locate the readline and ncurses libraries

Added by Knödlseder Jürgen almost 12 years ago. Updated over 6 years ago.

Status:NewStart date:06/30/2012
Priority:UrgentDue date:
Assigned To:Knödlseder Jürgen% Done:

0%

Category:-
Target version:-
Duration:

Description

Although the libraries are installed in the /lib/x86_64-linux-gnu folder, the configure step could not locate the libraries and thus disables the readline support.

We should modify configure so that the libraries are correctly detected.

config1.log (50.7 KB) Knödlseder Jürgen, 07/27/2017 01:15 PM

config2.log (52.3 KB) Knödlseder Jürgen, 07/27/2017 01:15 PM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen almost 7 years ago

  • Assigned To set to Knödlseder Jürgen
  • Priority changed from Normal to Urgent
  • Target version set to 1.4.0

In addition there are complaints about errors during the unit test. These seem to be related to not finding the cfitsio library.

On the CI Ubuntu 12.04 system the cfitsio library is installed into /usr/lib/x86_64-linux-gnu/libcfitsio.so. Testing for which directories are searched for gives the following:

$ cat /etc/ld.so.conf.d/*
# libc default configuration
/usr/local/lib
/usr/lib/vmware-tools/lib32/libvmGuestLib.so
/usr/lib/vmware-tools/lib64/libvmGuestLib.so
/usr/lib/vmware-tools/lib32/libvmGuestLibJava.so
/usr/lib/vmware-tools/lib64/libvmGuestLibJava.so
/usr/lib/vmware-tools/lib32/libDeployPkg.so
/usr/lib/vmware-tools/lib64/libDeployPkg.so
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa

#2 Updated by Knödlseder Jürgen almost 7 years ago

Trying to compile the following simple program

int main (int argc, char *argv[])
{
    // Initialise return code
    int rc = 1;

    // Return
    return rc;
}
on the Ubuntu 12.04 CI VM I get the following:
$ gcc main.cpp -lncurses
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
$ gcc main.cpp -L/lib/x86_64-linux-gnu -lncurses
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
$ gcc main.cpp -L/lib/x86_64-linux-gnu -lreadline
$ gcc main.cpp -L/lib/x86_64-linux-gnu -lcfitsio
So for some reason the ncurses library cannot be found, but the readline library can. Here what is in the /lib/x86_64-linux-gnu folder:
libreadline.so.6 -> libreadline.so.6.2
libreadline.so.6.2
libncurses.so.5 -> libncurses.so.5.9
libncurses.so.5.9

Note that this problem does not seem to occur on Ubuntu 16.

#3 Updated by Knödlseder Jürgen almost 7 years ago

Note that at least on Ubuntu the ncurses library seems not to be needed:

$ ldd /lib/x86_64-linux-gnu/libreadline.so.6
    linux-vdso.so.1 =>  (0x00007fff0dfff000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007ff24866e000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff2482af000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff248ae9000)
But on my Mac I get
$ otool -L /usr/lib/libedit.3.dylib
/usr/lib/libedit.3.dylib:
    /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
    /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.0.0)

#4 Updated by Knödlseder Jürgen almost 7 years ago

Attached the configuration files for the two persons who reported problems on Ubuntu. In the first case the system is Ubuntu 12.04 with a 32 Bit architecture. In the second case the system is Ubuntu (probably 14.04) with a 64 Bit architecture. So the problem seems to occur invariably on both architectures.

#5 Updated by Knödlseder Jürgen over 6 years ago

  • Target version changed from 1.4.0 to 1.5.0

#6 Updated by Knödlseder Jürgen over 6 years ago

  • Target version deleted (1.5.0)

Also available in: Atom PDF