Discussion:
Autoconf can't find X11 libraries
anatoly techtonik
2016-01-11 11:05:49 UTC
Permalink
Hi,

In this build on Ubuntu x86_64 autoconf is unable to find X11
libraries:
https://travis-ci.org/techtonik/PDCurses/builds/101477536
However, it works with explicit configure option
--x-libraries=/usr/lib/x86_64-linux-gnu
https://travis-ci.org/techtonik/PDCurses/builds/101506738

It looks like the problem is PDCurses specific
http://askubuntu.com/questions/539574/how-to-install-xaw-package-with-header-files/578003
probably because people rarely use Xaw. Anyway, how to fix
it? Is it an autoconf bug?

Please, CC.

---------- Forwarded message ----------
From: William McBrine <***@gmail.com>
Date: Mon, Jan 11, 2016 at 12:15 AM
Subject: Fwd: [PDCurses] Need with Autotools compilation on X11
Are there any autotools experts here to say what should be
done to debug this failure?
https://travis-ci.org/techtonik/PDCurses/builds/101423050
You can get around it by doing:

./configure --x-libraries=/usr/lib/x86_64-linux-gnu

but perhaps a more elegant solution exists?
--
anatoly t.
Thomas Dickey
2016-01-13 10:19:50 UTC
Permalink
Post by anatoly techtonik
Hi,
In this build on Ubuntu x86_64 autoconf is unable to find X11
https://travis-ci.org/techtonik/PDCurses/builds/101477536
However, it works with explicit configure option
--x-libraries=/usr/lib/x86_64-linux-gnu
https://travis-ci.org/techtonik/PDCurses/builds/101506738
It looks like the problem is PDCurses specific
http://askubuntu.com/questions/539574/how-to-install-xaw-package-with-header-files/578003
probably because people rarely use Xaw. Anyway, how to fix
it? Is it an autoconf bug?
no - it is a bug in PDCurses' configure script, which assumes that the
libraries are in a directory "../lib" relative to the location of the
X headers.

You might find this to be useful:

http://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/

Before noticing this, I would simply build PDCurses with a quick fix
for its configure script bug. (Actually now I build it using Martin's
version plus some further fixes -- I use that for test-builds, e.g.,
of lynx, dialog).
Post by anatoly techtonik
Please, CC.
---------- Forwarded message ----------
Date: Mon, Jan 11, 2016 at 12:15 AM
Subject: Fwd: [PDCurses] Need with Autotools compilation on X11
Are there any autotools experts here to say what should be
done to debug this failure?
https://travis-ci.org/techtonik/PDCurses/builds/101423050
./configure --x-libraries=/usr/lib/x86_64-linux-gnu
but perhaps a more elegant solution exists?
--
Thomas E. Dickey <***@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
anatoly techtonik
2016-01-21 07:11:47 UTC
Permalink
Post by Thomas Dickey
Post by anatoly techtonik
Hi,
In this build on Ubuntu x86_64 autoconf is unable to find X11
https://travis-ci.org/techtonik/PDCurses/builds/101477536
However, it works with explicit configure option
--x-libraries=/usr/lib/x86_64-linux-gnu
https://travis-ci.org/techtonik/PDCurses/builds/101506738
It looks like the problem is PDCurses specific
http://askubuntu.com/questions/539574/how-to-install-xaw-package-with-header-files/578003
probably because people rarely use Xaw. Anyway, how to fix
it? Is it an autoconf bug?
no - it is a bug in PDCurses' configure script, which assumes that the
libraries are in a directory "../lib" relative to the location of the
X headers.
Thank for clarification. The ./configure script is autogenerated - at
least this is said in headers
"Generated by GNU Autoconf 2.61 for PDCurses 3.4."
So, is it a bug in Autoconf?
Post by Thomas Dickey
http://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/
I see only two patches, one of which is said to be fixed upstream
https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/debian/patches
I can't extract the solution for complication problem from them.
Post by Thomas Dickey
Before noticing this, I would simply build PDCurses with a quick fix
for its configure script bug. (Actually now I build it using Martin's
version plus some further fixes -- I use that for test-builds, e.g.,
of lynx, dialog).
Can you clarify how to fix this configure script? Looks like the file that
should be fixed is
https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/configure.ac
but I don't understand its semantics well enough to find the
problem myself.

