After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668104 - Vala packages should be checked only when building from git
Vala packages should be checked only when building from git
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-01-17 15:45 UTC by Stefano Facchini
Modified: 2016-03-31 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: only check for Vala packages when building from Vala (1.94 KB, patch)
2012-01-17 15:46 UTC, Stefano Facchini
none Details | Review
build: improve the build from vala (3.37 KB, patch)
2012-01-19 13:27 UTC, Stefano Facchini
reviewed Details | Review
build: improve the build from vala (3.22 KB, patch)
2012-01-19 15:31 UTC, Stefano Facchini
committed Details | Review
Output from augogen.sh (and ./configure) (6.54 KB, application/octet-stream)
2012-02-06 13:13 UTC, nathansamson
  Details
config.log (41.02 KB, application/octet-stream)
2012-02-06 13:13 UTC, nathansamson
  Details

Description Stefano Facchini 2012-01-17 15:45:25 UTC
E.g. they shouldn't be checked when building from a tarball
Comment 1 Stefano Facchini 2012-01-17 15:46:01 UTC
Created attachment 205455 [details] [review]
build: only check for Vala packages when building from Vala
Comment 2 Zeeshan Ali 2012-01-19 03:54:15 UTC
I agree with the change itself but I think we should steal the RYGEL_CHECK_VALA() macro from rygel which AFAICT more complete, tested and reduces the needed changes in configure.ac.
Comment 3 Marc-Andre Lureau 2012-01-19 10:43:10 UTC
(In reply to comment #2)
> I agree with the change itself but I think we should steal the
> RYGEL_CHECK_VALA() macro from rygel which AFAICT more complete, tested and
> reduces the needed changes in configure.ac.

I just looked at this macro. It does things I am not sure we need, --enable-strict-vala can be done differently with VALAFLAGS="--fatal-warnings" (also it's bad to use a different naming)

Checking the stamp files in configure is perhaps not a bad idea. Hardcoding gupnp-vala is certainly not a good idea.

Also, if the macro proved to be useful among several projects, it's best to make it part of vala.m4 itself, instead of copy & modify everywhere, but that can be done as part of this bug.

I think we could go with Stefano patch for now, but if Stefano is up to the task then great :)
Comment 4 Stefano Facchini 2012-01-19 13:27:17 UTC
Created attachment 205620 [details] [review]
build: improve the build from vala

Hi,
this is a cut-n-paste of some relevant parte of Rygel build system,
adapted to Boxes.

If something like this is to be included in vala.m4, probabily
some fixes for the VALA_CHECK macro are required to allow for (optional)
additional package checks (e.g. gupnp in Rygel)
Comment 5 Marc-Andre Lureau 2012-01-19 15:12:02 UTC
Review of attachment 205620 [details] [review]:

looks good, minor comment bellow

::: Makefile.am
@@ +54,1 @@
 

what is this line for?
Comment 6 Stefano Facchini 2012-01-19 15:30:34 UTC
(In reply to comment #5)

> ::: Makefile.am
> @@ +54,1 @@
> 
> 
> what is this line for?

Actually a leftover :)
I was just a bit concerned in removing that line from the list of files to be deleted
Comment 7 Stefano Facchini 2012-01-19 15:31:28 UTC
Created attachment 205628 [details] [review]
build: improve the build from vala
Comment 8 Marc-Andre Lureau 2012-01-19 15:37:24 UTC
Review of attachment 205628 [details] [review]:

ack
Comment 9 Christophe Fergeau 2012-01-23 18:02:03 UTC
diff --git a/autogen.sh b/autogen.sh
index ad5c1e9..018607b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,5 +9,5 @@ autoreconf -v --force --install
 intltoolize -f
 
 if [ -z "$NOCONFIGURE" ]; then
-    "$srcdir"/configure --enable-maintainer-mode ${1+"$@"}
+    "$srcdir"/configure --enable-vala --enable-maintainer-mode ${1+"$@"}
 fi

This bit was in the first iterations but then went missing, I think we still need it, don't we ?
Comment 10 Zeeshan Ali 2012-01-23 20:40:38 UTC
(In reply to comment #9)
> diff --git a/autogen.sh b/autogen.sh
> index ad5c1e9..018607b 100755
> --- a/autogen.sh
> +++ b/autogen.sh
> @@ -9,5 +9,5 @@ autoreconf -v --force --install
>  intltoolize -f
> 
>  if [ -z "$NOCONFIGURE" ]; then
> -    "$srcdir"/configure --enable-maintainer-mode ${1+"$@"}
> +    "$srcdir"/configure --enable-vala --enable-maintainer-mode ${1+"$@"}
>  fi
> 
> This bit was in the first iterations but then went missing, I think we still
> need it, don't we ?

Indeed we do. I talked to Stefano about it on IRC but then forgot about it. :(
Comment 11 nathansamson 2012-02-05 22:12:31 UTC
I have the build error (configure error)

   checking for BOXES... yes
   configure: WARNING: Missing stamp file ./src/gnome_boxes_vala.stamp. Forcing vala mode
   ./configure: line 16562: syntax error near unexpected token `newline'
   ./configure: line 16562: `  VALA_CHECK_PACKAGES('

It seems to do with this change. Anything I can do to fix this? (I'm using git master, shouldn't that be clear).
Comment 12 Christophe Fergeau 2012-02-06 09:36:49 UTC
Have you rerun autogen.sh?
Comment 13 nathansamson 2012-02-06 11:08:22 UTC
Yes
Comment 14 Christophe Fergeau 2012-02-06 12:45:14 UTC
Hmm maybe try 
git clean -dfx; ./autogen.sh
(warning: git clean -dfx will permanently delete all files from the gnome-boxes directory that are not tracked by git)
Comment 15 nathansamson 2012-02-06 12:49:25 UTC
Same problem.

Note that this was the first time I've tried to compile gnome-boxes from git, so in principle no leftovers should be there...

(Note that I changed your command to "git clean -dfx; PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./autogen.sh" because GTK is compoled from source and installed in /usr/local.

Are there any needs for the vala version (I compiled latest release 0.15.1) to let this work?
Comment 16 Christophe Fergeau 2012-02-06 13:04:17 UTC
These VALA macros are defined in m4/boxes.m4 so vala shouldn't be needed at all for them to get expanded correctly. Can you give the whole autogen.sh log?
Comment 17 nathansamson 2012-02-06 13:13:19 UTC
Created attachment 206877 [details]
Output from augogen.sh (and ./configure)
Comment 18 nathansamson 2012-02-06 13:13:42 UTC
Created attachment 206878 [details]
config.log