configure: error: --with-ssl was given, but OpenSSL wasn't found on ubuntu 20.04? - linux

I have try to compile and build libcurl inside my toolcahin folder by using cross compile but always I got same error...
1-First I build openssl by this steps
export TOOLCHAIN=/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
export CC=$TOOLCHAIN/bin/arm-linux-gnueabi-gcc-7.5.0
export RANLIB=$TOOLCHAIN/bin/arm-linux-gnueabi-ranlib
export PATH="$TOOLCHAIN/bin:$PATH"
./Configure linux-generic32 --prefix=$TOOLCHAIN/arm-linux-gnueabi/libc/usr no-async
make depends
make
make install
.
.
.
cp libcrypto.pc /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig
chmod 644 /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig/libcrypto.pc
cp libssl.pc /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig
chmod 644 /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig/libssl.pc
cp openssl.pc /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig
chmod 644 /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig/openssl.pc
.
.
.
~/$ ls -n from gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
total 36
drwxr-xr-x 6 raed raed 4096 نوف 26 12:31 arm-linux-gnueabi
drwxr-xr-x 2 raed raed 4096 ديس 4 2019 bin
-rw-r--r-- 1 raed raed 11287 ديس 4 2019 gcc-linaro-7.5.0-2019.12-linux-manifest.txt
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 include
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 lib
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 libexec
drwxr-xr-x 8 raed raed 4096 ديس 4 2019 share
~/$ ls -n from arm-linux-gnueabi/libc/usr
total 28
drwxr-xr-x 2 raed raed 4096 نوف 26 12:18 bin
drwxr-xr-x 34 raed raed 4096 نوف 26 12:18 include
drwxr-xr-x 6 raed raed 4096 نوف 26 12:18 lib
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 libexec
drwxr-xr-x 2 raed raed 4096 ديس 4 2019 sbin
drwxr-xr-x 5 raed raed 4096 ديس 4 2019 share
drwxrwxr-x 6 raed raed 4096 نوف 26 12:18 ssl
2-Then I have try to build libcurl with--ssl but I have got error
cd curl-7.72.0
export TOOLCHAIN=/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
export CC=$TOOLCHAIN/bin/arm-linux-gnueabi-gcc-7.5.0
export RANLIB=$TOOLCHAIN/bin/arm-linux-gnueabi-ranlib
export PATH="$TOOLCHAIN/bin:$PATH"
./configure --with-ssl=/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr --host=arm-linux-gnueabi
.
.
.
configure: PKG_CONFIG_LIBDIR will be set to "/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/lib/pkgconfig"
checking for arm-linux-gnueabi-pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto"
configure: pkg-config: SSL_LDFLAGS: "-L/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/lib"
configure: pkg-config: SSL_CPPFLAGS: "-I/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/include"
checking for HMAC_Update in -lcrypto... no
checking for HMAC_Init_ex in -lcrypto... no
checking OpenSSL linking with -ldl... no
checking OpenSSL linking with -ldl and -lpthread... no
configure: OPT_SSL: /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr
configure: OPENSSL_ENABLED:
configure: error: --with-ssl was given but OpenSSL could not be detected
P.s: same steps work just fine on ubuntu 18.04

