#3611 new defect

qemu/glib fails to build with newer gcc

Reported by: Martin Erik Werner Owned by:
Priority: normal Milestone:
Component: tool/rsb Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The rsb qemu build fails on Debian Stretch with the following error:

CC libglib_2_0_la-gdate.lo

../../glib-2.39.3/glib/gdate.c: In function 'g_date_strftime':
../../glib-2.39.3/glib/gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]

tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
~

I experimented around a bit and if glib is updated to version 2.48.2 this seems to be solved, but then it instead fails due to a missing libpcre dependency.

I tried forcing the internal version of pcre instead, and that seemed to at least make the build go through.

The experimentation I did is attached as a patch.

I tested the build result qemu-system-or32 briefly, and I'm not sure it works properly in the end:

$ ~/utv/rtems-build/5/bin/qemu-system-or32

(process:18292): GLib-WARNING : ../../glib-2.48.2/glib/gmem.c:483: custom memory allocation vtable not supported
qemu: fatal: Trying to execute code outside RAM or ROM at 0x08000000

PC=08000000
R00=00000000 R01=00000000 R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=00000000
R16=00000000 R17=00000000 R18=00000000 R19=00000000
R20=00000000 R21=00000000 R22=00000000 R23=00000000
R24=00000000 R25=00000000 R26=00000000 R27=00000000
R28=00000000 R29=00000000 R30=00000000 R31=00000000
Aborted

$ ~/utv/rtems-build/5/bin/qemu-system-or32 -serial mon:stdio -kernel ~/utv/rtems-build/bsp-generic_or1k-build/or1k-rtems5/c/generic_or1k/testsuites/samples/hello.exe

(process:5042): GLib-WARNING : ../../glib-2.48.2/glib/gmem.c:483: custom memory allocation vtable not supported

(nothing more happens...)

Attachments (1)

0001-qemu-Update-glib-to-build-on-newer-gcc.patch (2.8 KB) - added by Martin Erik Werner on Nov 17, 2018 at 4:25:13 PM.

Download all attachments as: .zip

Change History (1)

Note: See TracTickets for help on using tickets.