Results 1 to 5 of 5

Thread: Trying to write a snapd-glib spec file: autoreconf is asking me to define LIBTOOL?

  1. Default Trying to write a snapd-glib spec file: autoreconf is asking me to define LIBTOOL?

    Hi,

    I'm fairly new to writing spec files where there's an autogen script. I want to package snapd-glib as that way I can build GNOME Software with Snappy package support. This is my current spec file:

    Code:
    #
    # spec file for package snapd-glib
    #
    # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
    #
    # All modifications and additions to the file contributed by third parties
    # remain the property of their copyright owners, unless otherwise agreed
    # upon. The license for this file, and modifications and additions to the
    # file, is the same license as for the pristine package itself (unless the
    # license for the pristine package is not an Open Source License, in which
    # case the license is the MIT License). An "Open Source License" is a
    # license that conforms to the Open Source Definition (Version 1.9)
    # published by the Open Source Initiative.
    
    # Please submit bugfixes or comments via http://bugs.opensuse.org/
    #
    
    
    Name:           snapd-glib
    Version:        1.39
    Release:        0
    Summary:        glib library for communicating with snapd
    License:        LGPL
    Group:          System/Packages
    Url:            https://github.com/snapcore/snapd-glib
    Source:         https://github.com/snapcore/snapd-glib/archive/%{version}.tar.gz
    BuildRequires:  libsoup-devel
    BuildRequires:  json-glib-devel
    BuildRequires:  libqt5-qtdeclarative-devel
    BuildRequires:  libqt5-qtbase-devel
    BuildRequires:  glib2-devel
    BuildRequires:  gtk-doc
    BuildRequires:  autoconf
    BuildRequires:  automake
    Requires:       libsoup-2_4-1
    Requires:       libjson-glib-1_0-1
    BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    
    %description
    
    %prep
    %setup -q
    
    %build
    ln -sf /usr/share/gtk-doc/data/gtk-doc.make gtk-doc.make
    autoreconf -i -f
    %configure
    make %{?_smp_mflags}
    
    %install
    %make_install
    
    %post
    %postun
    
    %files
    %defattr(-,root,root)
    %doc README.md COPYING.LGPL2 COPYING.LGPL3
    
    %changelog
    this is my build log: https://gist.githubusercontent.com/f...glib-build-log. The error itself is:

    Code:
    snapd-qt/Makefile.am:66: error: Libtool library used but 'LIBTOOL' is undefined
    any ideas as to how I fix this? It mentions adding LT_INIT to configure.ac, but how am I meant to do that? Merely doing `echo "LT_INIT" >> configure.ac` to the spec file doesn't cut it. Sorry for my ignorance, I'm used to simple config and cmake builds, not autoconf.

    Thanks for your time,
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Five favourite distros: Arch, Fedora, openSUSE Tumbleweed, Gentoo and Void Linux.

  2. Default Re: Trying to write a snapd-glib spec file: autoreconf is asking me to define LIBTOOL?

    I should add that I have managed to build this package without a problem locally via running:

    Code:
    ./autogen.sh
    make
    sudo make install
    based on this success I originally tried using this spec file instead:

    Code:
    #
    # spec file for package snapd-glib
    #
    # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
    #
    # All modifications and additions to the file contributed by third parties
    # remain the property of their copyright owners, unless otherwise agreed
    # upon. The license for this file, and modifications and additions to the
    # file, is the same license as for the pristine package itself (unless the
    # license for the pristine package is not an Open Source License, in which
    # case the license is the MIT License). An "Open Source License" is a
    # license that conforms to the Open Source Definition (Version 1.9)
    # published by the Open Source Initiative.
    
    # Please submit bugfixes or comments via http://bugs.opensuse.org/
    #
    
    
    Name:           snapd-glib
    Version:        1.39
    Release:        0
    Summary:        glib library for communicating with snapd
    License:        LGPL
    Group:          System/Packages
    Url:            https://github.com/snapcore/snapd-glib
    Source:         https://github.com/snapcore/snapd-glib/archive/%{version}.tar.gz
    BuildRequires:  libsoup-devel
    BuildRequires:  json-glib-devel
    BuildRequires:  libqt5-qtdeclarative-devel
    BuildRequires:  libqt5-qtbase-devel
    BuildRequires:  glib2-devel
    BuildRequires:  gtk-doc
    BuildRequires:  autoconf
    BuildRequires:  automake
    Requires:       libsoup-2_4-1
    Requires:       libjson-glib-1_0-1
    BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    
    %description
    glib library for communicating with snapd 
    
    %prep
    %setup -q
    
    %build
    ./autogen.sh --prefix=/usr
    make %{?_smp_mflags}
    
    %install
    %make_install
    
    %post
    %postun
    
    %files
    %defattr(-,root,root)
    %doc README.md COPYING.LGPL2 COPYING.LGPL3
    
    %changelog
    but I got the same error involving LIBTOOL.
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Five favourite distros: Arch, Fedora, openSUSE Tumbleweed, Gentoo and Void Linux.

  3. Default Re: Trying to write a snapd-glib spec file: autoreconf is asking me to define LIBTOOL?

    Also tried adding the lines:

    Code:
    echo "LT_INIT" >> configure.ac
    aclocal
    autoconf
    before the autogen.sh line, based on what the error message said and it too failed. The error suggests something wrong with aclocal's search path, anyone know how to fix that?
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Five favourite distros: Arch, Fedora, openSUSE Tumbleweed, Gentoo and Void Linux.

  4. #4
    Join Date
    Sep 2012
    Posts
    4,401

    Default Re: Trying to write a snapd-glib spec file: autoreconf is asking me to define LIBTOOL?

    Try adding libtool as build requires.

  5. Default Re: Trying to write a snapd-glib spec file: autoreconf is asking me to define LIBTOOL?

    I thought the error told me that libtool was detected, but you're right it was needed as a BuildRequires, thanks.
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Five favourite distros: Arch, Fedora, openSUSE Tumbleweed, Gentoo and Void Linux.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •