DomTerm icon indicating copy to clipboard operation
DomTerm copied to clipboard

Build fails seemingly because of error in configure

Open matj1 opened this issue 2 years ago • 6 comments

If I am building DomTerm and run ./configure according to the guide with various options, it always ends with this:

./configure: line 6672: PKG_PROG_PKG_CONFIG: command not found
./configure: line 6685: syntax error near unexpected token `LIBCAP,'
./configure: line 6685: `  PKG_CHECK_MODULES(LIBCAP, libcap, true, true)'

Then, if I run make, it complains that no makefile is found.

That happens on Manjaro with the newest commit.

matj1 avatar Jan 16 '24 15:01 matj1

Sorry for not responding - I may have accidentally deleted the notification.

It looks like this is because of a missing pkg-conflig package.

It might be possible to generate a better error message - like here.

PerBothner avatar Jan 18 '24 19:01 PerBothner

Before you try to install pkg-config, could you try adding the line

m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run auto.sh.)])

before the PKG_PROG_PKG_CONFIG in configure.ac? I.e. like this:

HAVE_OPENSSL=0
m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run auto.sh.)])
PKG_PROG_PKG_CONFIG
if test "$with_libwebsockets" != "no"; then

Then re-run autoreconf -i and ./configure.

Does that provide a better error message?

PerBothner avatar Jan 18 '24 19:01 PerBothner

The output ends with this:

./configure: line 6672: syntax error near unexpected token `[PKG_PROG_PKG_CONFIG],'
./configure: line 6672: `m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run auto.sh.)])'

I have pkg-config installed.

> pkg-config -version
2.1.0

matj1 avatar Jan 18 '24 20:01 matj1

Does /usr/share/aclocal/pkg.m4 exist? Does aclocal --print-ac-dir print out /usr/share/aclocal?

This website seems like it might be helpful.

PerBothner avatar Jan 18 '24 21:01 PerBothner

It works now. The problem was that I forgot to run autoreconf -i. I apologise then.

The error mesage says “Please install pkg-config and re-run auto.sh.” That confused me because I could not find auto.sh. But that reminded me of autoreconf -i. What is auto.sh supposed to be? If it is supposed to be autoreconf -i, you should correct the error message.

matj1 avatar Jan 20 '24 20:01 matj1

The error mesage says “Please install pkg-config and re-run auto.sh.

That was a cut-and-paste error. I meant it to be "Please install pkg-config and re-run autoreconf -i.".

PerBothner avatar Jan 20 '24 20:01 PerBothner