Bug 103684

Summary: Building weston fails with configure.ac:15: error: possibly undefined macro: AC_SUBST
Product: Wayland Reporter: dyle71
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: dyle71
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description dyle71 2017-11-11 16:29:04 UTC
#!/bin/hi *

I was following instructions on https://wayland.freedesktop.org/building.html on a fresh new plain Debian 9 installment.

I also took a peek at https://wayland.freedesktop.org/ubuntu16.04.html to get inspired.

However, right at the first step autoconf fails to me with:

$ ./autogen.sh --prefix=$WLD 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I /home/dyle/install/share/aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
configure.ac:15: error: possibly undefined macro: AC_SUBST
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:102: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:110: error: possibly undefined macro: AC_CHECK_HEADERS
configure.ac:117: error: possibly undefined macro: AC_SEARCH_LIBS
autoreconf: /usr/bin/autoconf failed with exit status: 1


I'm using this environment:

export WLD=$HOME/install
export LD_LIBRARY_PATH=$WLD/lib
export PKG_CONFIG_PATH=$WLD/lib/pkgconfig:$WLD/share/pkgconfig
export PATH=$WLD/bin:$PATH
export ACLOCAL_PATH=$WLD/share/aclocal
export ACLOCAL="aclocal -I $ACLOCAL_PATH"

With a 'mkdir -p $WLD/share/aclocal'


This is my current setup:
$ git branch -v
* master 2420056 wayland-server: document WL_HIDE_DEPRECATED

$ dpkg --list | grep -E 'autotool|libtool|autoconf'
ii  autoconf                      2.69-10                        all          automatic configure script builder
ii  autotools-dev                 20161112.1                     all          Update infrastructure for config.{guess,sub} files
ii  libltdl-dev:amd64             2.4.6-2                        amd64        System independent dlopen wrapper for GNU libtool
ii  libltdl7:amd64                2.4.6-2                        amd64        System independent dlopen wrapper for GNU libtool
ii  libtool                       2.4.6-2                        all          Generic library support script

... besides the usual suspects: build-essentials, sed, gawk, ...

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.2 (stretch)
Release:	9.2
Codename:	stretch

The Debian is installed fresh anew from the shelf. No WM or DE currently installed or running. 

I refrain to hack configure.ac myself. I think it just needs a nudge somewhere, it must be just a tiny little thingie - but I don't know where and what to tweak.

Using "m4_pattern_allow" seems wrong to me, though.

Should I drop the ACLOCAL exports?
Comment 1 dyle71 2017-11-12 06:39:21 UTC
Meeehh, missed to install package pkg-config!

Installing it solved the problem with autogen. >.<

    # apt-get install pkg-config

Not a bug.
Comment 2 dyle71 2017-11-12 06:45:25 UTC
Maybe you add a section about necessary bootstrap packages to https://wayland.freedesktop.org/ubuntu16.04.html:

* build-essential
* autoconf
* autotools-dev
* libtool
* pkg-config
* git

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.