Discussion:
Bug#942059: gcc-9-cross: uses “long” as “time_t” leading to failure on most new 32-bit architectures
Add Reply
Thorsten Glaser
2019-10-09 17:20:01 UTC
Reply
Permalink
Source: gcc-9-cross
Version: 12
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)


x86_64-linux-gnux32-g++-9 -fno-PIE -c -g -I-I../../src/gcc/gm2 -Igm2 -I../../src/gcc/gm2/gm2-gcc -Igm2/gm2-gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -DHAVE_CONFIG_H -I. -Igm2 -I../../src/gcc -I../../src/gcc/gm2 -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/bid -I../libdecnumber -I../../src/gcc/../libbacktrace -I. -Igm2 -I../../src/gcc -I../../src/gcc/gm2 -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/bid -I../libdecnumber -I../../src/gcc/../libbacktrace ../../src/gcc/gm2/gm2-lang.c -o gm2/gm2-lang.o
../../src/gcc/gm2/m2.flex: In function 'void handleDate()':
../../src/gcc/gm2/m2.flex:354:24: error: cannot convert 'long int*' to 'time_t*' {aka 'long long int*'}
354 | time_t clock = time((long *)0);
| ^~~~~~~~~
| |
| long int*
In file included from ../../src/gcc/system.h:337,
from ../../src/gcc/gm2/gm2-gcc/gcc-consolidation.h:23,
from ../../src/gcc/gm2/m2.flex:22:
/usr/include/time.h:75:29: note: initializing argument 1 of 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ~~~~~~~~^~~~~~~
make[5]: *** [../../src/gcc/gm2/Make-lang.in:1124: gm2/gm2-compiler-boot/m2flex.o] Error 1
Gaius Mulley
2019-10-10 09:30:01 UTC
Reply
Permalink
Control: severity -1 important
Control: reassign -1 src:gcc-9-cross-ports
As always, I appreciate your detailed analysis, level of detail
(including the gcc-9-source version number), and thoroughly written
bug report. No, most 32bit archs build fine, it's just x32 having
that issue.
Post by Thorsten Glaser
Source: gcc-9-cross
Version: 12
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
Hi,

I've now git pushed a fix to the 9.2.0 gm2 branch (and also the master
trunk). Many thanks for the report,


regards,
Gaius
Gaius Mulley
2019-10-10 09:50:01 UTC
Reply
Permalink
Control: severity -1 important
Control: reassign -1 src:gcc-9-cross-ports
As always, I appreciate your detailed analysis, level of detail
(including the gcc-9-source version number), and thoroughly written
bug report. No, most 32bit archs build fine, it's just x32 having
that issue.
Post by Thorsten Glaser
Source: gcc-9-cross
Version: 12
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
x86_64-linux-gnux32-g++-9 -fno-PIE -c -g -I-I../../src/gcc/gm2 -Igm2
-I../../src/gcc/gm2/gm2-gcc -Igm2/gm2-gcc -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -DHAVE_CONFIG_H -I. -Igm2 -I../../src/gcc
-I../../src/gcc/gm2 -I../../src/gcc/../include
-I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber
-I../../src/gcc/../libdecnumber/bid -I../libdecnumber
-I../../src/gcc/../libbacktrace -I. -Igm2 -I../../src/gcc
-I../../src/gcc/gm2 -I../../src/gcc/../include
-I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber
-I../../src/gcc/../libdecnumber/bid -I../libdecnumber
-I../../src/gcc/../libbacktrace ../../src/gcc/gm2/gm2-lang.c -o
gm2/gm2-lang.o
../../src/gcc/gm2/m2.flex:354:24: error: cannot convert 'long int*' to 'time_t*' {aka 'long long int*'}
354 | time_t clock = time((long *)0);
| ^~~~~~~~~
| |
| long int*
In file included from ../../src/gcc/system.h:337,
from ../../src/gcc/gm2/gm2-gcc/gcc-consolidation.h:23,
/usr/include/time.h:75:29: note: initializing argument 1 of 'time_t time(time_t*)'
75 | extern time_t time (time_t *__timer) __THROW;
| ~~~~~~~~^~~~~~~
make[5]: *** [../../src/gcc/gm2/Make-lang.in:1124: gm2/gm2-compiler-boot/m2flex.o] Error 1
Hi Matthias,

many thanks for the report - will fix this,



regards,
Gaius
Thorsten Glaser
2019-10-15 15:40:02 UTC
Reply
Permalink
Control: reassign -1 src:gcc-9-cross
Control: found -1 12
Control: severity -1 important
Control: reassign -1 src:gcc-9-cross-ports
No, this is wrong. It may fail in src:gcc-9-cross-ports (=3D 10)
as well (which it does according to
https://buildd.debian.org/status/package.php?p=3Dgcc-9-cross-ports
anyway) but this report is about src:gcc-9-cross (=3D 12) which is
a blocker for building src:binutils:

https://buildd.debian.org/status/package.php?p=3Dgcc-9-cross has
the build failure and=E2=80=A6
[51]Buildd exposure stats [52]x32 [53]=E2=86=93 12 [54]Build-Attempted =
34d 9h 49m [55]x32-do-02 out-of-date
misc [56]old | [57]all (1)
=E2=80=A6 and https://buildd.debian.org/status/package.php?p=3Dbinutils has=
:
[133]Buildd exposure stats [134]x32 2.33.1-1 BD-Uninstallable 4h 34m out=
-of-date devel [135]old | no log

Dependency installability problem for [144]binutils on x32:

binutils build-depends on:
- [145]g++-x86-64-linux-gnu:x32
[146]g++-x86-64-linux-gnu depends on:
- [147]g++-9-x86-64-linux-gnu:x32 (>=3D 9.2.1-1~)
[148]g++-9-x86-64-linux-gnu depends on:
- [149]gcc-9-x86-64-linux-gnu:x32 (=3D 9.2.1-1cross1)
[150]gcc-9-x86-64-linux-gnu depends on missing:
- [151]libisl19:x32 (>=3D 0.15)

So this is about the cross compiler _from_ x32 _to_ amd64 (apparently)
which is src:gcc-9-cross, not src:gcc-9-cross-ports.

Please fix this in an upload RSN due to the binutils issue.

Thanks,
//mirabilos
--=20
tarent solutions GmbH
Rochusstra=C3=9Fe 2-4, D-53123 Bonn =E2=80=A2 http://www.tarent.de/
Tel: +49 228 54881-393 =E2=80=A2 Fax: +49 228 54881-235
HRB 5168 (AG Bonn) =E2=80=A2 USt-ID (VAT): DE122264941
Gesch=C3=A4ftsf=C3=BChrer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Ale=
xander Steeg

**********

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontak=
t.

**********

Loading...