1

I am sorry, I am not experienced with gcc and installing packages from source, and can't fix my problem:

I am trying to install ncmpcpp from source (github) on Ubuntu 14.04 (the reason is that visualizers are colored in version 0.7.1).

So previously I installed mpd, and ncmpcpp from the repository (version 0.5.10) worked great.

Now my installation steps (after having removed ncmpcpp with apt-get):

git clone https://github.com/arybczak/ncmpcpp
cd ncmpcpp
./autogen.sh

The error I get is:

configure: error: libmpdclient >= 2.8 is required!

However, here is the result of apt-cache policy libmpdclient2:

libmpdclient2:
  Installé : 2.9-1ubuntu1
  Candidat : 2.9-1ubuntu1
 Table de version :
 *** 2.9-1ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

After some googling, I tried this command: ldconfig -p | grep mpdclient:

libmpdclient.so.2 (libc6,x86-64) => /usr/lib/libmpdclient.so.2

But I can actually verify that pkg-config does not find it:

$ pkg-config --exists --print-errors "libmpdclient2"

Package libmpdclient2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libmpdclient2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libmpdclient2' found

Trying with "libmpdclient" returns the same.

I searched my computer using sudo find / -name "libmpdclient2.pc" and nothing came up.

When you read the configure.ac file (whose syntax is unfamiliar to me), you see this, and I wonder if it checks for libmpdclient or libmpdclient2:

dnl ==============================
dnl = checking for libmpdclient2 =
dnl ==============================
PKG_CHECK_MODULES([libmpdclient], [libmpdclient >= 2.8], [
    AC_SUBST(libmpdclient_CFLAGS)
    AC_SUBST(libmpdclient_LIBS)
    CPPFLAGS="$CPPFLAGS $libmpdclient_CFLAGS"
    AC_CHECK_HEADERS([mpd/client.h],
        LIBS="$LIBS $libmpdclient_LIBS"
    ,
        AC_MSG_ERROR([missing mpd/client.h header])
    )
],
    AC_MSG_ERROR([libmpdclient >= 2.8 is required!])
)

Sorry for the long post, I am out of clues. I have the feeling that this is a package for Archlinux users rather than Ubuntu ones but I like it a lot!

1 Answers1

4

Usually, in the Ubuntu packaging scheme, files that are needed for software development using a library (including header files, and pkg-config .pc files where provided) are split off from the runtime library itself, and provided as a separate package.

Most often that package has the same name as the runtime library package, plus a -dev suffix, for example

libgimp2.0 - Libraries for the GNU Image Manipulation Program
libgimp2.0-dev - Headers and other files for compiling plugins for GIMP

however in this case it appears that the development package corresponding to libmpdclient2 is simply libmpdclient-dev:

$ apt-cache policy libmpdclient2
libmpdclient2:
  Installed: (none)
  Candidate: 2.9-1ubuntu1
  Version table:
     2.9-1ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

while

$ apt-cache policy libmpdclient-dev
libmpdclient-dev:
  Installed: (none)
  Candidate: 2.9-1ubuntu1
  Version table:
     2.9-1ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

Installing the libmpdclient-dev package should provide the necessary development files and keep pkg-config happy, but you have to use the correct package name:

pkg-config --exists --print-errors libmpdclient
A.B.
  • 92,125
steeldriver
  • 142,475