Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightning stops building #2879

Open
renepickhardt opened this issue Jul 30, 2019 · 8 comments · Fixed by #2880
Open

lightning stops building #2879

renepickhardt opened this issue Jul 30, 2019 · 8 comments · Fixed by #2880

Comments

@renepickhardt
Copy link
Collaborator

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 <823220586@qq.com>
Date:   Sun Jul 28 21:24:57 2019 +0800

    CHANGELOG: check the bitcoind version when `setup_topology`

commit 130bf20516be815acc5034ba84b9c106ac6274a9
Author: trueptolemy <823220586@qq.com>
Date:   Sun Jul 28 01:58:27 2019 +0800

    lightningd: check bitcoind version when `setup_topology`
@renepickhardt
Copy link
Collaborator Author

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

renepickhardt added a commit to renepickhardt/lightning that referenced this issue Jul 30, 2019
this should partially fix ElementsProject#2879 

this dependency seems to be needed in `tools/generate-wire.py`
@renepickhardt
Copy link
Collaborator Author

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

@ZmnSCPxj
Copy link
Collaborator

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

ls -la `which bash`

ZmnSCPxj pushed a commit that referenced this issue Jul 30, 2019
this should partially fix #2879 

this dependency seems to be needed in `tools/generate-wire.py`
@ZmnSCPxj ZmnSCPxj reopened this Jul 30, 2019
@rustyrussell
Copy link
Contributor

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.

@renepickhardt
Copy link
Collaborator Author

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

@renepickhardt
Copy link
Collaborator Author

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.

@Sjors
Copy link
Contributor

Sjors commented Aug 19, 2019

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

@gabridome
Copy link
Contributor

gabridome commented Aug 29, 2019

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 also sudo 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants