public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Native GDB for i686-w64-mingw32 toolchain
@ 2015-11-17 12:53 Matthias Weißer
  2015-11-17 13:52 ` Bryan Hundven
  0 siblings, 1 reply; 8+ messages in thread
From: Matthias Weißer @ 2015-11-17 12:53 UTC (permalink / raw)
  To: crossgcc

Hi

I try to build a cross toolchain for Windows which should run on
linux. The process runs until building the native GDB which fails with
the following error message

configure: error: expat is missing or unusable

The configuration used is here
https://gist.github.com/modbw/4f81620a1689157b29aa

I observed a similar behavior when building a canadion cross toolchain
which should run on linux and has arm as target. What could be wrong?

Thanks
Matthias

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-17 12:53 Native GDB for i686-w64-mingw32 toolchain Matthias Weißer
@ 2015-11-17 13:52 ` Bryan Hundven
  2015-11-17 13:56   ` Matthias Weißer
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Hundven @ 2015-11-17 13:52 UTC (permalink / raw)
  To: Matthias Weißer; +Cc: crossgcc

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

On Tue, Nov 17, 2015 at 01:53:10PM +0100, Matthias Weißer wrote:
> Hi
> 
> I try to build a cross toolchain for Windows which should run on
> linux. The process runs until building the native GDB which fails with
> the following error message
> 
> configure: error: expat is missing or unusable

I saw a similar issue on archlinux.

What distribution are you on?

-Bryan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-17 13:52 ` Bryan Hundven
@ 2015-11-17 13:56   ` Matthias Weißer
  2015-11-17 16:20     ` Bryan Hundven
  0 siblings, 1 reply; 8+ messages in thread
From: Matthias Weißer @ 2015-11-17 13:56 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: crossgcc

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.10"
VERSION_ID="15.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

But why should the distro influence the build of a native GDB?
Shouldn't it need (in my case) expat for i686-w64-mingw32 which is
installed in the step "[INFO ]  Installing expat for target"?

Regards
Matthias

2015-11-17 14:52 GMT+01:00 Bryan Hundven <bryanhundven@gmail.com>:
> On Tue, Nov 17, 2015 at 01:53:10PM +0100, Matthias Weißer wrote:
>> Hi
>>
>> I try to build a cross toolchain for Windows which should run on
>> linux. The process runs until building the native GDB which fails with
>> the following error message
>>
>> configure: error: expat is missing or unusable
>
> I saw a similar issue on archlinux.
>
> What distribution are you on?
>
> -Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-17 13:56   ` Matthias Weißer
@ 2015-11-17 16:20     ` Bryan Hundven
  2015-11-17 18:39       ` Matthias Weißer
  0 siblings, 1 reply; 8+ messages in thread
From: Bryan Hundven @ 2015-11-17 16:20 UTC (permalink / raw)
  To: Matthias Weißer; +Cc: crossgcc

[-- Attachment #1: Type: text/plain, Size: 1828 bytes --]

On Tue, Nov 17, 2015 at 02:56:08PM +0100, Matthias Weißer wrote:
> 2015-11-17 14:52 GMT+01:00 Bryan Hundven <bryanhundven@gmail.com>:
> > On Tue, Nov 17, 2015 at 01:53:10PM +0100, Matthias Weißer wrote:
> >> Hi
> >>
> >> I try to build a cross toolchain for Windows which should run on
> >> linux. The process runs until building the native GDB which fails with
> >> the following error message
> >>
> >> configure: error: expat is missing or unusable
> >
> > I saw a similar issue on archlinux.
> >
> > What distribution are you on?
> >
> > -Bryan
> $ cat /etc/os-release
> NAME="Ubuntu"
> VERSION="15.10 (Wily Werewolf)"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu 15.10"
> VERSION_ID="15.10"
> HOME_URL="http://www.ubuntu.com/"
> SUPPORT_URL="http://help.ubuntu.com/"
> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
> 
> But why should the distro influence the build of a native GDB?
> Shouldn't it need (in my case) expat for i686-w64-mingw32 which is
> installed in the step "[INFO ]  Installing expat for target"?
> 
> Regards
> Matthias

I think you need to install libexpat1-dev (checked with
packages.ubuntu.com).

We should check for that with configure. (note to self)

The distro is the one that packages the libexpat package.

On ArchLinux and Gentoo, normal libraries and their development packages are one in the same.

Debian and Ubuntu package them separately. Same with Fedora/Redhat
variants (including OpenSuse), but they just name them differently.

The build failure is happening with native-gdb, not cross-gdb, correct?
So native=build, not target or host.

Since it is on the build system, the build system should provide
libexpat development files.

I hope that helps explain things.

Cheers,

-Bryan

P.S. Please don't top post.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-17 16:20     ` Bryan Hundven
@ 2015-11-17 18:39       ` Matthias Weißer
  2015-11-17 19:53         ` Bryan Hundven
  2015-11-18  6:54         ` Antw: " Thomas Tamandl
  0 siblings, 2 replies; 8+ messages in thread
From: Matthias Weißer @ 2015-11-17 18:39 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: crossgcc, Thomas.Tamandl

2015-11-17 17:19 GMT+01:00 Bryan Hundven <bryanhundven@gmail.com>:
> The build failure is happening with native-gdb, not cross-gdb, correct?

Right.

> So native=build, not target or host.

Wrong. It seems to me that "Native gdb" in crosstools-ng context
means a gdb that runs on the target system. See also the help
text in config/debug/gdb.in.native

"Build and install a native gdb for the target, to run on the target."

And actually this step creates a file named gdb.exe which makes
me even more confident that this is a gdb to run on the target ;-)

Where cross gdb means

"Build and install a cross-gdb for the target, to run on host."

> Since it is on the build system, the build system should provide
> libexpat development files.

So, as it is a gdb that should run on the target it needs an expat
library build for the target. And crosstools-ng builds and installs
such a variant. But gdb configure fails to find it.

I got a private message from Thomas Tamandl which lead me
to a solution:

diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index c025458..e577e33
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -198,6 +198,7 @@ do_debug_gdb_build() {
             --target=${CT_TARGET}                       \
             --prefix=/usr                               \
             --with-build-sysroot="${CT_SYSROOT_DIR}"    \
+            --with-libexpat-prefix="${CT_SYSROOT_DIR}/usr" \
             --without-uiout                             \
             --disable-tui                               \
             --disable-gdbtk                             \


If you think this is a working solution (for me it is) feel free to merge it.

The only problem left is then that striping the gdbserver executable fails
in internals.sh as its name contains .exe

> P.S. Please don't top post.

Outlook disease ;-) Sorry.

Regards
Matthias

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-17 18:39       ` Matthias Weißer
@ 2015-11-17 19:53         ` Bryan Hundven
  2015-11-18  6:54         ` Antw: " Thomas Tamandl
  1 sibling, 0 replies; 8+ messages in thread
