public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
       [not found] <E1at1Am-0004GM-6R@kwanyin.sergiodj.net>
@ 2016-04-21  9:09 ` Pedro Alves
  2016-04-21 20:56   ` Sergio Durigan Junior
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2016-04-21  9:09 UTC (permalink / raw)
  To: sergiodj+buildbot, gdb, Sergio Durigan Junior

On 04/21/2016 12:04 AM, sergiodj+buildbot@sergiodj.net wrote:
> Hello there,
> 
> Your commit:
> 
> 	Build GDB as a C++ program by default
> 	a23585089d7ba710b238d3d1ab3d34320afa48d0
> 
> broke GDB.  Please fix it, or the GDB gods will get you.
> 


> Full Build URL:
> 	<http://gdb-build.sergiodj.net/builders/Fedora-i686/builds/3465>
> 

This is "Fedora-i686", a 32-bit builder.

> 
> g++ -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common
> -I../../binutils-gdb/gdb/config
...
> -I../../binutils-gdb/gdb/../libdecnumber  -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1  -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o linux-thread-db.o -MT linux-thread-db.o -MMD -MP -MF .deps/linux-thread-db.Tpo ../../binutils-gdb/gdb/linux-thread-db.c
> In file included from ../../binutils-gdb/gdb/i386-linux-nat.c:25:0:
> ../../binutils-gdb/gdb/i386-linux-nat.c: In function void fetch_regs(regcache*, int):
> ../../binutils-gdb/gdb/i386-linux-nat.c:207:46: error: cast from elf_greg_t (*)[27] {aka long long unsigned int (*)[27]} to int loses precision [-fpermissive]
>    if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)


... however this error is exactly what you get if you compile with a
64-bit compiler, and forget to pass -m32 to gcc/g++.  IOW, 
it compiles i386-linux-nat.c as if for a 64-bit host, which fails.

So I suspect the builder is using CC="gcc -m32", and now that a C++ compiler
is involved, it needs to be updated to pass CXX="g++ -m32" as well.

Thanks,
Pedro Alves

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

* Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
  2016-04-21  9:09 ` 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB] Pedro Alves
@ 2016-04-21 20:56   ` Sergio Durigan Junior
  2016-04-27 19:06     ` Antoine Tremblay
  0 siblings, 1 reply; 5+ messages in thread
From: Sergio Durigan Junior @ 2016-04-21 20:56 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb

On Thursday, April 21 2016, Pedro Alves wrote:

>> g++ -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common
>> -I../../binutils-gdb/gdb/config
> ...
>> -I../../binutils-gdb/gdb/../libdecnumber
>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1
>> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
>> -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function
>> -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare
>> -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o
>> linux-thread-db.o -MT linux-thread-db.o -MMD -MP -MF
>> .deps/linux-thread-db.Tpo ../../binutils-gdb/gdb/linux-thread-db.c
>> In file included from ../../binutils-gdb/gdb/i386-linux-nat.c:25:0:
>> ../../binutils-gdb/gdb/i386-linux-nat.c: In function void fetch_regs(regcache*, int):
>> ../../binutils-gdb/gdb/i386-linux-nat.c:207:46: error: cast from elf_greg_t (*)[27] {aka long long unsigned int (*)[27]} to int loses precision [-fpermissive]
>>    if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
>
>
> ... however this error is exactly what you get if you compile with a
> 64-bit compiler, and forget to pass -m32 to gcc/g++.  IOW, 
> it compiles i386-linux-nat.c as if for a 64-bit host, which fails.
>
> So I suspect the builder is using CC="gcc -m32", and now that a C++ compiler
> is involved, it needs to be updated to pass CXX="g++ -m32" as well.

Yeah, actually I was setting CFLAGS without setting CXXFLAGS for these
builders, so I fixed that now.  Thanks for letting me know, and sorry
about that.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

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

* Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
  2016-04-21 20:56   ` Sergio Durigan Junior
@ 2016-04-27 19:06     ` Antoine Tremblay
  2016-04-27 19:39       ` Sergio Durigan Junior
  0 siblings, 1 reply; 5+ messages in thread
From: Antoine Tremblay @ 2016-04-27 19:06 UTC (permalink / raw)
  To: Sergio Durigan Junior; +Cc: Pedro Alves, gdb


Sergio Durigan Junior writes:

> On Thursday, April 21 2016, Pedro Alves wrote:
>
>>> g++ -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common
>>> -I../../binutils-gdb/gdb/config
>> ...
>>> -I../../binutils-gdb/gdb/../libdecnumber
>>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1
>>> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
>>> -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function
>>> -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare
>>> -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o
>>> linux-thread-db.o -MT linux-thread-db.o -MMD -MP -MF
>>> .deps/linux-thread-db.Tpo ../../binutils-gdb/gdb/linux-thread-db.c
>>> In file included from ../../binutils-gdb/gdb/i386-linux-nat.c:25:0:
>>> ../../binutils-gdb/gdb/i386-linux-nat.c: In function void fetch_regs(regcache*, int):
>>> ../../binutils-gdb/gdb/i386-linux-nat.c:207:46: error: cast from elf_greg_t (*)[27] {aka long long unsigned int (*)[27]} to int loses precision [-fpermissive]
>>>    if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
>>
>>
>> ... however this error is exactly what you get if you compile with a
>> 64-bit compiler, and forget to pass -m32 to gcc/g++.  IOW, 
>> it compiles i386-linux-nat.c as if for a 64-bit host, which fails.
>>
>> So I suspect the builder is using CC="gcc -m32", and now that a C++ compiler
>> is involved, it needs to be updated to pass CXX="g++ -m32" as well.
>
> Yeah, actually I was setting CFLAGS without setting CXXFLAGS for these
> builders, so I fixed that now.  Thanks for letting me know, and sorry
> about that.

I was looking at
http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/3499/steps/configure%20gdb/logs/stdio

And it seems it builds in 64 bit, there's no --host=i386... or -m32 ?

Thanks,
Antoine

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

* Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
  2016-04-27 19:06     ` Antoine Tremblay
@ 2016-04-27 19:39       ` Sergio Durigan Junior
  2016-04-27 19:54         ` Antoine Tremblay
  0 siblings, 1 reply; 5+ messages in thread
From: Sergio Durigan Junior @ 2016-04-27 19:39 UTC (permalink / raw)
  To: Antoine Tremblay; +Cc: Pedro Alves, gdb

On Wednesday, April 27 2016, Antoine Tremblay wrote:

> Sergio Durigan Junior writes:
>
>> On Thursday, April 21 2016, Pedro Alves wrote:
>>
>>>> g++ -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common
>>>> -I../../binutils-gdb/gdb/config
>>> ...
>>>> -I../../binutils-gdb/gdb/../libdecnumber
>>>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1
>>>> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
>>>> -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function
>>>> -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare
>>>> -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o
>>>> linux-thread-db.o -MT linux-thread-db.o -MMD -MP -MF
>>>> .deps/linux-thread-db.Tpo ../../binutils-gdb/gdb/linux-thread-db.c
>>>> In file included from ../../binutils-gdb/gdb/i386-linux-nat.c:25:0:
>>>> ../../binutils-gdb/gdb/i386-linux-nat.c: In function void fetch_regs(regcache*, int):
>>>> ../../binutils-gdb/gdb/i386-linux-nat.c:207:46: error: cast from elf_greg_t (*)[27] {aka long long unsigned int (*)[27]} to int loses precision [-fpermissive]
>>>>    if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
>>>
>>>
>>> ... however this error is exactly what you get if you compile with a
>>> 64-bit compiler, and forget to pass -m32 to gcc/g++.  IOW, 
>>> it compiles i386-linux-nat.c as if for a 64-bit host, which fails.
>>>
>>> So I suspect the builder is using CC="gcc -m32", and now that a C++ compiler
>>> is involved, it needs to be updated to pass CXX="g++ -m32" as well.
>>
>> Yeah, actually I was setting CFLAGS without setting CXXFLAGS for these
>> builders, so I fixed that now.  Thanks for letting me know, and sorry
>> about that.
>
> I was looking at
> http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/3499/steps/configure%20gdb/logs/stdio
>
> And it seems it builds in 64 bit, there's no --host=i386... or -m32 ?

Hey Antoine,

Thanks for the message.  So, as I said on IRC, the purpose of this
builder is to perform a 64-bit compilation of GDB (i.e., without -m32),
but run the testsuite on 32-bit mode (i.e., passing
--target_board=unix/-m32 to runtest).

Maybe the builder's name is confusing, and I apologize for that.  I
could try to add a better description of it on the page.

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

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

* Re: 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB]
  2016-04-27 19:39       ` Sergio Durigan Junior
@ 2016-04-27 19:54         ` Antoine Tremblay
  0 siblings, 0 replies; 5+ messages in thread
From: Antoine Tremblay @ 2016-04-27 19:54 UTC (permalink / raw)
  To: Sergio Durigan Junior; +Cc: Antoine Tremblay, Pedro Alves, gdb


Sergio Durigan Junior writes:

> On Wednesday, April 27 2016, Antoine Tremblay wrote:
>
>> Sergio Durigan Junior writes:
>>
>>> On Thursday, April 21 2016, Pedro Alves wrote:
>>>
>>>>> g++ -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common
>>>>> -I../../binutils-gdb/gdb/config
>>>> ...
>>>>> -I../../binutils-gdb/gdb/../libdecnumber
>>>>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1
>>>>> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
>>>>> -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function
>>>>> -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare
>>>>> -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o
>>>>> linux-thread-db.o -MT linux-thread-db.o -MMD -MP -MF
>>>>> .deps/linux-thread-db.Tpo ../../binutils-gdb/gdb/linux-thread-db.c
>>>>> In file included from ../../binutils-gdb/gdb/i386-linux-nat.c:25:0:
>>>>> ../../binutils-gdb/gdb/i386-linux-nat.c: In function void fetch_regs(regcache*, int):
>>>>> ../../binutils-gdb/gdb/i386-linux-nat.c:207:46: error: cast from elf_greg_t (*)[27] {aka long long unsigned int (*)[27]} to int loses precision [-fpermissive]
>>>>>    if (ptrace (PTRACE_GETREGS, tid, 0, (int) &regs) < 0)
>>>>
>>>>
>>>> ... however this error is exactly what you get if you compile with a
>>>> 64-bit compiler, and forget to pass -m32 to gcc/g++.  IOW, 
>>>> it compiles i386-linux-nat.c as if for a 64-bit host, which fails.
>>>>
>>>> So I suspect the builder is using CC="gcc -m32", and now that a C++ compiler
>>>> is involved, it needs to be updated to pass CXX="g++ -m32" as well.
>>>
>>> Yeah, actually I was setting CFLAGS without setting CXXFLAGS for these
>>> builders, so I fixed that now.  Thanks for letting me know, and sorry
>>> about that.
>>
>> I was looking at
>> http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/3499/steps/configure%20gdb/logs/stdio
>>
>> And it seems it builds in 64 bit, there's no --host=i386... or -m32 ?
>
> Hey Antoine,
>
> Thanks for the message.  So, as I said on IRC, the purpose of this
> builder is to perform a 64-bit compilation of GDB (i.e., without -m32),
> but run the testsuite on 32-bit mode (i.e., passing
> --target_board=unix/-m32 to runtest).
>
> Maybe the builder's name is confusing, and I apologize for that.  I
> could try to add a better description of it on the page.
>
Hehe yes thanks for the clarification, I was actually looking at an
example to build a 32bit gdb and I just clicked on the m32 tag...

Guess I went too fast there.

Thanks,
Antoine

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

end of thread, other threads:[~2016-04-27 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1at1Am-0004GM-6R@kwanyin.sergiodj.net>
2016-04-21  9:09 ` 32-bit buildbot builders broken [Re: Your commit 'Build GDB as a C++ program by default' broke GDB] Pedro Alves
2016-04-21 20:56   ` Sergio Durigan Junior
2016-04-27 19:06     ` Antoine Tremblay
2016-04-27 19:39       ` Sergio Durigan Junior
2016-04-27 19:54         ` Antoine Tremblay

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