Closed russel closed 5 years ago
@russel This is a regression in Meson 0.48.0 (one of quite a few, unfortunately...). Try downgrading or upgrading Meson to fix this issue. See https://github.com/mesonbuild/meson/pull/4342 for the patch that fixes the problem in the next release, and a few more details on the bug.
@ximion I have a clone of Meson so can use master/HEAD instead of the Debian or Fedora release packages to avoid being blocked on this problem.
I don't observe this issue anymore with gir-to-d, but I do observe a new problem when trying to build GlibD on Rawhide with gir-to-d 0.17.0.
Dependency glib-2.0 found: YES 2.59.0
Dependency gobject-2.0 found: YES 2.59.0
Dependency gio-2.0 found: YES 2.59.0
Dependency gobject-introspection-1.0 found: YES 1.59.3
...
Program girtod found: YES (/usr/bin/girtod)
Message: Generating D interfaces from GIR...
Running command: /usr/bin/girtod -i /builddir/build/BUILD/GlibD-2.0.2/src -o /builddir/build/BUILD/GlibD-2.0.2/x86_64-redhat-linux-gnu/generated --print-files relative,/builddir/build/BUILD/GlibD-2.0.2
--- stdout ---
x86_64-redhat-linux-gnu/generated/gtkd/Implement.d
x86_64-redhat-linux-gnu/generated/gtkd/paths.d
x86_64-redhat-linux-gnu/generated/gtkd/Loader.d
--- stderr ---
Error /usr/share/gir-1.0/GLib-2.0.gir(21): Unexpected tag: source-position in GirAlias: DateDay
meson.build:36:4: ERROR: Problem encountered: Unable to build D intefaces from GIR:
Error /usr/share/gir-1.0/GLib-2.0.gir(21): Unexpected tag: source-position in GirAlias: DateDay
I can't reproduce this locally, could you post the first 40 lines of the GLib-2.0.gir file?
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.2"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<package name="glib-2.0"/>
<c:include name="glib.h"/>
<namespace name="GLib"
version="2.0"
shared-library="libgobject-2.0.so.0,libglib-2.0.so.0"
c:identifier-prefixes="G"
c:symbol-prefixes="g,glib">
<alias name="DateDay" c:type="GDateDay">
<doc xml:space="preserve"
filename="glib-2.0.c"
line="289">Integer representing a day of the month; between 1 and 31.
#G_DATE_BAD_DAY represents an invalid day of the month.</doc>
<source-position filename="gdate.h" line="50"/>
<type name="guint8" c:type="guint8"/>
</alias>
<alias name="DateYear" c:type="GDateYear">
<doc xml:space="preserve"
filename="glib-2.0.c"
line="334">Integer representing a year; #G_DATE_BAD_YEAR is the invalid
value. The year must be 1 or higher; negative (BC) years are not
allowed. The year is represented with four digits.</doc>
<source-position filename="gdate.h" line="49"/>
<type name="guint16" c:type="guint16"/>
</alias>
<alias name="MutexLocker" c:type="GMutexLocker">
<doc xml:space="preserve"
filename="gthread.h"
line="270">Opaque type. See g_mutex_locker_new() for details.</doc>
<source-position filename="gthread.h" line="276"/>
<type name="none" c:type="void"/>
</alias>
<alias name="Pid" c:type="GPid">
Looks like they added the source location of the symbol to the gir files.
I think https://github.com/gtkd-developers/gir-to-d/commit/44ad4768734fdfe0b37b7097a71c85287c8a297a updates gir-to-d for the possible locations this could be used.
@MikeWey That helped, and now I got further along in the GlibD build, but I see this error now, and I'm not sure whether it means it's a gir-to-d issue or a GlibD issue:
FAILED: glibd-2.0@sha/x86_64-redhat-linux-gnu_generated_glib_c_types.d.o
ldc2 -I=glibd-2.0@sha -I=. -I=.. -I=generated -I=../generated -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -enable-color -release -w -g -O1 -relocation-model=pic -of='glibd-2.0@sha/x86_64-redhat-linux-gnu_generated_glib_c_types.d.o' -c ../x86_64-redhat-linux-gnu/generated/glib/c/types.d
../x86_64-redhat-linux-gnu/generated/glib/c/types.d(4539): Error: use `real` instead of `long double`
That's repeating for each of the four compilation units it gets to before it dies...
It's an issue with gir-to-d, should be fixed now.
I'm afraid I have now ditched Fedora, and am solely on Debian Sid, so having started this issue, I can't contribute now. Sorry.
@MikeWey This is definitely fixed now.
gir-to-d: https://koji.fedoraproject.org/koji/buildinfo?buildID=1191994 glibd: https://koji.fedoraproject.org/koji/buildinfo?buildID=1199351
I just tried building on Fedora Rawhide (fully up to date as at 2018-10-17T07:10+01:00)
So far so good. However: