Quantcast

Autoconf can't find X11 libraries

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Autoconf can't find X11 libraries

anatoly techtonik
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 <[hidden email]>
Date: Mon, Jan 11, 2016 at 12:15 AM
Subject: Fwd: [PDCurses] Need with Autotools compilation on X11
To: [hidden email]


On Sun, Jan 10, 2016 at 11:28 AM, anatoly techtonik <[hidden email]> wrote:

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

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autoconf can't find X11 libraries

Thomas Dickey-2
On Mon, Jan 11, 2016 at 02:05:49PM +0300, anatoly techtonik wrote:

> 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?
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).
 

> Please, CC.
>
> ---------- Forwarded message ----------
> From: William McBrine <[hidden email]>
> Date: Mon, Jan 11, 2016 at 12:15 AM
> Subject: Fwd: [PDCurses] Need with Autotools compilation on X11
> To: [hidden email]
>
>
> On Sun, Jan 10, 2016 at 11:28 AM, anatoly techtonik <[hidden email]> wrote:
>
> > 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?
--
Thomas E. Dickey <[hidden email]>
http://invisible-island.net
ftp://invisible-island.net

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autoconf can't find X11 libraries

anatoly techtonik
On Wed, Jan 13, 2016 at 1:19 PM, Thomas Dickey <[hidden email]> wrote:

> On Mon, Jan 11, 2016 at 02:05:49PM +0300, anatoly techtonik wrote:
>> 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?
>
> 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?

> You might find this to be useful:
>
>         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.

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

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autoconf can't find X11 libraries

Thomas Dickey-2
On Thu, Jan 21, 2016 at 10:11:47AM +0300, anatoly techtonik wrote:

> On Wed, Jan 13, 2016 at 1:19 PM, Thomas Dickey <[hidden email]> wrote:
> > On Mon, Jan 11, 2016 at 02:05:49PM +0300, anatoly techtonik wrote:
> >> 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?
> >
> > 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?
>
> > You might find this to be useful:
> >
> >         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.

> > 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 <[hidden email]>
http://invisible-island.net
ftp://invisible-island.net

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf

rules (4K) Download Attachment
signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autoconf can't find X11 libraries

anatoly techtonik
On Mon, Jan 25, 2016 at 3:12 AM, Thomas Dickey <[hidden email]> wrote:

> On Thu, Jan 21, 2016 at 10:11:47AM +0300, anatoly techtonik wrote:
>> On Wed, Jan 13, 2016 at 1:19 PM, Thomas Dickey <[hidden email]> wrote:
>> > On Mon, Jan 11, 2016 at 02:05:49PM +0300, anatoly techtonik wrote:
>> >> 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?
>> >
>> > 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?
>>
>> > You might find this to be useful:
>> >
>> >         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)
> 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`"

And this will break 32-bit machines, no?

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

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autoconf can't find X11 libraries

Earnie Boyd
In reply to this post by Thomas Dickey-2
On 1/24/2016 7:12 PM, Thomas Dickey wrote:

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

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.

> 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

_______________________________________________
Autoconf mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/autoconf
Loading...