lightning stops building

Created on 30 Jul 2019  路  8Comments  路  Source: ElementsProject/lightning

I don't know why but our current master stopped building even in a clean environment and after running make clean the issue seems to be tool/mockup.sh: line 11: ;;`

I have no clue at all why it stopped working and I am not that deep into the build process of c code.

so even in a completely fresh git clone I run into this issue after ./configure and make

operating system is mac-os. I can later check on a linux machine but I guess if the problem was there too you would already know.

tools/generate-wire.py --page impl tools/test/gen_test.h test_type < tools/test/test_cases > 
tools/test/gen_test.c:
tools/mockup.sh: line 11: syntax error near unexpected token `;;'
tools/mockup.sh: line 11: `     ;;'
make: *** [tools/test/gen_test.c] Error 2
rm external/libwally-core/src/secp256k1/libsecp256k1.la
Renes-iMacReal:lightning rpickhardt$ 

git log

commit 0ae20399bd05adf8b6c1827359d9ae42e5f7376b (HEAD -> master, origin/master, origin/HEAD)
Author: trueptolemy <[email protected]>
Date:   Sun Jul 28 21:24:57 2019 +0800

    CHANGELOG: check the bitcoind version when `setup_topology`

commit 130bf20516be815acc5034ba84b9c106ac6274a9
Author: trueptolemy <[email protected]>
Date:   Sun Jul 28 01:58:27 2019 +0800

    lightningd: check bitcoind version when `setup_topology`

Most helpful comment

actually on linux I have

tools/generate-wire.py --page header common/gen_status_wire.h status < common/status_wire.csv > common/gen_status_wire.h
Traceback (most recent call last):
  File "tools/generate-wire.py", line 24, in <module>
    from mako.template import Template
ModuleNotFoundError: No module named 'mako'
common/Makefile:83: recipe for target 'common/gen_status_wire.h' failed
make: *** [common/gen_status_wire.h] Error 1
rm external/libwally-core/src/secp256k1/libsecp256k1.la

indicating that a pythong dependency for the tests is missing. was able to fix this with
pip install mako will open a PR in 1 minute in which I add the mako dependency to tests/requirements.txt

All 8 comments

actually on linux I have

tools/generate-wire.py --page header common/gen_status_wire.h status < common/status_wire.csv > common/gen_status_wire.h
Traceback (most recent call last):
  File "tools/generate-wire.py", line 24, in <module>
    from mako.template import Template
ModuleNotFoundError: No module named 'mako'
common/Makefile:83: recipe for target 'common/gen_status_wire.h' failed
make: *** [common/gen_status_wire.h] Error 1
rm external/libwally-core/src/secp256k1/libsecp256k1.la

indicating that a pythong dependency for the tests is missing. was able to fix this with
pip install mako will open a PR in 1 minute in which I add the mako dependency to tests/requirements.txt

other than that on ubuntu lighting builds so I guess it is a mac issue and thus probably harder to fix

Indeed, looks like a Mac issue. Maybe Mac is using a faked bash. Can you try:

ls -la `which bash`

Mako is now a global dependency; it's in doc/INSTALL.md. If you didn't have it, you might have got empty files: try make distclean?

Putting it in requirements.txt for tests/ is a bit misplaced, but can't hurt.

Indeed, looks like a Mac issue. Maybe Mac is using a faked bash. Can you try:

ls -la `which bash`

Renes-iMacReal:regtest-helper rpickhardt$ ls -la which bash
-r-xr-xr-x 1 root wheel 618448 21 Sep 2017 /bin/bash

Mako is now a global dependency; it's in doc/INSTALL.md. If you didn't have it, you might have got empty files: try make distclean?

I checkted that file right now and I only found a reference in the ubuntu build instructions but not for mac-os and in the beginning with the global dependencies it was also not mentioned.

I also ran into the missing mako issue when trying to make 0.7.2. Probably good to mention in the release notes.

I run the same in 0.2.1.

Linux 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux

make distclean doesn't solve.

I do have mako==1.0.14 in requirements.txt. Trying to setup mako.

pip3 install mako
make clean
make distclean
./configure
make

collect2: error: ld returned 1 exit status
make[1]: *** [tools/test/gen_test.c.tmp] Error 1
tools/test/Makefile:34: set instruction for the target "tools/test/gen_test.c" not successfull.
make: *** [tools/test/gen_test.c] Errore 1
rm external/libwally-core/src/secp256k1/libsecp256k1.la
````
further up in the output:
````
checking consistency of all components of python development environment... no

  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LIBS environment variable.
  Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================

checking for swig... no
````
I have tried to remove mako and check the version.

pip3 uninstall mako

Successfully uninstalled Mako-1.1.0
`` ahaa. wrong version. I tried alsosudo pip3 install -r tests/requirements.txt`
but I got the same result.

BTW. It could be related to #2962?

UPDATE: I have checked out master and my problem has disappeared. This make me think that it was related to #2968

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mloop1 picture mloop1  路  4Comments

ldn2017 picture ldn2017  路  4Comments

rustyrussell picture rustyrussell  路  4Comments

ZmnSCPxj picture ZmnSCPxj  路  4Comments

igreshev picture igreshev  路  4Comments