how do I build xf86-video-ati

53 views
Skip to first unread message

John Lumby

unread,
Aug 22, 2018, 8:53:42 PM8/22/18
to xorg-...@lists.x.org
I usually build xorg using jhbuild.
The last time I successfully built the xf86-video-ati package was in 2016,
when the cloned build tree contained a complete autoconf setup with an aclocal.m4
and also various other build-related bits and pieces,    and jhbuild ran autogen.sh and ./configure and so on and built it cleanly.

But now there is no aclocal.m4 nor is there an m4 subdirectory, and  autogen.sh fails with
aclocal: error: couldn't open directory 'm4': No such file or directory, and all my attempts to build it manually, e.g. pointing the M4PATH at xorg-build/share/aclocal also fail.

Obviously I am missing something or have omitted some step or dependency. Could someone in the know please point me at the right way to build it.

Thanks John Lumby
_______________________________________________
xorg-...@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Mike Lothian

unread,
Aug 22, 2018, 11:33:06 PM8/22/18
to John Lumby, xorg-...@lists.x.org
Hi

It works fine here, so I'm guessing you're missing a part of autotools or don't have a new enough version

Here's what I get:

./autogen.sh
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force -I m4
aclocal-1.16: warning: couldn't open directory 'm4': No such file or directory
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
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-2.69: running: /usr/bin/autoconf-2.69 --force
autoreconf-2.69: running: /usr/bin/autoheader-2.69 --force
autoreconf-2.69: running: automake --add-missing --copy --force-missing
configure.ac:38: installing './compile'
configure.ac:44: installing './config.guess'
configure.ac:44: installing './config.sub'
configure.ac:37: installing './install-sh'
configure.ac:37: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf-2.69: Leaving directory `.'

The the configure script runs

Cheers

Mike

Michel Dänzer

unread,
Aug 23, 2018, 4:07:43 AM8/23/18
to John Lumby, xorg-...@lists.x.org
On 2018-08-23 2:53 a.m., John Lumby wrote:
> I usually build xorg using jhbuild.
> The last time I successfully built the xf86-video-ati package was in 2016,
> when the cloned build tree contained a complete autoconf setup with an aclocal.m4
> and also various other build-related bits and pieces,

aclocal.m4 and other generated files have never been in the Git repository.


> But now there is no aclocal.m4 nor is there an m4 subdirectory, and  autogen.sh fails with
> aclocal: error: couldn't open directory 'm4': No such file or directory,

Please provide the full terminal output of running ./autogen.sh .


--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer

John Lumby

unread,
Aug 23, 2018, 9:08:43 AM8/23/18
to xorg devel
Thanks for all help and suggestions



> I'm guessing you're missing a part of autotools or don't have a new enough version

Probably  -  although I am running an up-to-date archlinux :
    some tool versions 

pacman -Q automake
automake 1.15.1-1
/:0 pacman -Q autoconf
autoconf 2.69-4
/:0 pacman -Q m4
m4 1.4.18-1
/:0 which aclocal
/sbin/aclocal
/:0 pacman -Q -o /sbin/aclocal
/usr/bin/aclocal is owned by automake 1.15.1-1
pacman -Q libtool
libtool 2.4.6+42+gb88cebd5-1
which libtoolize
/usr/sbin/libtoolize
 libtoolize --version
libtoolize (GNU libtool) 2.4.6.42-b88ce
Written by Gary V. Vaughan <ga...@gnu.org>, 2003




> Please provide the full terminal output of running ./autogen.sh .

starting from setting up PREFIX and cloning but omitting clone output is below.
It seems the difference between yours and mine is yours calls libtoolize to build the needed m4 files  mine does not.    I do have libtool as indicated above.  I am not an m4 expert to understand that difference.

XORG_DT=180820;unset ACLOCAL; typeset -i rc=0;dt=$(date "+%y%m%d-%H%M%S"); echo "dt= $dt";export XORGHOME=/usr/local/xorg-git-${XORG_DT} PREFIX=/usr/local/xorg-git-${XORG_DT}/xorg-build CC=gcc PATH="/usr/local/xorg-git-${XORG_DT}/xorg-build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/home/lumby/bin" LD_LIBRARY_PATH="/usr/local/xorg-git-${XORG_DT}/xorg-build/lib:/usr/local/lib:/usr/lib:/lib" PKG_CONFIG_PATH="/usr/local/xorg-git-${XORG_DT}/xorg-build/lib/pkgconfig:/usr/local/xorg-git-${XORG_DT}/xorg-build/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig";echo -e "PATH=\"$PATH\"\\nLD_LIBRARY_PATH=\"${LD_LIBRARY_PATH}\"\\nPKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}\"\\nACLOCAL=\"${ACLOCAL}\"\\nPYTHONPATH=\"$PYTHONPATH\""; cd ${XORGHOME};pwd;[[ "$PWD" = ${XORGHOME} ]] && { rm -fr /usr/local/xorg-git-180820/xorg/driver/xf86-video-ati;git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati xorg/driver/xf86-video-ati;cd xorg/driver/xf86-video-ati;pwd;./autogen.sh --prefix /usr/local/xorg-git-180820/xorg-build --disable-Werror  --without-xmlto --without-fop --without-xsltproc --disable-llvm-shared-libs; }
dt= 180823-084429
PATH="/usr/local/xorg-git-180820/xorg-build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/home/lumby/bin"
LD_LIBRARY_PATH="/usr/local/xorg-git-180820/xorg-build/lib:/usr/local/lib:/usr/lib:/lib"
PKG_CONFIG_PATH="/usr/local/xorg-git-180820/xorg-build/lib/pkgconfig:/usr/local/xorg-git-180820/xorg-build/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig"
ACLOCAL=""
PYTHONPATH=""
/usr/local/xorg-git-180820
Cloning into 'xorg/driver/xf86-video-ati'...
remote: Counting objects: 21288, done.
remote: Compressing objects: [ ... ] Compressing objects: 100% (5319/5319), done.
Receiving objects:   0% (1/21288) [ ... ]  reused 20047 (delta 15965)
Receiving objects: 100% (21288/21288), 4.34 MiB | 759.00 KiB/s   
Receiving objects: 100% (21288/21288), 4.46 MiB | 728.00 KiB/s, done.
Resolving deltas:   0% (0/16922) [ ... ] Resolving deltas: 100% (16922/16922), done.
/usr/local/xorg-git-180820/xorg/driver/xf86-video-ati
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
configure.ac:41: error: must install xorg-macros 1.8 or later before running autoconf/autogen
configure.ac:41: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1



Michel Dänzer

unread,
Aug 23, 2018, 10:14:37 AM8/23/18
to John Lumby, xorg devel
On 2018-08-23 3:08 p.m., John Lumby wrote:
>
> /usr/local/xorg-git-180820/xorg/driver/xf86-video-ati
> autoreconf: Entering directory `.'
> autoreconf: configure.ac: not using Gettext
> autoreconf: running: aclocal --force -I m4
> aclocal: warning: couldn't open directory 'm4': No such file or directory