From: Bryan Hundven @ 2015-11-17 19:53 UTC (permalink / raw)
  To: Matthias Weißer; +Cc: crossgcc, Thomas.Tamandl, Ray Donnelly

[-- Attachment #1: Type: text/plain, Size: 2591 bytes --]

On Tue, Nov 17, 2015 at 07:39:16PM +0100, Matthias Weißer wrote:
> 2015-11-17 17:19 GMT+01:00 Bryan Hundven <bryanhundven@gmail.com>:
> > The build failure is happening with native-gdb, not cross-gdb, correct?
> 
> Right.
> 
> > So native=build, not target or host.
> 
> Wrong. It seems to me that "Native gdb" in crosstools-ng context
> means a gdb that runs on the target system. See also the help
> text in config/debug/gdb.in.native
> 
> "Build and install a native gdb for the target, to run on the target."
> 
> And actually this step creates a file named gdb.exe which makes
> me even more confident that this is a gdb to run on the target ;-)
> 
> Where cross gdb means
> 
> "Build and install a cross-gdb for the target, to run on host."

I've been up all night mucking with other things, I got it backwards.

cross-gdb runs on the host (in cross it's the same as build), and native
is for the target. I forget that gdb is more confusing then the other
builds ;)

> > Since it is on the build system, the build system should provide
> > libexpat development files.
> 
> So, as it is a gdb that should run on the target it needs an expat
> library build for the target. And crosstools-ng builds and installs
> such a variant. But gdb configure fails to find it.
> 
> I got a private message from Thomas Tamandl which lead me
> to a solution:
> 
> diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
> index c025458..e577e33
> --- a/scripts/build/debug/300-gdb.sh
> +++ b/scripts/build/debug/300-gdb.sh
> @@ -198,6 +198,7 @@ do_debug_gdb_build() {
>              --target=${CT_TARGET}                       \
>              --prefix=/usr                               \
>              --with-build-sysroot="${CT_SYSROOT_DIR}"    \
> +            --with-libexpat-prefix="${CT_SYSROOT_DIR}/usr" \
>              --without-uiout                             \
>              --disable-tui                               \
>              --disable-gdbtk                             \
> 
> 
> If you think this is a working solution (for me it is) feel free to merge it.
> 
> The only problem left is then that striping the gdbserver executable fails
> in internals.sh as its name contains .exe

Ok, maybe I can get Ray, Yann D., or someone with a windows host to
check on the strip issue.

I think the `with-libexpat-prefix` fix is good, but if you do push a PR,
please align the back-slashes on the right.

> > P.S. Please don't top post.
> 
> Outlook disease ;-) Sorry.

It happens :)

-Bryan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Antw: Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-17 18:39       ` Matthias Weißer
  2015-11-17 19:53         ` Bryan Hundven
