Menu

#294 0.10.0-rc2 build issues

0.10
closed
nobody
None
fixed
2017-06-30
2017-06-16
No

The 0.10.0-rc2 tar release builds fine on Debian Jessie if I run configure and make in the source root directory.

But if I build in a separate directory, I get a lot of SH_PATH redefinition warnings from differing config.h files and finally an error:

$ tar zxf lirc-0.10.0-rc2.tar.gz ; mkdir lirc-0.10.0-rc2/build ; cd lirc-0.10.0-rc2/build ; ../configure ; make
...
Making all in lib
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. -I../.. -Wall -Wp,-D_FORTIFY_SOURCE=2 -I../../include -g -O2 -I/usr/include/python3.4m -I/usr/include/x86_64-linux-gnu/python3.4m -MT config_file.lo -MD -MP -MF .deps/config_file.Tpo -c ../../lib/config_file.c  -fPIC -DPIC -o .libs/config_file.o
In file included from ../../lib/lirc/curl_poll.h:35:0,
                 from ../../lib/lirc/driver.h:33,
                 from ../../lib/lirc/ir_remote.h:31,
                 from ../../lib/config_file.c:46:
../../lib/lirc/config.h:234:0: warning: "SH_PATH" redefined
 #define SH_PATH "/usr/bin/sh"
 ^
In file included from ../../include/media/lirc.h:14:0,
                 from ../../lib/config_file.c:41:
./lirc/config.h:234:0: note: this is the location of the previous definition
 #define SH_PATH "/bin/sh"
 ^
...
Making all in daemons
In file included from ../../lib/lirc/curl_poll.h:35:0,
                 from ../../lib/lirc_client.h:124,
                 from ../../daemons/lircrcd.cpp:37:
../../lib/lirc/config.h:234:0: warning: "SH_PATH" redefined
 #define SH_PATH "/usr/bin/sh"
 ^
In file included from ../../daemons/lircrcd.cpp:12:0:
../config.h:234:0: note: this is the location of the previous definition
 #define SH_PATH "/bin/sh"
 ^
libtool: link: g++ -g -O2 -o .libs/lircrcd lircrcd.o  -lpthread ../lib/.libs/liblirc_client.so -ldl -ludev
In file included from ../../include/media/lirc.h:14:0,
                 from ../../lib/lirc_private.h:19,
                 from ../../daemons/lircd.cpp:70:
../../lib/lirc/config.h:234:0: warning: "SH_PATH" redefined
 #define SH_PATH "/usr/bin/sh"
 ^
In file included from ../../daemons/lircd.cpp:30:0:
../config.h:234:0: note: this is the location of the previous definition
 #define SH_PATH "/bin/sh"
 ^
In file included from ../../lib/lirc_private.h:22:0,
                 from ../../daemons/lircd.cpp:70:
../../lib/ir_remote_types.h:38:24: fatal error: linux/lirc.h: No such file or directory
 #include <linux/lirc.h>
                        ^
compilation terminated.
make[2]: *** [lircd.o] Error 1
Makefile:531: recipe for target 'lircd.o' failed
make[1]: *** [all-recursive] Error 1
Makefile:1039: recipe for target 'all-recursive' failed
make: *** [all] Error 2
Makefile:567: recipe for target 'all' failed

Trying to compile the git version in the source root results in an immediate error after make because of the lirc -> . symlink in lib:

$ git reset --hard lirc-0.10.0-rc2 ; git clean -dfx ; ./autogen.sh ; ./configure ; make
...
Making all in lib
cp: ../config.h and lirc/config.h are the same file
Makefile:931: recipe for target 'lirc/config.h' failed
make[2]: *** [lirc/config.h] Error 1
Makefile:1029: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:556: recipe for target 'all' failed
make: *** [all] Error 2

Compiling git version in a separate directory fails as well, but with a different error as in the release tar:

$ git reset --hard lirc-0.10.0-rc2 ; git clean -dfx ; ./autogen.sh ; mkdir build; cd build; ../configure ; make
...
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. -I../.. -Wall -Wp,-D_FORTIFY_SOURCE=2 -I../../include -g -O2 -I/usr/include/python3.4m -I/usr/include/x86_64-linux-gnu/python3.4m -MT lirc_client.lo -MD -MP -MF .deps/lirc_client.Tpo -c ../../lib/lirc_client.c  -fPIC -DPIC -o .libs/lirc_client.o
In file included from ../../lib/lirc_client.c:42:0:
../../lib/lirc_client.h:122:24: fatal error: lirc/paths.h: No such file or directory
 #include "lirc/paths.h"
                        ^