There are a lot of different ways to build libcurl with openssl support, and this may not be immediate to find out what is causing this issue.
But here is the procedure I am using on Ubuntu 20.04.1 - You may have to adjust the content of the CROSS_COMPILE variable, since you are using the arm-linux-gnueabi toolchain, and not the arm-none-linux-gnueabihf one: I am using the gcc toolchain for Cortex-A from ARM.
The versions of curl and openssl may have to be adjusted as well.
CROSS_COMPILE=/opt/arm/9/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
PREFIX=$(pwd)/sysroot
wget https://www.openssl.org/source/openssl-1.1.1h.tar.gz
tar zxf openssl-1.1.1h.tar.gz
pushd openssl-1.1.1h
./Configure linux-generic32 shared -DL_ENDIAN --prefix=${PREFIX} --openssldir=${PREFIX} shared
make CROSS_COMPILE=/opt/arm/9/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf- PROCESSOR=ARM install
popd
wget https://zlib.net/zlib-1.2.11.tar.gz
tar xvf zlib-1.2.11.tar.gz
pushd zlib-1.2.11
CC=${CROSS_COMPILE}gcc ./configure --prefix=${PREFIX}
make CC=${CROSS_COMPILE}gcc all install
popd
wget https://curl.haxx.se/download/curl-7.73.0.tar.gz
tar zxf curl-7.73.0.tar.gz
pushd curl-7.73.0
CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld AR=${CROSS_COMPILE}ar NM=${CROSS_COMPILE}nm AS=${CROSS_COMPILE}as ./configure --disable-static --enable-shared --with-ssl=${PREFIX} --prefix=${PREFIX} --host=arm-none-linux-gnueabihf --target=arm-none-linux-gnueabihf --without-libidn2
make CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld AR=${CROSS_COMPILE}ar NM=${CROSS_COMPILE}nm AS=${CROSS_COMPILE}as install
popd
ll -gG sysroot/lib/
total 6796
drwxrwxr-x 4 4096 Nov 16 08:10 ./
drwxrwxr-x 9 4096 Nov 16 07:53 ../
drwxrwxr-x 2 4096 Nov 16 07:53 engines-1.1/
-rw-r--r-- 1 3199974 Nov 16 07:53 libcrypto.a
lrwxrwxrwx 1 16 Nov 16 07:53 libcrypto.so -> libcrypto.so.1.1*
-rwxr-xr-x 1 2087864 Nov 26 07:53 libcrypto.so.1.1*
-rwxr-xr-x 1 1027 Nov 26 08:10 libcurl.la*
lrwxrwxrwx 1 16 Nov 26 08:10 libcurl.so -> libcurl.so.4.7.0*
lrwxrwxrwx 1 16 Nov 26 08:10 libcurl.so.4 -> libcurl.so.4.7.0*
-rwxr-xr-x 1 407748 Nov 26 08:10 libcurl.so.4.7.0*
-rw-r--r-- 1 578076 Nov 26 07:53 libssl.a
lrwxrwxrwx 1 13 Nov 26 07:53 libssl.so -> libssl.so.1.1*
-rwxr-xr-x 1 453684 Nov 26 07:53 libssl.so.1.1*
-rw-r--r-- 1 96210 Nov 26 07:51 libz.a
lrwxrwxrwx 1 14 Nov 26 07:51 libz.so -> libz.so.1.2.11*
lrwxrwxrwx 1 14 Nov 26 07:51 libz.so.1 -> libz.so.1.2.11*
-rwxr-xr-x 1 98708 Nov 26 07:51 libz.so.1.2.11*
drwxrwxr-x 2 4096 Nov 26 08:10 pkgconfig/
file sysroot/bin/curl
sysroot/bin/curl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped
share edit delete flag

Thank you ..
I solve the issue ...
The problem is with zlib need to build it inside toolchain and add this in configure seetings
--with-zlib=$prefix/lib

Related

Change directory ownership in linux

The uploads directory is not writeable by a browser because of ownership.
-rw-rw-r-- 1 masud masud 28 Mar 23 15:46 index.php
drwxrwxr-x 4 masud masud 4096 Mar 23 15:46 languages
drwxrwxr-x 11 masud masud 4096 Mar 23 16:16 plugins
drwxrwxr-x 3 masud masud 4096 Mar 23 16:11 themes
drwxrwxr-x 4 masud masud 4096 Mar 7 13:14 uploads
I want to change the ownership of the uploads directory.
it will change the ownership of that directory
sudo chmod -R 0777 directory_name

Linux: Can't find existing shared library in docker container

