gtkd-developers / GlibD

D bindings for the GLib C Utility Library.
Other
5 stars 3 forks source link

Cannot build on Debian Sid #2

Open russel opened 5 years ago

russel commented 5 years ago

I cloned the repository, then tried:

|> dub build
Invalid source/import path: /home/users/russel/Repositories/Git/Forks/GlibD/generated
Running pre-generate commands for glibd...
Getting a release version failed: (1): Error: Got JSON of type null_, expected object.
Retry with ~master...
(1): Error: Got JSON of type null_, expected object.
Failed to find a package named 'girtod'.
Command failed with exit code 2: cd /home/users/russel/Repositories/Git/Forks/GlibD && dub run girtod -- -i src -o generated --use-runtime-linker

then I tried the Meson build:

|> meson --prefix=$HOME/Built ~/Repositories/Git/Forks/GlibD
The Meson build system
Version: 0.48.0
Source dir: /home/users/russel/Repositories/Git/Forks/GlibD
Build dir: /home/users/russel/BuildArea/GlibD
Build type: native build
Project name: GlibD
Project version: 2.0.0
Native D compiler: ldc2 (llvm 1.11.0 "LDC - the LLVM D compiler (1.11.0):")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29)
Dependency glib-2.0 found: YES 2.58.1
Dependency gobject-2.0 found: YES 2.58.1
Dependency gio-2.0 found: YES 2.58.1
Dependency gobject-introspection-1.0 found: NO (tried pkgconfig)

meson.build:21:0: ERROR:  Dependency "gobject-introspection-1.0" not found, tried pkgconfig

which is a bit sad since:

|> aptitude search gobject-introspection
i   gobject-introspection                                                            - Generate interface introspection data for GObject libraries                                
p   ruby-gobject-introspection                                                       - GObject Introspection bindings for the Ruby language                  
MikeWey commented 5 years ago

The pkgconfig file for gobject introspection, and the gir files we actually depend on are part of the libgirepository1.0-dev package on debian.

MikeWey commented 5 years ago

I've added girtod (and GlibD) to code.dlang.org, that should fix the first error though you will still need libgirepository1.0-dev in both cases.

russel commented 5 years ago

I was focused on the wrong package. :-( And I was using the one machine that didn't already have it installed. :-( :-(

russel commented 5 years ago

For the Dub build:

|> dub build --compiler=ldc2
Invalid source/import path: /home/users/russel/Repositories/Git/Forks/GlibD/generated
Running pre-generate commands for glibd...
Fetching girtod 0.16.1...
Please note that you need to use `dub run <pkgname>` or add it to dependencies of your package to actually use/run it. dub does not do actual installation of packages outside of its own ecosystem.
Building package girtod in /home/users/russel/.dub/packages/girtod-0.16.1/girtod/
Running pre-generate commands for girtod...
Performing "$DFLAGS" build using /usr/bin/dmd for x86_64.
girtod 0.16.1: building configuration "application"...
Linking...
Running ../../../../.dub/packages/girtod-0.16.1/girtod/girtod -i src -o generated --use-runtime-linker
copying file [src/gtkd] to [generated/gtkd]
Configuration 'library' of package glibd contains no source files. Please add {"targetType": "none"} to its package description to avoid building it.
Main package must have a binary target type, not none. Cannot build.

I'm not quite sure why it is trying to use DMD in the middle there.

russel commented 5 years ago

For the Meson build, which is more important in my current context:

|> meson --prefix=$HOME/Built ~/Repositories/Git/Forks/GlibD
The Meson build system
Version: 0.48.0
Source dir: /home/users/russel/Repositories/Git/Forks/GlibD
Build dir: /home/users/russel/BuildArea/GlibD
Build type: native build
Project name: GlibD
Project version: 2.0.0
Native D compiler: ldc2 (llvm 1.11.0 "LDC - the LLVM D compiler (1.11.0):")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29)
Dependency glib-2.0 found: YES 2.58.1
Dependency gobject-2.0 found: YES 2.58.1
Dependency gio-2.0 found: YES 2.58.1
Dependency gobject-introspection-1.0 found: YES 1.58.0
Program girtod found: YES (/home/users/russel/Built/bin/girtod)
Message: Generating D interfaces from GIR...
Build targets in project: 2
Found ninja-1.8.2 at /usr/bin/ninja
515 anglides:~/BuildArea/GlibD 
|> ninja
[330/330] Linking target tests/gobject/value_test.
MikeWey commented 5 years ago

The dub build used to work, but there seems to be a regression in how the preGenerateCommands are handled. https://github.com/dlang/dub/issues/1474