compilation terminated.
Makefile:610: recipe for target 'lirc_client.lo' failed
make[3]: *** [lirc_client.lo] Error 1
Makefile:486: recipe for target 'all' failed
make[2]: *** [all] Error 2
Makefile:1029: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:556: recipe for target 'all' failed
make: *** [all] Error 2

Discussion

  • Alec Leamas

    Alec Leamas - 2017-06-17

    Ack, I can reproduce this. Will have a look Real Soon (tm)

     
  • Alec Leamas

    Alec Leamas - 2017-06-17

    Hm... this is actually a can of worms. Thanks for reporting this during the rc cycle!

    Attaching a tentative patch. Could you please test it and report back?

     
  • Matthias Reichl

    Matthias Reichl - 2017-06-17

    Thanks a lot for the quick reply!

    When applying the patch on top of the release-0.10 branch (HEAD 57d08c7) building in a subdir now works fine, but building in the source root still results in the immediate error.

    I also tried applying the patch on top of the rc2 release tar, then run autogen.sh: building in the source root still works fine, but building in a subdir still results in warnings and a build error as before:

    $ tar zxf lirc-0.10.0-rc2.tar.gz ; cd lirc-0.10.0-rc2 ; patch -p1 < ../0003-build-Fix-VPATH-builds.patch ; ./autogen.sh ; mkdir build ; cd build ; ../configure ; make
    ...
    libtool: link: g++ -g -O2 -o .libs/irsimsend irsimsend.o  -L../lib /home/hias/install/lirc/lirc-0.10.0-rc2/build/lib/.libs/liblirc.so /home/hias/install/lirc/lirc-0.10.0-rc2/build/lib/.libs/liblirc_client.so ../lib/.libs/liblirc.so ../lib/.libs/liblirc_client.so -ldl -ludev
    In file included from ../../lib/lirc/curl_poll.h:35:0,
                     from ../../lib/lirc_client.h:124,
                     from ../../tools/irtestcase.cpp:25:
    ../../lib/lirc/config.h:234:0: warning: "SH_PATH" redefined
     #define SH_PATH "/usr/bin/sh"
     ^
    In file included from ../../tools/irtestcase.cpp:10:0:
    ../config.h:235:0: note: this is the location of the previous definition
     #define SH_PATH "/bin/sh"
     ^
    In file included from ../../tools/irtestcase.cpp:26:0:
    ../../lib/lirc_private.h:17:24: fatal error: linux/lirc.h: No such file or directory
     #include <linux/lirc.h>
                            ^
    compilation terminated.
    Makefile:823: recipe for target 'irtestcase.o' failed
    make[2]: *** [irtestcase.o] Error 1
    Makefile:1030: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    Makefile:557: recipe for target 'all' failed
    make: *** [all] Error 2
    
     
  • Alec Leamas

    Alec Leamas - 2017-06-18

    OK, that patch was tested on sid. I'll be back, nut later.

     
    • Alec Leamas

      Alec Leamas - 2017-06-19

      Sinces this turns out to be a Real Mess, I didn't bother bother to test a single patch but rather the 0.10.0 release branch. It now builds for me on jessie, with or without a separate build dir. Atttaching the three patches from rc2 involved

      One gotcha is that the autotools used to generate the tarball are newer than jessie's stuff. This could be handled according to the messages, basically re-running aclocal and automake.

      Another is that after patching (but before building) the two files config.h and lib/lirc/config.h needs to be removed. They should certainly not be part of tthe distribution tarball.

       

      Last edit: Alec Leamas 2017-06-19
  • Matthias Reichl

    Matthias Reichl - 2017-06-20

    Thanks a lot lirc builds fine in the root and a separate dir with these patches on top of rc2 release tar, config.h files removed + aclocal + autoreconf calls.

    Building from git in a separate dir works fine, too.

    The only issue remaining is that I get an error building in git root dir:

    $ git clone --depth 1 -b release-0.10 --single-branch https://git.code.sf.net/p/lirc/git lirc-0.10-git
    $ cd lirc-0.10-git/
    $ git am ../0003-build-Fix-VPATHS-builds-294.patch
    $ ./autogen.sh
    $ ./configure 
    $ make V=1
    cp VERSION python-pkg/VERSION
    make  all-recursive
    make[1]: Entering directory '/home/hias/private/rpi/lirc/lirc-0.10-git'
    Making all in lib
    make[2]: Entering directory '/home/hias/private/rpi/lirc/lirc-0.10-git/lib'
    ln -s . lirc 2>/dev/null || :
    PYTHON=/usr/bin/python3 ../tools/lirc-make-devinput \
        -i   > input_map.inc
    PYTHON=/usr/bin/python3 ../tools/lirc-make-devinput \
        -i  > lirc/input_map.inc
    cp ../config.h lirc/config.h
    cp: ../config.h and lirc/config.h are the same file
    Makefile:932: recipe for target 'lirc/config.h' failed
    make[2]: *** [lirc/config.h] Error 1
    make[2]: Leaving directory '/home/hias/private/rpi/lirc/lirc-0.10-git/lib'
    Makefile:1030: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/hias/private/rpi/lirc/lirc-0.10-git'
    Makefile:557: recipe for target 'all' failed
    make: *** [all] Error 2
    $ cp --version
    cp (GNU coreutils) 8.23
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Written by Torbjörn Granlund, David MacKenzie, and Jim Meyering.
    

    Is this a problem of automake-1.14? I've only tested this on Debian Jessie so far, will do a test on Debian Stretch (automake-1.15) later.

     
    • Alec Leamas

      Alec Leamas - 2017-06-20

      I havn't tried this mysel. But before you do anything else, please apply all three patches which is the current release branch. And remove lib/config.h and lib/lirc/config.h, as stated in https://sourceforge.net/p/lirc/tickets/294/#60d2/b7aa

      EDIT: And those patches are from the lirc-0.10.0-rc2 tag. The current state of the release-0.10 branch at upstream is a WIP, so please use the tag (+ patches).

       

      Last edit: Alec Leamas 2017-06-20
      • Alec Leamas

        Alec Leamas - 2017-06-20

        OK, we need yet another patch from my secret patch cache to build also the git tree. Attaching. Build log:

        git clone .. lirc-tmp
        cd lirc-tmp
        git checkout lirc-0.10.0-rc2
        git am /tmp/0001-python-pkg-tests-Don-t-hardcode-socat-and-expect-pat.patch
        git am /tmp/0002-Build-Disable-non-linkable-plugins-on-kfreebsd.patch
        git am /tmp/0003-build-Fix-VPATHS-builds-294.patch
        git am /tmp/0004-build-Fix-config.h-paths.h-creation.patch
        ./autogen.sh
        ./configure
        make -j V=0
        make DESTDIR=$PWD/foo instal
        
         
  • Matthias Reichl

    Matthias Reichl - 2017-06-20

    I've re-tested with the lirc-0.10.0-rc2 tag plus the 3 patches on Debian Jessie and Stretch.

    Compiling in the git root works fine if I remove the lib/config.h symlink. With this link removed compilation in a subdir still works as well.

    The symlink was added with this commit - was it maybe included by mistake?

    commit 700f4a54ccb89a7344d13700c2bc69d06f874cc5
    Author: Alec Leamas <leamas.alec@gmail.com>
    Date:   Tue Mar 7 14:46:14 2017 +0100
    
        lib: Add development link for lirc/config.h
    

    Edit: just saw you posted another patch, will try that now.

     

    Last edit: Matthias Reichl 2017-06-20
  • Matthias Reichl

    Matthias Reichl - 2017-06-20

    With the 4 patches lirc now builds fine from git and the patched rc2 release tar, both in the source root and in a subdir (tested on Debian Jessie and Stretch).

    Thanks a lot!

     
    • Alec Leamas

      Alec Leamas - 2017-06-20

      Again: thanks for reporting, not least for reporting in the rc cycle!

      There will be a -rc3, with these fixes + a few more.

       
  • Matthias Reichl

    Matthias Reichl - 2017-06-30

    I can confirm that -rc3 fixes the issues, the ticket can be closed.

    BTW: We've included 0.10.0-rc3 in the LibreELEC testbuilds, everything looking fine so far, thanks a lot for your awesome work!

     
  • Alec Leamas

    Alec Leamas - 2017-06-30
    • status: open --> closed
    • Resolution: na --> fixed
    • Milestone: Future --> 0.10
     
  • Alec Leamas

    Alec Leamas - 2017-06-30

    Thansk for reporting and feedback! Closing.

     

Log in to post a comment.

Monday.com Logo