This is just a warning.


> configure.ac:41: error: must install xorg-macros 1.8 or later before running autoconf/autogen
> configure.ac:41: the top level

This looks like your problem.

John Lumby

unread,
Aug 23, 2018, 11:36:58 AM8/23/18
to Michel Dänzer, xorg devel
Thanks Michel,

> configure.ac:41: error: must install xorg-macros 1.8 or later before running autoconf/autogen

> This looks like your problem.

Yes indeed, but I was using jhbuild and it seems it already installed those xorg-macros in file path
xorg-build/share/aclocal/xorg-macros.m4
with version 1.19

but perhaps that is not the place where xf86-video-ati expects to find it?

By the way, a very similar problem occurs on a debian sid/buster distro :
*** Configuring xf86-video-ati *** [139/201]
/data/xorg_180615/xorg/driver/xf86-video-ati/autogen.sh --prefix /data/xorg_180615/xorg-build --disable-Werror --without-xmlto --without-fop --without-xsltproc

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext

autoreconf: running: aclocal -I /data/xorg_180615/xorg-build/share/aclocal --force -I m4
aclocal: error: couldn't open directory 'm4': No such file or directory


autoreconf: aclocal failed with exit status: 1

*** Error during phase configure of xf86-video-ati:

I do not exactly know what kind of a "thing" xorg-macros is -- apparently it is not a regular xorg package as at least it does not appear in https://cgit.freedesktop.org/xorg/
I guess it is just the one file? How would it be brought into a build if not using jhbuild?