Thanks.
Thomas Dickey
2016-01-25 00:12:30 UTC
Permalink
Post by anatoly techtonik
Post by Thomas Dickey
Post by anatoly techtonik
Hi,
In this build on Ubuntu x86_64 autoconf is unable to find X11
https://travis-ci.org/techtonik/PDCurses/builds/101477536
However, it works with explicit configure option
--x-libraries=/usr/lib/x86_64-linux-gnu
https://travis-ci.org/techtonik/PDCurses/builds/101506738
It looks like the problem is PDCurses specific
http://askubuntu.com/questions/539574/how-to-install-xaw-package-with-header-files/578003
probably because people rarely use Xaw. Anyway, how to fix
it? Is it an autoconf bug?
no - it is a bug in PDCurses' configure script, which assumes that the
libraries are in a directory "../lib" relative to the location of the
X headers.
Thank for clarification. The ./configure script is autogenerated - at
least this is said in headers
"Generated by GNU Autoconf 2.61 for PDCurses 3.4."
So, is it a bug in Autoconf?
Post by Thomas Dickey
http://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/
I see only two patches, one of which is said to be fixed upstream
https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/debian/patches
I can't extract the solution for complication problem from them.
hmm. I started a while back by tweaking the configure script, and noticed
Martin's tree, made a copy of _that_, and eliminated most of the unnecessary
stuff. Since I'm not going to publish _that_ tree (I maintain ncurses), it
would be of limited use.

So (referring to PDCurses 3.4)
this line in the configure script is the problem:

mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`"

The problem is that 64-bit machines nowadays generally use lib64 - not lib,
as the script assumes. When I tweaked it by hand, I just edited that line.

mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib64/g`"

But I prefer packages...

Refreshing my memory, I see that Martin may not have _fixed_ that.
But I did, using a script in the debian/rules file. I'm attaching
that, for discussion.
Post by anatoly techtonik
Post by Thomas Dickey
Before noticing this, I would simply build PDCurses with a quick fix
for its configure script bug. (Actually now I build it using Martin's
version plus some further fixes -- I use that for test-builds, e.g.,
of lynx, dialog).
Can you clarify how to fix this configure script? Looks like the file that
should be fixed is
https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/configure.ac
but I don't understand its semantics well enough to find the
problem myself.
Thanks.
--
Thomas E. Dickey <***@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
anatoly techtonik
2016-01-25 06:51:13 UTC
Permalink
Post by Thomas Dickey
Post by anatoly techtonik
Post by Thomas Dickey
Post by anatoly techtonik
Hi,
In this build on Ubuntu x86_64 autoconf is unable to find X11
https://travis-ci.org/techtonik/PDCurses/builds/101477536
However, it works with explicit configure option
--x-libraries=/usr/lib/x86_64-linux-gnu
https://travis-ci.org/techtonik/PDCurses/builds/101506738
It looks like the problem is PDCurses specific
http://askubuntu.com/questions/539574/how-to-install-xaw-package-with-header-files/578003
probably because people rarely use Xaw. Anyway, how to fix
it? Is it an autoconf bug?
no - it is a bug in PDCurses' configure script, which assumes that the
libraries are in a directory "../lib" relative to the location of the
X headers.
Thank for clarification. The ./configure script is autogenerated - at
least this is said in headers
"Generated by GNU Autoconf 2.61 for PDCurses 3.4."
So, is it a bug in Autoconf?
Post by Thomas Dickey
http://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/
I see only two patches, one of which is said to be fixed upstream
https://anonscm.debian.org/cgit/users/agmartin/pdcurses.git/tree/debian/patches
I can't extract the solution for complication problem from them.
So (referring to PDCurses 3.4)
mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`"
The problem is that 64-bit machines nowadays generally use lib64 - not lib,
as the script assumes. When I tweaked it by hand, I just edited that line.
mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib64/g`"
And this will break 32-bit machines, no?
Post by Thomas Dickey
But I prefer packages...
Refreshing my memory, I see that Martin may not have _fixed_ that.
But I did, using a script in the debian/rules file. I'm attaching
that, for discussion.
As this list is about autoconf, is it possible to fix it Autoconf way,
without debian/rules? I thought that there is be some environment
variable (or is there another setting storage) that ./configure should
read to detect where includes and libs are located for the current
system.
--
anatoly t.
Earnie
2016-01-26 21:55:48 UTC
Permalink
Post by Thomas Dickey
hmm. I started a while back by tweaking the configure script, and noticed
Martin's tree, made a copy of _that_, and eliminated most of the unnecessary
stuff. Since I'm not going to publish _that_ tree (I maintain ncurses), it
would be of limited use.
So (referring to PDCurses 3.4)
mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`"
lib is the correct substitution since it represents the native build
environment. If you're on a 64bit build environment then lib represents
the 64bit libraries. If you're on a 32bit build environment the lib
represents the 32bit libraries.
Post by Thomas Dickey
The problem is that 64-bit machines nowadays generally use lib64 - not lib,
as the script assumes. When I tweaked it by hand, I just edited that line.
mh_lib_dirs="$x_libraries `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib64/g`"
And this is just the wrong thing to do. If you have a 32bit build
system then you want to cross-compile for the 64bit host. Then you
don't need to worry which bit set the lib directory contains.

--
Earnie

Loading...