Opened 7 years ago

Closed 7 years ago

#9738 closed defect (fixed)

vala-0.38.0 will not build without graphviz (Update to vala-0.38.1)

Reported by: Douglas R. Reno Owned by: bdubbs@…
Priority: normal Milestone: 8.2
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

This ticket is to remind us to pay attention to

https://bugzilla.gnome.org/show_bug.cgi?id=787375

As of right now, graphviz is required because of valadoc, but that dependency should be able to be removed. There is a patch in that bug report that doesn't work even when the hunks are applied manually because it tries to make a call to valac and can't because it doesn't exist.

Could it be an FTBFS in another component? That's certainly possible.

I'm attaching my version of the patch.

Attachments (1)

vala-0.38.0-disable_graphviz_dependency-1.patch (6.4 KB ) - added by Douglas R. Reno 7 years ago.

Download all attachments as: .zip

Change History (18)

by Douglas R. Reno, 7 years ago

comment:1 by Douglas R. Reno, 7 years ago

Type: enhancementdefect

comment:2 by bdubbs@…, 7 years ago

Owner: changed from blfs-book@… to bdubbs@…
Status: newassigned

comment:3 by Armin K, 7 years ago

The irony of a compiler being written in the language it was supposed to compile.

Vala compiler itself is written in vala, but the nature of the language is that it generates C code from vala code, and then a C compiler is used further.

That means that even though code in repo is vala, in the tarball there are also C files (similar to situation where there's xml and pre-generated man pages for certain packages) which can be compiled without presence of a vala compiler. But as soon as one of the vala files is touched, the C file also needs to be regenerated, which will require vala compiler (which you are trying to build).

So yeah, it's a chicken and egg problem: to create a proper patch, you'd need to apply the patch on a system with vala, and let it regenerate the C file that corresponds to the file being changed.

comment:4 by Pierre Labastie, 7 years ago

What's wrong with requiring graphviz as a dependency? Usually, we do not go much against upstream decisions, even if we do not agree with them. Graphviz is not such a big package, that we might be reluctant to build it...

Anyway, I've already fixed the book, adding graphviz to required dependencies. If there is a consensus against that, please feel free to remove it. But my opinion is just that it will make the page more complicated for not much gain.

comment:5 by Pierre Labastie, 7 years ago

Well, there is a circular dependency at the recommended level: graphiz recommends librsvg which recommends vala. But graphviz can be built without any of its recommended deps, and vala then builds OK. Maybe this information could be added to the vala page.

in reply to:  5 ; comment:6 by bdubbs@…, 7 years ago

Replying to pierre.labastie:

Well, there is a circular dependency at the recommended level: graphiz recommends librsvg which recommends vala. But graphviz can be built without any of its recommended deps, and vala then builds OK. Maybe this information could be added to the vala page.

As an experiment, I was able to build graphviz on a pristine LFS (chrrot) build. I had to add --enable-swig=no but it did build.

The problem is, why should a user have to do that if the only thing that is needed is vala and if valadoc, Vala Documentation Tool, is not needed or wanted by the user?

Depending on the build order and user needs, it may require the user to build graphviz twice. I think this is something we need to avoid if possible.

comment:7 by bdubbs@…, 7 years ago

I was able to disable valadoc, and thus not need graphviz, with:

sed -i /valadoc/d Makefile.in

Should we add this to the book with the appropriate explanation?

in reply to:  7 comment:8 by Pierre Labastie, 7 years ago

Replying to bdubbs@…:

I was able to disable valadoc, and thus not need graphviz, with:

sed -i /valadoc/d Makefile.in

Should we add this to the book with the appropriate explanation?

It seems to me that it is not enough: configure tests the presence and usability of libgvc, and throws an error if not found. So in addition to the sed above, the lines starting with "PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)..." should be removed from configure.ac (and autogen.sh should be run).

in reply to:  6 ; comment:9 by Pierre Labastie, 7 years ago

Replying to bdubbs@…:

Replying to pierre.labastie:

Well, there is a circular dependency at the recommended level: graphiz recommends librsvg which recommends vala. But graphviz can be built without any of its recommended deps, and vala then builds OK. Maybe this information could be added to the vala page.

As an experiment, I was able to build graphviz on a pristine LFS (chrrot) build. I had to add --enable-swig=no but it did build.

I'm curious why this should be required: we do not have this in the instructions, and swig is said to be optional...

The problem is, why should a user have to do that if the only thing that is needed is vala and if valadoc, Vala Documentation Tool, is not needed or wanted by the user?

Depending on the build order and user needs, it may require the user to build graphviz twice. I think this is something we need to avoid if possible.

Building graphviz without any dependency takes about 2 minutes on a modern computer... Maintaining a patch to remove valadoc will add editing work for each release of vala (which is often!). Upstream has made a bad move, I agree, but if we were to fix all upstream bad decisions, we would have thousands of patches... In this case, we can live with it, and we just need to explain how to proceed, as we do for the freetype<->harfbuzz circular dep.

in reply to:  9 comment:10 by bdubbs@…, 7 years ago

Replying to pierre.labastie:

Replying to bdubbs@…:

Replying to pierre.labastie:

As an experiment, I was able to build graphviz on a pristine LFS (chrrot) build. I had to add --enable-swig=no but it did build.

I'm curious why this should be required: we do not have this in the instructions, and swig is said to be optional...

Probably an error in the build process. I know it shouldn't be needed, but the build failed without it.

The problem is, why should a user have to do that if the only thing that is needed is vala and if valadoc, Vala Documentation Tool, is not needed or wanted by the user?

Depending on the build order and user needs, it may require the user to build graphviz twice. I think this is something we need to avoid if possible.

Building graphviz without any dependency takes about 2 minutes on a modern computer... Maintaining a patch to remove valadoc will add editing work for each release of vala (which is often!). Upstream has made a bad move, I agree, but if we were to fix all upstream bad decisions, we would have thousands of patches... In this case, we can live with it, and we just need to explain how to proceed, as we do for the freetype<->harfbuzz circular dep.

It's not the build as much as the dependencies of graphviz. It's not really a circular dependency, but it may cause a user to need to build it twice and if it's not rebuilt, may cause mysterious failure that are hard to track down.

comment:11 by Pierre Labastie, 7 years ago

Well, after sleeping, I think I agree more ;-) The bug report above shows that upstream plan to add a --disable-valadoc switch, so maybe we should just wait...

If we really want to prevent building graphviz twice right now, I think the best would be to revert the patch at https://git.gnome.org/browse/vala/diff/doc/Makefile.am?id=2b742fce82eb1326faaee3b2cc4ff993e701ef53. We only need to touch configure.ac and Makefile.am, and maybe doc/Makefile.am, to avoid generating the valadoc man page.

comment:12 by bdubbs@…, 7 years ago

OK, let's just leave this ticket simmer until until the next vala version. We can reevaluate then.

comment:13 by bdubbs@…, 7 years ago

Summary: vala-0.38.0 will not build without graphvizvala-0.38.0 will not build without graphviz (hold til next vala release)

comment:14 by Douglas R. Reno, 7 years ago

Seeing as I have a ticket for vala-0.38.1, I'd like to re-evaluate this before I proceed...

comment:15 by Douglas R. Reno, 7 years ago

Summary: vala-0.38.0 will not build without graphviz (hold til next vala release)vala-0.38.0 will not build without graphviz (Update to vala-0.38.1)

comment:16 by bdubbs@…, 7 years ago

Updated to version 0.38.1 a revision 19214.

Added instructions to skip building valadoc, allowing the graphviz dependency to be made optional.

comment:17 by bdubbs@…, 7 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.