I try to set up FastRTPS inside a docker container. I wrote a Dockerfile which builds FastRTPS and it's dependencies from source and installs the libraries and delivered examples. But the examples do not work:
/opt# /usr/local/examples/C++/HelloWorldExample/bin/HelloWorldExample
/usr/local/examples/C++/HelloWorldExample/bin/HelloWorldExample: error while loading shared libraries: libfastrtps.so.1: cannot open shared object file: No such file or directory
As these library was built in this container and automatically installed, it must be somewhere and they are here:
root#6e544f0699cf:/opt# ls -la /usr/local/lib/
total 9196
drwxr-xr-x 1 root root 4096 Mar 26 22:02 .
drwxr-xr-x 1 root root 4096 Mar 26 22:02 ..
drwxr-xr-x 3 root root 4096 Mar 26 22:00 cmake
drwxr-xr-x 3 root root 4096 Mar 26 22:00 foonathan_memory
lrwxrwxrwx 1 root root 15 Mar 26 22:00 libfastcdr.so -> libfastcdr.so.1
lrwxrwxrwx 1 root root 20 Mar 26 22:00 libfastcdr.so.1 -> libfastcdr.so.1.0.12
-rw-r--r-- 1 root root 99504 Mar 26 22:00 libfastcdr.so.1.0.12
lrwxrwxrwx 1 root root 16 Mar 26 22:02 libfastrtps.so -> libfastrtps.so.1
lrwxrwxrwx 1 root root 21 Mar 26 22:02 libfastrtps.so.1 -> libfastrtps.so.1.10.0
-rw-r--r-- 1 root root 8133952 Mar 26 22:01 libfastrtps.so.1.10.0
-rw-r--r-- 1 root root 1158048 Mar 26 22:00 libfoonathan_memory-0.6.2.a
drwxrwsr-x 3 root staff 4096 Mar 26 21:37 python3.7
It is also possible to look into this library # nm -D /usr/local/lib/libfastrtps.so.1.
But the output of ldconfig is a bit strange:
# ldconfig -v | grep /usr/local/lib
ldconfig: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
ldconfig: Path `/lib/x86_64-linux-gnu' given more than once
ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once
ldconfig: /lib/x86_64-linux-gnu/ld-2.28.so is the dynamic linker, ignoring
/usr/local/lib:
Here I expected the libraries listed but they are not.
How to fix that?
EDIT 1
some extractions from the make output while building FastRTPS:
...
-- Installing: /usr/local/lib/libfastrtps.so.1.10.0
-- Installing: /usr/local/lib/libfastrtps.so.1
-- Installing: /usr/local/lib/libfastrtps.so
...
-- Installing: /usr/local/examples/C++/HelloWorldExample/bin/HelloWorldExample
-- Set runtime path of "/usr/local/examples/C++/HelloWorldExample/bin/HelloWorldExample" to ""
Why the runtime path is set to "" - nothing?
The last edit led to the issue and also to the solution.
CMake removes the RPATH. In case of the usage within a docker container, this stripping makes no sense and can be turned off as described in this post by adding this argument to the CMake configuration call:
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
At the end my Dockerfile looks like this:
FROM fastrtps-core
WORKDIR /opt
RUN git clone https://github.com/eProsima/Fast-RTPS.git && \
export LDFLAGS="-Wl,--copy-dt-needed-entries" && \
mkdir build && \
cd build && \
cmake ../Fast-RTPS/examples \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE && \
cmake --build . --target install -j 16 && \
cd /opt && \
rm -rf build Fast-RTPS
Now the install-step output shows the correct runtime-path setting:
-- Installing: /usr/local/examples/C++/HelloWorldExample/HelloWorldExample
-- Set runtime path of "/usr/local/examples/C++/HelloWorldExample/HelloWorldExample" to "/usr/local/lib"

Libcurl not updated

I am on Ubuntu 14.04 and need curl version > 7.40 so I have followed some steps to install latest curl version (7.48)
As root
wget http://curl.haxx.se/download/curl-7.48.0.tar.gz
apt-get install libtool
apt-get install make
Extracted the file
tar -xvf curl-7.48.0.tar.gz
then in the extracted folder:
./buildconf
./configure
make
make install
Updated the binaries
mv /usr/bin/curl /usr/bin/curl.bak
cp /usr/local/bin/curl /usr/bin/curl
then restarted the machine.
I can see the new curl version but the libcurl library is not updated, is still 7.35
root:~# curl -V
curl 7.48.0 (x86_64-unknown-linux-gnu) libcurl/7.35.0, OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
I've checked the file /etc/ld.so.conf
but it doesn't give me much info
include /etc/ld.so.conf.d/*.conf
As well the folder:
root:/etc/ld.so.conf.d# ll
total 52
drwxr-xr-x 2 root root 4096 Feb 18 14:17 ./
drwxr-xr-x 167 root root 12288 Apr 26 14:30 ../
-rwxr-xr-x 1 root root 26 Nov 21 2007 agnclient-compat.conf*
-rw-r--r-- 1 root root 14 Aug 24 2009 agns.conf
-rw-rw-r-- 1 root root 38 Mar 24 2014 fakeroot-x86_64-linux-gnu.conf
lrwxrwxrwx 1 root root 40 Feb 5 16:42 i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf
-rw-r--r-- 1 root root 108 Apr 12 2014 i686-linux-gnu.conf
-rw-r--r-- 1 root root 44 Aug 9 2009 libc.conf
-rw-r--r-- 1 root root 33 Aug 1 2014 symav.conf
-rw-r--r-- 1 root root 68 Apr 12 2014 x86_64-linux-gnu.conf
lrwxrwxrwx 1 root root 43 Feb 3 12:05 x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf
lrwxrwxrwx 1 root root 42 Feb 3 12:05 x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
-rw-r--r-- 1 root root 56 Apr 12 2014 zz_i386-biarch-compat.conf
-rw-r--r-- 1 root root 58 Apr 12 2014 zz_x32-biarch-compat.conf
root:/etc/ld.so.conf.d#
Update
going through each conf file I have found 3 places where there is libcurl library
under /usr/lib/agnclient-compat (agnclient is an AT&T VPN agent client)
lrwxrwxrwx 1 root root 16 Feb 3 12:11 libcurl.so.3 -> libcurl.so.3.0.0
-rw-r--r-- 1 root root 248028 Nov 21 2007 libcurl.so.3.0.0
under /usr/local/lib
lrwxrwxrwx 1 root root 16 Apr 25 12:34 libcurl.so -> libcurl.so.4.4.0*
lrwxrwxrwx 1 root root 16 Apr 25 12:34 libcurl.so.4 -> libcurl.so.4.4.0*
-rwxr-xr-x 1 root root 376889 Apr 25 12:34 libcurl.so.4.4.0*
and under /usr/lib/x86_64-linux-gnu
lrwxrwxrwx 1 root root 19 Jan 26 20:05 libcurl-gnutls.so.3 -> libcurl-gnutls.so.4
lrwxrwxrwx 1 root root 23 Jan 26 20:05 libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.3.0
-rw-r--r-- 1 root root 401512 Jan 26 20:05 libcurl-gnutls.so.4.3.0
lrwxrwxrwx 1 root root 12 Jan 26 20:05 libcurl.so.3 -> libcurl.so.4
lrwxrwxrwx 1 root root 16 Jan 26 20:05 libcurl.so.4 -> libcurl.so.4.3.0
-rw-r--r-- 1 root root 422696 Jan 26 20:05 libcurl.so.4.3.0
So the latest lib which I've installed yesterday is under /usr/local/lib, but it loads the one from the VPN client.
It was an easy fix after the update.
I've modified the file /etc/ld.so.conf
include /usr/local/lib
include /etc/ld.so.conf.d/*.conf
then executed
ldconfig -v
Now I have what I need
root#carlo-ThinkPad-W541:~# curl -V
curl 7.48.0 (x86_64-unknown-linux-gnu) libcurl/7.48.0 zlib/1.2.8
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Features: IPv6 Largefile libz UnixSockets

OSX Homebrew /usr/local permisions for node

I have installed homebrew without any problems.
The problem was to install node.. I got permission errors about /usr/local directory and symlinks.
So I did
sudo chown -R myuser /usr/local
then I istalled node without problems and then I did
sudo chown -R root /usr/local
I don't remember how was the owners in first place. I just followed some suggestions from stackoverflow to change the owner of /usr/local (a voice inside me says I did bad).
So when I run
brew doctor
I got some warnings and suggestions to chown some folders in /usr/local directory, so I did them. Then when I run
brew doctor
brew update
I get no warnings or errors anymore and looks fine (there was no updates to do after all).
My directories now looks like below. Can anyone confirm if is secure like that? How should be the owners in /usr/local ? Tt's okay to have it owned by my user as they say at github? Thanks.
myuser#iMac:/usr$ ls -la
total 8
drwxr-xr-x# 12 root wheel 408B Sep 30 23:52 ./
drwxr-xr-x 30 root wheel 1.1K Jan 23 17:51 ../
drwxr-xr-x 5 root wheel 170B Aug 23 03:51 X11/
lrwxr-xr-x 1 root wheel 3B Sep 30 23:43 X11R6# -> X11
drwxr-xr-x 3 root wheel 102B Aug 27 04:17 adic/
drwxr-xr-x 1055 root wheel 35K Jan 23 17:51 bin/
drwxr-xr-x 263 root wheel 8.7K Jan 23 17:52 lib/
drwxr-xr-x 186 root wheel 6.2K Jan 23 17:51 libexec/
drwxrwxr-x 22 root admin 748B Feb 7 12:28 local/
drwxr-xr-x 243 root wheel 8.1K Jan 23 17:51 sbin/
drwxr-xr-x 45 root wheel 1.5K Sep 30 23:43 share/
drwxr-xr-x 4 root wheel 136B Sep 17 09:03 standalone/
myuser#iMac:/usr$ cd local/
myuser#iMac:/usr/local$ ls -la
total 104
drwxrwxr-x 22 root admin 748B Feb 7 12:28 ./
drwxr-xr-x# 12 root wheel 408B Sep 30 23:52 ../
drwxr-xr-x 15 myuser admin 510B Feb 7 12:56 .git/
-rw-r--r-- 1 root admin 847B Feb 6 10:48 .gitignore
-rw-r--r-- 1 root admin 1.3K Feb 6 10:48 .travis.yml
-rw-r--r-- 1 root admin 291B Feb 6 10:48 .yardopts
-rw-r--r-- 1 root admin 3.1K Feb 6 10:48 CODEOFCONDUCT.md
-rw-r--r-- 1 root admin 2.5K Feb 6 10:48 CONTRIBUTING.md
drwxr-xr-x 3 myuser admin 102B Feb 7 12:28 Cellar/
-rw-r--r-- 1 root admin 1.2K Feb 6 10:48 LICENSE.txt
drwxr-xr-x 10 myuser admin 340B Feb 7 12:28 Library/
-rw-r--r-- 1 root admin 2.4K Feb 6 10:48 README.md
-rw-r--r-- 1 root admin 23K Feb 6 10:48 SUPPORTERS.md
drwxrwxr-x 9 root admin 306B Feb 7 12:28 bin/
drwxr-xr-x 3 myuser admin 102B Feb 7 12:28 etc/
drwxr-xr-x 10 root wheel 340B Aug 3 2015 git/
drwxr-xr-x 20 root wheel 680B Dec 3 02:01 go/
drwxr-xr-x 3 myuser admin 102B Feb 7 12:28 include/
drwxr-xr-x 4 myuser admin 136B Feb 7 12:28 lib/
drwxr-xr-x 3 root wheel 102B May 15 2015 n/
drwxr-xr-x 3 myuser admin 102B Feb 7 12:28 opt/
drwxrwxr-x 5 root admin 170B Feb 7 12:28 share/
myuser#iMac:/usr/local$

ncurses not found when trying to build vim

I am trying to build vim in my user dir after recently upgraded to Fedora 23
I have ncurses and ncurses-devel
[root#statquant-laptop lib]# dnf install ncurses
Last metadata expiration check performed 1:09:48 ago on Sat Jan 9 10:33:06 2016.
Package ncurses-5.9-21.20150214.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root#statquant-laptop lib]# dnf install ncurses-devel
Last metadata expiration check performed 1:09:58 ago on Sat Jan 9 10:33:06 2016.
Package ncurses-devel-5.9-21.20150214.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
Here is the proof:
[root#statquant-laptop lib]# ll /usr/lib/libncurs*
lrwxrwxrwx. 1 root root 17 Jun 17 2015 /usr/lib/libncurses.so.5 -> libncurses.so.5.9
lrwxrwxrwx. 1 root root 19 Jun 17 2015 /usr/lib/libncurses++.so.5 -> libncurses++.so.5.9
-rwxr-xr-x. 1 root root 154448 Jun 17 2015 /usr/lib/libncurses.so.5.9
-rwxr-xr-x. 1 root root 68176 Jun 17 2015 /usr/lib/libncurses++.so.5.9
lrwxrwxrwx. 1 root root 20 Jun 17 2015 /usr/lib/libncurses++w.so.5 -> libncurses++w.so.5.9
lrwxrwxrwx. 1 root root 18 Jun 17 2015 /usr/lib/libncursesw.so.5 -> libncursesw.so.5.9
-rwxr-xr-x. 1 root root 68176 Jun 17 2015 /usr/lib/libncurses++w.so.5.9
-rwxr-xr-x. 1 root root 216000 Jun 17 2015 /usr/lib/libncursesw.so.5.9
[root#statquant-laptop lib]# ll /usr/lib64/libncurs*
-rw-r--r--. 1 root root 330362 Jun 17 2015 /usr/lib64/libncurses.a
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++.a
-rw-r--r--. 1 root root 473398 Jun 17 2015 /usr/lib64/libncurses_g.a
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++_g.a
-rw-r--r--. 1 root root 31 Jun 17 2015 /usr/lib64/libncurses.so
lrwxrwxrwx. 1 root root 17 Jun 17 2015 /usr/lib64/libncurses++.so -> libncurses++.so.5
lrwxrwxrwx. 1 root root 17 Jun 17 2015 /usr/lib64/libncurses.so.5 -> libncurses.so.5.9
lrwxrwxrwx. 1 root root 19 Jun 17 2015 /usr/lib64/libncurses++.so.5 -> libncurses++.so.5.9
-rwxr-xr-x. 1 root root 155056 Jun 17 2015 /usr/lib64/libncurses.so.5.9
-rwxr-xr-x. 1 root root 76968 Jun 17 2015 /usr/lib64/libncurses++.so.5.9
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++w.a
-rw-r--r--. 1 root root 433400 Jun 17 2015 /usr/lib64/libncursesw.a
-rw-r--r--. 1 root root 183214 Jun 17 2015 /usr/lib64/libncurses++w_g.a
-rw-r--r--. 1 root root 593812 Jun 17 2015 /usr/lib64/libncursesw_g.a
lrwxrwxrwx. 1 root root 18 Jun 17 2015 /usr/lib64/libncurses++w.so -> libncurses++w.so.5
-rw-r--r--. 1 root root 32 Jun 17 2015 /usr/lib64/libncursesw.so
lrwxrwxrwx. 1 root root 20 Jun 17 2015 /usr/lib64/libncurses++w.so.5 -> libncurses++w.so.5.9
lrwxrwxrwx. 1 root root 18 Jun 17 2015 /usr/lib64/libncursesw.so.5 -> libncursesw.so.5.9
-rwxr-xr-x. 1 root root 76968 Jun 17 2015 /usr/lib64/libncurses++w.so.5.9
-rwxr-xr-x. 1 root root 208400 Jun 17 2015 /usr/lib64/libncursesw.so.5.9
When I run ./configure:
./configure --with-features=huge \
--enable-fail-if-missing \
--enable-luainterp=yes \
--enable-mzschemeinterp \
--enable-perlinterp \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib64/python2.7/config \
--enable-python3interp=yes \
--enable-tclinterp=yes \
--enable-rubyinterp=yes \
--enable-cscope \
--enable-multibyte \
--enable-gui=gtk2 \
--prefix=$HOME/Build/vim
I get
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.
What can I do ?
I ran into the same issue on Fedora23. Here is my solution:
make sure you have ncurses-devel installed
CFLAGS=-fPIC ./configure --with-tlib=ncurses and your_options
I checked the config.log and found that gcc complained the lack of '-fPIC'
You apparently do not have the development package for ncurses installed. On Fedora23, that would be ncurses-devel, e.g., ncurses-devel-5.9-21.20150214.fc23.x86_64
Without that, you have only the runtime libraries (which are required).
Once you have that, the configuration for vim 7.4 would show something like this:
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... yes
checking whether we talk terminfo... yes
checking what tgetent() returns for an unknown terminal... zero
checking whether termcap.h contains ospeed... yes
checking whether termcap.h contains UP, BC and PC... yes
checking whether tputs() uses outfuntype... no
Further reading:
how to install ncurses library in fedora?
RPM resource ncurses-devel

Resources