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 760765 - build-tools/vala-m4 recipe prevents from using any libraries that ship .vapi files
build-tools/vala-m4 recipe prevents from using any libraries that ship .vapi ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
git master
Other Mac OS
: Normal normal
: 1.6.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-17 23:56 UTC by Marcin Lewandowski
Modified: 2016-01-18 14:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ensure that PREFIX/share/vala directory exist before copying Makefile.vapigen (1.40 KB, patch)
2016-01-18 14:47 UTC, Marcin Lewandowski
none Details | Review

Description Marcin Lewandowski 2016-01-17 23:56:46 UTC
recipes/build-tools/vala-m4.recipe contains the following install routines:

    def install(self):
        shutil.copyfile(os.path.join(self.build_dir, 'vapigen', 'vapigen.m4'),
                        os.path.join(self.config.install_dir, 'share',
                                     'aclocal', 'vala.m4'))
        shutil.copy(os.path.join(self.build_dir, 'vapigen', 'Makefile.vapigen'),
                    os.path.join(self.config.install_dir, 'share', 'vala'))


the last line effectively prevents from using any libraries that ship .vapi files.

I wanted to add a library that ships its .vapi during make install stage to standard directory: PREFIX/share/vala/vapi/libraryname.vapi

It fails while using cerbero if vala-m4 recipe was resolved as a dependency because PREFIX/share/vala is not a directory (it's a file) so it fails to create PREFIX/share/vala/vapi/ subdirectory.

I cannot understand rationale of copying Makefile.vapigen to PREFIX/share/vala (it looks like something really non-standard to me) so I can't suggest any resolution.
Comment 1 Sebastian Dröge (slomo) 2016-01-18 09:23:37 UTC
vala itself is also installing that Makefile there when doing "make install", it seems to be required by some stuff from the m4.

commit 050588f5858a1fa87e2d829f38b009dfeb567970
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Jan 18 11:19:37 2016 +0200

    vala-m4: Install Makefile.vapigen correctly
    
    Previously we were installing it as "vala", but it should be inside
    a subdirectory called "vala" with its original file name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760765
Comment 2 Marcin Lewandowski 2016-01-18 14:46:14 UTC
This solution breaks the build, because the PREFIX/share/vala dir does not necessarily exist.

The attached patch fixes the issue.

[(49/78) vala-m4 -> fetch ]
-----> Fetching tarball http://ftp.gnome.org/pub/GNOME/sources/vala/0.29/vala-0.29.3.tar.xz to /home/azureuser/cerbero/sources/local/vala-m4-0.29.3/vala-0.29.3.tar.xz
[(49/78) vala-m4 -> extract ]
-----> Extracting tarball to /home/azureuser/cerbero/sources/windows_x86/vala-0.29.3
Unpacking /home/azureuser/cerbero/sources/local/vala-m4-0.29.3/vala-0.29.3.tar.xz in /home/azureuser/cerbero/sources/windows_x86
[(49/78) vala-m4 -> configure ]
[(49/78) vala-m4 -> compile ]
[(49/78) vala-m4 -> install ]
Recipe 'vala-m4' failed at the build step 'install'
Traceback (most recent call last):
  • File "./cerbero/build/oven.py", line 143 in _cook_recipe
    stepfunc()
  • File "/home/azureuser/cerbero/recipes/build-tools/vala-m4.recipe", line 32 in install
    os.path.join(self.config.install_dir, 'share', 'vala', 'Makefile.vapigen'))
  • File "/usr/lib/python2.7/shutil.py", line 119 in copy
    copyfile(src, dst)
  • File "/usr/lib/python2.7/shutil.py", line 83 in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/home/azureuser/cerbero/dist/windows_x86/share/vala/Makefile.vapigen'

Comment 3 Marcin Lewandowski 2016-01-18 14:47:11 UTC
Created attachment 319275 [details] [review]
Ensure that PREFIX/share/vala directory exist before copying Makefile.vapigen
Comment 4 Sebastian Dröge (slomo) 2016-01-18 14:58:49 UTC
Already merged similar changes

commit 53f9a0da297cbeb402e76a4a7df2e587e73ab07f
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Jan 18 16:54:51 2016 +0200

    vala-m4: Make sure to create all subdirectories before installing into them

commit 6fc60d071638a65ee4e504f705e372b2a4901c2e
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Jan 18 15:50:40 2016 +0200

    vala-m4: Make sure that the destination directory exists before copying