Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails seemingly because of error in configure #121

Open
matj1 opened this issue Jan 16, 2024 · 6 comments
Open

Build fails seemingly because of error in configure #121

matj1 opened this issue Jan 16, 2024 · 6 comments

Comments

@matj1
Copy link

matj1 commented Jan 16, 2024

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.

@PerBothner
Copy link
Owner

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
Copy link
Owner

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?

@matj1
Copy link
Author

matj1 commented Jan 18, 2024

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

@PerBothner
Copy link
Owner

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.

@matj1
Copy link
Author

matj1 commented Jan 20, 2024

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.

@PerBothner
Copy link
Owner

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.".

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

No branches or pull requests

2 participants