@ 2015-11-18  6:54         ` Thomas Tamandl
  2015-11-18  7:06           ` Matthias Weißer
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Tamandl @ 2015-11-18  6:54 UTC (permalink / raw)
  To: m.weisser.m; +Cc: crossgcc



>>>> Matthias Weißer <m.weisser.m@gmail.com> 17.11.2015 19:39 >>>
>2015-11-17 17:19 GMT+01:00 Bryan Hundven <bryanhundven@gmail.com>:
>> The build failure is happening with native-gdb, not cross-gdb,
correct?
>
>Right.
>
>> So native=build, not target or host.
>
>Wrong. It seems to me that "Native gdb" in crosstools-ng context
>means a gdb that runs on the target system. See also the help
>text in config/debug/gdb.in.native
>
>"Build and install a native gdb for the target, to run on the
target."
>
>And actually this step creates a file named gdb.exe which makes
>me even more confident that this is a gdb to run on the target ;-)
>
>Where cross gdb means
>
>"Build and install a cross-gdb for the target, to run on host."
>
>> Since it is on the build system, the build system should provide
>> libexpat development files.
>
>So, as it is a gdb that should run on the target it needs an expat
>library build for the target. And crosstools-ng builds and installs
>such a variant. But gdb configure fails to find it.
>
>I got a private message from Thomas Tamandl which lead me
>to a solution:
>
>diff --git a/scripts/build/debug/300-gdb.sh
b/scripts/build/debug/300-gdb.sh
>index c025458..e577e33
>--- a/scripts/build/debug/300-gdb.sh
>+++ b/scripts/build/debug/300-gdb.sh
>@@ -198,6 +198,7 @@ do_debug_gdb_build() {
>             --target=${CT_TARGET}                       \
>             --prefix=/usr                               \
>             --with-build-sysroot="${CT_SYSROOT_DIR}"    \
>+            --with-libexpat-prefix="${CT_SYSROOT_DIR}/usr" \
>             --without-uiout                             \
>             --disable-tui                               \
>             --disable-gdbtk                             \
>
>
>If you think this is a working solution (for me it is) feel free to
merge it.

>The only problem left is then that striping the gdbserver executable
fails
>in internals.sh as its name contains .exe
>
>> P.S. Please don't top post.
>
>Outlook disease ;-) Sorry.
>
>Regards
>Matthias
>

Hi,

the message should not be private. Seems that I need a short "How to
use a Mailinglist" ;-) too. 

As I am also facing a new bild run an I don't want to have the same
troubles : Your solution is much more smarter than my old one (
https://sourceware.org/ml/crossgcc/2015-04/msg00008.html  ). Is there
already more support form the 300-gdb script or didn't I find the easy
solution? Anything else worked out of the box?

Regards
Thomas

------------------------------------------------------------
Wittmann Kunststoffgeraete Ges.m.b.H.
A-1220  Wien
Geschaeftsfuehrer: Dr. Werner Wittmann
FN 101312p, Handelsgericht Wien
-------------------------------------------------------------

------------------------------------------------------------
This e-mail message has been scanned for Viruses and Content
------------------------------------------------------------

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Native GDB for i686-w64-mingw32 toolchain
  2015-11-18  6:54         ` Antw: " Thomas Tamandl
@ 2015-11-18  7:06           ` Matthias Weißer
  0 siblings, 0 replies; 8+ messages in thread
From: Matthias Weißer @ 2015-11-18  7:06 UTC (permalink / raw)
  To: Thomas Tamandl; +Cc: crossgcc

2015-11-18 7:55 GMT+01:00 Thomas Tamandl <Thomas.Tamandl@wittmann-group.com>:
> Hi,
>
> the message should not be private. Seems that I need a short "How to
> use a Mailinglist" ;-) too.

:-)

> As I am also facing a new bild run an I don't want to have the same
> troubles : Your solution is much more smarter than my old one (
> https://sourceware.org/ml/crossgcc/2015-04/msg00008.html  ). Is there
> already more support form the 300-gdb script or didn't I find the easy
> solution? Anything else worked out of the box?

expat has recently be added as companion library. So it was an relatively
easy task to add a search path to the gdb script. I opened a pull request
(https://github.com/crosstool-ng/crosstool-ng/pull/273) and there seems
to be a solution to this problem by installing expat to the "right" location.

Matthias

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-18  7:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17 12:53 Native GDB for i686-w64-mingw32 toolchain Matthias Weißer
2015-11-17 13:52 ` Bryan Hundven
2015-11-17 13:56   ` Matthias Weißer
2015-11-17 16:20     ` Bryan Hundven
2015-11-17 18:39       ` Matthias Weißer
2015-11-17 19:53         ` Bryan Hundven
2015-11-18  6:54         ` Antw: " Thomas Tamandl
2015-11-18  7:06           ` Matthias Weißer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).