Anyway, can you suggest what I should do?

Cheers, John

Alan Coopersmith

unread,
Aug 23, 2018, 12:22:47 PM8/23/18
to John Lumby, Michel Dänzer, xorg devel
On 08/23/18 08:36 AM, John Lumby wrote:
> Thanks Michel,
>
>> configure.ac:41: error: must install xorg-macros 1.8 or later before running autoconf/autogen
>> This looks like your problem.
>
> Yes indeed, but I was using jhbuild and it seems it already installed those xorg-macros in file path
> xorg-build/share/aclocal/xorg-macros.m4
> with version 1.19
>
> but perhaps that is not the place where xf86-video-ati expects to find it?

autoconf normally only looks in /usr/share/aclocal - if you've not installed
xorg-macros.m4 there, then you need to set an environment variable to tell
autoconf where to look for it:
ACLOCAL="aclocal -I /wherever/xorg-build/share/aclocal/xorg-macros.m4"
(change to whatever the full path is on your system).

> I do not exactly know what kind of a "thing" xorg-macros is -- apparently
> it is not a regular xorg package as at least it does not appear in https://cgit.freedesktop.org/xorg/

It does, it's just confusingly named there as "util/macros" without the "xorg-".

--
-Alan Coopersmith- alan.coo...@oracle.com
Oracle Solaris Engineering - https://blogs.oracle.com/alanc

Michel Dänzer

unread,
Aug 23, 2018, 1:04:14 PM8/23/18
to John Lumby, xorg devel
On 2018-08-23 5:36 p.m., John Lumby wrote:
>
> By the way, a very similar problem occurs on a debian sid/buster distro :
> *** Configuring xf86-video-ati *** [139/201]
> /data/xorg_180615/xorg/driver/xf86-video-ati/autogen.sh --prefix /data/xorg_180615/xorg-build --disable-Werror --without-xmlto --without-fop --without-xsltproc
> autoreconf: Entering directory `.'
> autoreconf: configure.ac: not using Gettext
> autoreconf: running: aclocal -I /data/xorg_180615/xorg-build/share/aclocal --force -I m4
> aclocal: error: couldn't open directory 'm4': No such file or directory

The plot thickens. Looks like aclocal only warns if the first directory
passed via -I doesn't exist, but errors out if the second one doesn't.


Does https://patchwork.freedesktop.org/patch/245782/ help for this issue?


--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer

John Lumby

unread,
Aug 23, 2018, 2:06:01 PM8/23/18
to Michel Dänzer, Alan Coopersmith, Mike Lothian, xorg devel
Thanks again all

> The plot thickens. Looks like aclocal only warns if the first directory
> passed via -I doesn't exist, but errors out if the second one doesn't.

Yes

It gave me the clue as to what I need to do : this :

ln -s ../../../xorg-build/share/aclocal m4

After that ./autogen.sh works just fine.

Your patch doesn't create the link, just an empty directory - I did not try that but I guess it will work just as well provided the user has exported ACLOCAL as Alan indicated. creating the explicit link might be more robust.

Thanks all, problem solved

Cheers, John

Michel Dänzer

unread,
Aug 24, 2018, 3:50:25 AM8/24/18
to John Lumby, xorg devel
On 2018-08-23 8:05 p.m., John Lumby wrote:
>
>> Does https://patchwork.freedesktop.org/patch/245782/ help for this
>> issue?
>
> It gave me the clue as to what I need to do : this :
>
> ln -s ../../../xorg-build/share/aclocal m4
>
> After that ./autogen.sh works just fine.
>
> Your patch doesn't create the link, just an empty directory - I
> did not try that but I guess it will work just as well provided the
> user has exported ACLOCAL as Alan indicated. creating the explicit
> link might be more robust.

A symlink doesn't solve anything outside of your system(s). I'm looking
for a general solution, hence the patch.

Anyway, thanks for providing the information needed for diagnosing and
addressing this issue.


--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer

Reply all
Reply to author
Forward
0 new messages