mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Failed to compile gdbserver
@ 2018-07-30 11:29 Denis OSTERLAND
  2018-07-30 11:44 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Denis OSTERLAND @ 2018-07-30 11:29 UTC (permalink / raw)
  To: ptxdist

Hi,

I try to compile gdbserver with OSELAS.Toolchain-2018.02.0 on armv5te + armv7a, but it fails.
I tried the default version 7.6.1:

../gdbserver-7.6.1/gdb/gdbserver/linux-arm-low.c:328:1: error: conflicting types for 'ps_get_thread_area'
 ps_get_thread_area (const struct ps_prochandle *ph,
 ^~~~~~~~~~~~~~~~~~
In file included from ../gdbserver-7.6.1/gdb/gdbserver/gdb_proc_service.h:25:0,
                 from ../gdbserver-7.6.1/gdb/gdbserver/linux-low.h:25,
                 from ../gdbserver-7.6.1/gdb/gdbserver/linux-arm-low.c:20:
/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/include/proc_service.h:72:17: note: previous
declaration of 'ps_get_thread_area' was here
 extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
                 ^~~~~~~~~~~~~~~~~~
../gdbserver-7.6.1/gdb/gdbserver/proc-service.c:136:1: error: conflicting types for 'ps_lgetfpregs'
 ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
 ^~~~~~~~~~~~~
In file included from ../gdbserver-7.6.1/gdb/gdbserver/gdb_proc_service.h:25:0,
                 from ../gdbserver-7.6.1/gdb/gdbserver/linux-low.h:25,
                 from ../gdbserver-7.6.1/gdb/gdbserver/proc-service.c:27:
/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/include/proc_service.h:61:17: note: previous
declaration of 'ps_lgetfpregs' was here
 extern ps_err_e ps_lgetfpregs (struct ps_prochandle *,
                 ^~~~~~~~~~~~~
../gdbserver-7.6.1/gdb/gdbserver/proc-service.c:146:1: error: conflicting types for 'ps_lsetfpregs'
 ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
 ^~~~~~~~~~~~~
In file included from ../gdbserver-7.6.1/gdb/gdbserver/gdb_proc_service.h:25:0,
                 from ../gdbserver-7.6.1/gdb/gdbserver/linux-low.h:25,
                 from ../gdbserver-7.6.1/gdb/gdbserver/proc-service.c:27:
/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/include/proc_service.h:63:17: note: previous
declaration of 'ps_lsetfpregs' was here
 extern ps_err_e ps_lsetfpregs (struct ps_prochandle *,
                 ^~~~~~~~~~~~~
Makefile:232: recipe for target 'proc-service.o' failed
make[1]: *** [proc-service.o] Error 1


##################
I tried to use the GDB version from Toolchain too, but same result:

../gdbserver-7.8.1/gdb/gdbserver/linux-arm-low.c:337:1: error: conflicting types for 'ps_get_thread_area'
 ps_get_thread_area (const struct ps_prochandle *ph,
 ^~~~~~~~~~~~~~~~~~
In file included from ../gdbserver-7.8.1/gdb/gdbserver/gdb_proc_service.h:25:0,
                 from ../gdbserver-7.8.1/gdb/gdbserver/linux-low.h:23,
                 from ../gdbserver-7.8.1/gdb/gdbserver/linux-arm-low.c:20:
/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/include/proc_service.h:72:17: note: previous
declaration of 'ps_get_thread_area' was here
 extern ps_err_e ps_get_thread_area (struct ps_prochandle *,
                 ^~~~~~~~~~~~~~~~~~
Makefile:239: recipe for target 'linux-arm-low.o' failed
../gdbserver-7.8.1/gdb/gdbserver/proc-service.c:138:1: error: conflicting types for 'ps_lgetfpregs'
 ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
 ^~~~~~~~~~~~~
In file included from ../gdbserver-7.8.1/gdb/gdbserver/gdb_proc_service.h:25:0,
                 from ../gdbserver-7.8.1/gdb/gdbserver/linux-low.h:23,
                 from ../gdbserver-7.8.1/gdb/gdbserver/proc-service.c:27:
/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/include/proc_service.h:61:17: note: previous
declaration of 'ps_lgetfpregs' was here
 extern ps_err_e ps_lgetfpregs (struct ps_prochandle *,
                 ^~~~~~~~~~~~~
../gdbserver-7.8.1/gdb/gdbserver/proc-service.c:148:1: error: conflicting types for 'ps_lsetfpregs'
 ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
 ^~~~~~~~~~~~~
In file included from ../gdbserver-7.8.1/gdb/gdbserver/gdb_proc_service.h:25:0,
                 from ../gdbserver-7.8.1/gdb/gdbserver/linux-low.h:23,
                 from ../gdbserver-7.8.1/gdb/gdbserver/proc-service.c:27:
/opt/OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/include/proc_service.h:63:17: note: previous
declaration of 'ps_lsetfpregs' was here
 extern ps_err_e ps_lsetfpregs (struct ps_prochandle *,
                 ^~~~~~~~~~~~~
Makefile:239: recipe for target 'proc-service.o' failed
make[1]: *** [proc-service.o] Error 1

###################
Which versions do you use?

Regards Denis

Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. 
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Failed to compile gdbserver
  2018-07-30 11:29 [ptxdist] Failed to compile gdbserver Denis OSTERLAND
@ 2018-07-30 11:44 ` Michael Olbrich
  2018-07-30 11:56   ` Denis OSTERLAND
  2018-09-29 13:19   ` Andreas Pretzsch
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Olbrich @ 2018-07-30 11:44 UTC (permalink / raw)
  To: ptxdist

Hi,

On Mon, Jul 30, 2018 at 11:29:04AM +0000, Denis OSTERLAND wrote:
> I try to compile gdbserver with OSELAS.Toolchain-2018.02.0 on armv5te + armv7a, but it fails.
> I tried the default version 7.6.1:

You need to use the same version as the gdb in the toolchain. That's 8.1,
if I remember correctly.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Failed to compile gdbserver
  2018-07-30 11:44 ` Michael Olbrich
@ 2018-07-30 11:56   ` Denis OSTERLAND
  2018-09-29 13:19   ` Andreas Pretzsch
  1 sibling, 0 replies; 5+ messages in thread
From: Denis OSTERLAND @ 2018-07-30 11:56 UTC (permalink / raw)
  To: ptxdist

Am Montag, den 30.07.2018, 13:44 +0200 schrieb Michael Olbrich:
> Hi,
> 
> On Mon, Jul 30, 2018 at 11:29:04AM +0000, Denis OSTERLAND wrote:
> > 
> > I try to compile gdbserver with OSELAS.Toolchain-2018.02.0 on armv5te + armv7a, but it fails.
> > I tried the default version 7.6.1:
> You need to use the same version as the gdb in the toolchain. That's 8.1,
> if I remember correctly.
> 
> Michael
> 
Correct, that works.
Sorry, I mixed 7.8.1 and 8.1 somehow...

Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. 
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Failed to compile gdbserver
  2018-07-30 11:44 ` Michael Olbrich
  2018-07-30 11:56   ` Denis OSTERLAND
@ 2018-09-29 13:19   ` Andreas Pretzsch
  2018-10-09 10:45     ` Michael Olbrich
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Pretzsch @ 2018-09-29 13:19 UTC (permalink / raw)
  To: ptxdist

On Mon, 2018-07-30 at 13:44 +0200, Michael Olbrich wrote:
> On Mon, Jul 30, 2018 at 11:29:04AM +0000, Denis OSTERLAND wrote:
> > I try to compile gdbserver with OSELAS.Toolchain-2018.02.0 on
> > armv5te + armv7a, but it fails.
> > I tried the default version 7.6.1:

Just hit me too, same setup.
Well, with ptxdist-2018.09, but same topic.


> You need to use the same version as the gdb in the toolchain. That's
> 8.1, if I remember correctly.

Correct, there gdb 8.1 is used. Build is successful with
PTXCONF_GDB_VERSION="8.1"
PTXCONF_GDB_MD5="0c85ecbb43569ec43b1c9230622e84ab"


Might be worth to check this, like it's done with gcc and glibc.
Their versions are set in platformconfig (and checked), in this case:
PTXCONF_CROSSCHAIN_CHECK="7.3.1"
PTXCONF_GLIBC_VERSION="2.27"
And so kind of centralizing toolchain version dependencies.

But gdb version (which gdbserver follows) is set in ptxconfig, as
PTXCONF_GDB_VERSION and PTXCONF_GDB_MD5. Where it belongs to, as those
are installed to the target. Either gdbserver or even full gdb.

Thinking of ways to improve this, I could imagine

1.) keep PTXCONF_GDB_* in ptxconfig, but add some "use version from
toolchain" config flag, which will in turn take the data setup in
platformconfig (probably new options there)

2.) add it somehow to "ptxdist migrate" (sensible / doable ?)

3.) at least add a comment to the config options

For #3 I could send in a patch, for #1 or #2 I'd need some assistance
from PTX side.

Michael, what do you think, and prefer ?

Best regards,
  Andreas

-- 

carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch        Tel. +49-(0)7307-936088-1
Lange Strasse 28a                       Fax: +49-(0)7307-936088-9
89250 Senden, Germany                   email: apr@cn-eng.de


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] Failed to compile gdbserver
  2018-09-29 13:19   ` Andreas Pretzsch
@ 2018-10-09 10:45     ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2018-10-09 10:45 UTC (permalink / raw)
  To: ptxdist

On Sat, Sep 29, 2018 at 03:19:45PM +0200, Andreas Pretzsch wrote:
> On Mon, 2018-07-30 at 13:44 +0200, Michael Olbrich wrote:
> > On Mon, Jul 30, 2018 at 11:29:04AM +0000, Denis OSTERLAND wrote:
> > > I try to compile gdbserver with OSELAS.Toolchain-2018.02.0 on
> > > armv5te + armv7a, but it fails.
> > > I tried the default version 7.6.1:
> 
> Just hit me too, same setup.
> Well, with ptxdist-2018.09, but same topic.
> 
> 
> > You need to use the same version as the gdb in the toolchain. That's
> > 8.1, if I remember correctly.
> 
> Correct, there gdb 8.1 is used. Build is successful with
> PTXCONF_GDB_VERSION="8.1"
> PTXCONF_GDB_MD5="0c85ecbb43569ec43b1c9230622e84ab"
> 
> 
> Might be worth to check this, like it's done with gcc and glibc.
> Their versions are set in platformconfig (and checked), in this case:
> PTXCONF_CROSSCHAIN_CHECK="7.3.1"
> PTXCONF_GLIBC_VERSION="2.27"
> And so kind of centralizing toolchain version dependencies.
> 
> But gdb version (which gdbserver follows) is set in ptxconfig, as
> PTXCONF_GDB_VERSION and PTXCONF_GDB_MD5. Where it belongs to, as those
> are installed to the target. Either gdbserver or even full gdb.
> 
> Thinking of ways to improve this, I could imagine
> 
> 1.) keep PTXCONF_GDB_* in ptxconfig, but add some "use version from
> toolchain" config flag, which will in turn take the data setup in
> platformconfig (probably new options there)

I've implemented something like this:
For an OSELAS.Toolchain it will now fetch the version and md5 from the
toolchain ptxconfig. The md5 can be overwritten if necessary.
For all other toolchains <prefix>-gdb --version is parsed and the md5 must
be specified.
This is all optional, the old way to specify version and md5 can be used
too.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2018-10-09 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 11:29 [ptxdist] Failed to compile gdbserver Denis OSTERLAND
2018-07-30 11:44 ` Michael Olbrich
2018-07-30 11:56   ` Denis OSTERLAND
2018-09-29 13:19   ` Andreas Pretzsch
2018-10-09 10:45     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox