lightning
lightning copied to clipboard
Cannot build from source on MacOSX (M1 chip)
Issue and Steps to Reproduce
Tried to follow the instructions over here but running into issues.
- instructions are out of date since the switch to poetry (no more
requirements.txt
file at the root of this repo). This is easy to fix, happy to update the docs and make a PR myself once I successfully build from source - once deps are installed with poetry I get an error at the
make
step:
Making all in secp256k1
CCLD libsecp256k1.la
./libtool: line 151: -o: command not found
error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
I tried to pickup @cdecker's fix (#4988) but unfortunately the error is the same after applying the patch locally.
Full output from configure / make
configure output
$ ./configure -n Compiling ccan/tools/configurator/configurator... done Making autoconf users comfortable... yes checking for off_t is 32 bits... no checking for __alignof__ support... yes checking for asprintf() declaration... yes checking for __attribute__((cold)) support... yes checking for __attribute__((const)) support... yes checking for __attribute__((deprecated)) support... no checking for __attribute__((nonnull)) support... yes checking for __attribute__((returns_nonnull)) support... yes checking for __attribute__((sentinel)) support... yes checking for __attribute__((pure)) support... yes checking for __attribute__((may_alias)) support... yes checking for __attribute__((noreturn)) support... yes checking for __attribute__ format printf support... yes checking for __attribute__((unused)) support... yes checking for __attribute__((used)) support... yes checking for backtrace() in... yes checking for big endian... no checking for ... no checking for __builtin_choose_expr support... yes checking for __builtin_clz support... yes checking for __builtin_clzl support... yes checking for __builtin_clzll support... yes checking for __builtin_ctz support... yes checking for __builtin_ctzl support... yes checking for __builtin_ctzll support... yes checking for __builtin_constant_p support... yes checking for __builtin_expect support... yes checking for __builtin_ffs support... yes checking for __builtin_ffsl support... yes checking for __builtin_ffsll support... yes checking for __builtin_popcount support... yes checking for __builtin_popcountl support... yes checking for __builtin_popcountll support... yes checking for __builtin_types_compatible_p support... yes checking for ... no checking for struct timespec declaration... yes checking for clock_gettime() declaration... yes checking for compound literal support... yes checking for fchdir support... yes checking for ... yes checking for for loop declaration support... yes checking for flexible array member support... yes checking for getpagesize() in ... yes checking for isblank() in ... yes checking for little endian... yes checking for memmem in ... yes checking for memrchr in ... no checking for mmap() declaration... yes checking for /proc/self/maps exists... no checking for qsort_r cmp takes trailing arg... no checking for __attribute__((section)) and __start/__stop... no checking for stack grows upwards... no checking for statement expression support... yes checking for ... yes checking for ... yes checking for ... yes checking for __typeof__ support... yes checking for unaligned access to int... yes checking for utime() declaration... yes checking for __attribute__((warn_unused_result))... yes checking for #pragma omp and -fopenmp support... no checking for ... no checking for working
make output
make CC: cc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -std=gnu11 -g -fstack-protector-strong -Og -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/gheap/ -I external/arm64-apple-darwin21.2.0/libbacktrace-build -I . -I/opt/homebrew/include -I/opt/homebrew/Cellar/sqlite/3.38.1/include -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 -DBUILD_ELEMENTS=1 -c -o LD: cc -Og config.vars -Lexternal/arm64-apple-darwin21.2.0 -lwallycore -lsecp256k1 -ljsmn -lbacktrace -L/opt/homebrew/include -lm -lgmp -L/opt/homebrew/Cellar/sqlite/3.38.1/lib -lsqlite3 -lz -lsodium -o cc ccan/ccan/cdump/tools/cdump-enumstr.c cc ccan/ccan/cdump/cdump.c cc ccan/ccan/strmap/strmap.c cc ccan/ccan/asort/asort.c cc ccan/ccan/bitmap/bitmap.c cc ccan/ccan/bitops/bitops.c cc ccan/ccan/breakpoint/breakpoint.c cc ccan/ccan/closefrom/closefrom.c cc ccan/ccan/crc32c/crc32c.c cc ccan/ccan/crypto/hmac_sha256/hmac_sha256.c cc ccan/ccan/crypto/hkdf_sha256/hkdf_sha256.c cc ccan/ccan/crypto/ripemd160/ripemd160.c cc ccan/ccan/crypto/sha256/sha256.c cc ccan/ccan/crypto/shachain/shachain.c -DSHACHAIN_BITS=48 cc ccan/ccan/crypto/siphash24/siphash24.c cc ccan/ccan/err/err.c cc ccan/ccan/fdpass/fdpass.c cc ccan/ccan/htable/htable.c cc ccan/ccan/ilog/ilog.c cc ccan/ccan/io/io.c cc ccan/ccan/intmap/intmap.c cc ccan/ccan/io/poll.c cc ccan/ccan/io/fdpass/fdpass.c cc ccan/ccan/isaac/isaac.c cc ccan/ccan/isaac/isaac64.c cc ccan/ccan/json_escape/json_escape.c cc ccan/ccan/json_out/json_out.c cc ccan/ccan/list/list.c cc ccan/ccan/mem/mem.c cc ccan/ccan/membuf/membuf.c cc ccan/ccan/noerr/noerr.c cc ccan/ccan/opt/helpers.c cc ccan/ccan/opt/parse.c cc ccan/ccan/opt/usage.c cc ccan/ccan/opt/opt.c cc ccan/ccan/pipecmd/pipecmd.c cc ccan/ccan/ptr_valid/ptr_valid.c cc ccan/ccan/rbuf/rbuf.c cc ccan/ccan/read_write_all/read_write_all.c cc ccan/ccan/str/base32/base32.c cc ccan/ccan/str/hex/hex.c cc ccan/ccan/str/str.c cc ccan/ccan/strset/strset.c cc ccan/ccan/take/take.c cc ccan/ccan/tal/grab_file/grab_file.c cc ccan/ccan/tal/link/link.c cc ccan/ccan/tal/path/path.c cc ccan/ccan/tal/str/str.c cc ccan/ccan/tal/tal.c cc ccan/ccan/time/time.c cc ccan/ccan/timer/timer.c cc ccan/ccan/utf8/utf8.c cd external/libwally-core && ./tools/autogen.sh glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. glibtoolize: copying file 'build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'. glibtoolize: copying file 'build-aux/m4/libtool.m4' glibtoolize: copying file 'build-aux/m4/ltoptions.m4' glibtoolize: copying file 'build-aux/m4/ltsugar.m4' glibtoolize: copying file 'build-aux/m4/ltversion.m4' glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4' configure.ac:29: warning: The macro `AC_PROG_CC_C89' is obsolete. configure.ac:29: You should run autoupdate. ./lib/autoconf/c.m4:1652: AC_PROG_CC_C89 is expanded from... configure.ac:29: the top level configure.ac:15: installing 'build-aux/compile' configure.ac:9: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'tools/build-aux'. glibtoolize: copying file 'tools/build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'tools/build-aux/m4'. glibtoolize: copying file 'tools/build-aux/m4/libtool.m4' glibtoolize: copying file 'tools/build-aux/m4/ltoptions.m4' glibtoolize: copying file 'tools/build-aux/m4/ltsugar.m4' glibtoolize: copying file 'tools/build-aux/m4/ltversion.m4' glibtoolize: copying file 'tools/build-aux/m4/lt~obsolete.m4' configure.ac:255: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... tools/build-aux/m4/ax_pthread.m4:88: AX_PTHREAD is expanded from... configure.ac:255: the top level configure.ac:25: installing 'tools/build-aux/compile' configure.ac:23: installing 'tools/build-aux/missing' src/Makefile.am: installing 'tools/build-aux/depcomp' mkdir -p external/arm64-apple-darwin21.2.0/libwally-core-build cd external/arm64-apple-darwin21.2.0/libwally-core-build \ && PYTHON_VERSION=3 CFLAGS=-std=c99 ../../libwally-core/configure CC="cc" \ --enable-static=yes \ \ --enable-module-recovery \ --enable-module-extrakeys \ --enable-module-schnorrsig \ --enable-elements \ --enable-shared=no \ --prefix=/ \ --libdir=/ \ --enable-debug \ && /Library/Developer/CommandLineTools/usr/bin/make checking build system type... aarch64-apple-darwin21.2.0 checking host system type... aarch64-apple-darwin21.2.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... ../../libwally-core/tools/build-aux/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking how to print strings... printf checking whether make supports the include directive... yes (GNU style) checking for gcc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether cc accepts -g... yes checking for cc option to enable C11 features... unsupported checking for cc option to enable C99 features... none needed checking whether cc understands -c and -o together... yes checking dependency style of cc... gcc3 checking for a sed that does not truncate output... /opt/homebrew/bin/gsed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 786432 checking how to convert aarch64-apple-darwin21.2.0 file names to aarch64-apple-darwin21.2.0 format... func_convert_file_noop checking how to convert aarch64-apple-darwin21.2.0 file names to toolchain format... func_convert_file_noop checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r checking for file... file checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from cc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if cc supports -fno-rtti -fno-exceptions... yes checking for cc option to produce PIC... -fno-common -DPIC checking if cc PIC flag -fno-common -DPIC works... yes checking if cc static flag -static works... no checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin21.2.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking whether make supports nested variables... (cached) yes checking for gcc... (cached) cc checking whether the compiler supports GNU C... (cached) yes checking whether cc accepts -g... (cached) yes checking for cc option to enable C11 features... (cached) unsupported checking for cc option to enable C99 features... (cached) none needed checking whether cc understands -c and -o together... (cached) yes checking dependency style of cc... (cached) gcc3 checking for libtool... /usr/bin/libtool checking for ar... (cached) /usr/bin/libtool checking for ranlib... /usr/bin/ranlib checking for gsed... yes checking whether byte ordering is bigendian... no checking for inline... inline checking for size_t... yes checking for uint64_t... yes checking for uint32_t... yes checking for uint16_t... yes checking for uint8_t... yes checking whether C compiler accepts -O0... yes checking whether C compiler accepts -ggdb... yes checking whether the linker accepts -O0... yes checking whether the linker accepts -ggdb... yes checking whether C compiler accepts -DBUILD_ELEMENTS=1... yes checking whether C compiler accepts -flax-vector-conversions... yes checking whether C compiler accepts -fno-strict-aliasing... yes checking whether C compiler accepts -fno-builtin... yes checking whether C compiler accepts -Wformat-nonliteral... yes checking whether C compiler accepts -Wformat-security... yes checking whether C compiler accepts -Wformat... yes checking whether C compiler accepts -Wstrict-prototypes... yes checking whether C compiler accepts -Wshadow... yes checking whether C compiler accepts -Wnested-externs... yes checking whether C compiler accepts -Wcast-align... yes checking whether C compiler accepts -Wpedantic... yes checking whether C compiler accepts -Wextra... yes checking whether C compiler accepts -Wall... yes checking whether C compiler accepts -D_DEFAULT_SOURCE=1... yes checking whether C compiler accepts -Wno-unused-function... yes checking whether C compiler accepts -Wno-long-long... yes checking whether C compiler accepts -Wno-overlength-strings... yes checking whether C compiler accepts -Wno-variadic-macros... yes checking whether C compiler accepts -Wno-shadow... yes checking whether C compiler accepts -Wno-self-assign... yes checking whether C compiler accepts -Wno-missing-field-initializers... yes checking whether C compiler accepts -fvisibility=hidden... yes checking for memset_s... yes checking for explicit_bzero... no checking for explicit_memset... no checking whether we can use inline asm code... yes checking for byteswap.h,... no checking for sys/mman.h... yes checking how to run the C preprocessor... cc -E checking whether cc is Clang... yes checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking whether more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking for asm/page.h... no checking for python3... /Users/arnaud/.pyenv/shims/python3 checking for a version of Python >= '2.1.0'... yes checking for a version of Python >= '2.7.0'... yes checking for the distutils Python package... yes checking for Python include path... -I/Users/arnaud/.pyenv/versions/3.9.11/include/python3.9 checking for Python library path... -L/Users/arnaud/.pyenv/versions/3.9.11/lib -lpython3.9 checking for Python site-packages path... /Users/arnaud/.pyenv/versions/3.9.11/lib/python3.9/site-packages checking python extra libraries... -lintl -ldl -framework CoreFoundation checking python extra linking flags... -Wl,-stack_size,1000000 -framework CoreFoundation checking consistency of all components of python development environment... yes checking for swig... no configure: WARNING: cannot find 'swig' program. You should look at http://www.swig.org checking for java... java checking for javac... javac checking for jar... jar checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/wallycore.pc config.status: creating src/config.h config.status: src/config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands === configuring in src/secp256k1 (/Users/arnaud/git/lightning/external/arm64-apple-darwin21.2.0/libwally-core-build/src/secp256k1) configure: running /bin/sh ../../../../libwally-core/src/secp256k1/configure --disable-option-checking '--prefix=/' 'CC=cc' '--enable-static=yes' '--enable-module-recovery' '--enable-module-extrakeys' '--enable-module-schnorrsig' '--enable-elements' '--enable-shared=no' '--libdir=/' '--enable-debug' 'CFLAGS=-std=c99' 'PYTHON_VERSION=3' '--disable-shared' '--with-pic' '--with-bignum=no' '--enable-experimental' '--enable-module-ecdh' '--enable-module-recovery' '--enable-module-ecdsa-s2c' '--enable-module-rangeproof' '--enable-module-surjectionproof' '--enable-module-whitelist' '--enable-module-generator' '--enable-openssl-tests=no' '--enable-tests=no' '--enable-exhaustive-tests=no' '--enable-benchmark=no' '--disable-dependency-tracking' '--with-asm=no' --cache-file=/dev/null --srcdir=../../../../libwally-core/src/secp256k1 checking build system type... aarch64-apple-darwin21.2.0 checking host system type... aarch64-apple-darwin21.2.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... ../../../../libwally-core/src/secp256k1/build-aux/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking how to print strings... printf checking whether make supports the include directive... yes (GNU style) checking for gcc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether cc accepts -g... yes checking for cc option to enable C11 features... unsupported checking for cc option to enable C99 features... none needed checking whether cc understands -c and -o together... rm: conftest.dSYM: is a directory yes checking dependency style of cc... none checking for a sed that does not truncate output... /opt/homebrew/bin/gsed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... rm: conftest.dSYM: is a directory BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 786432 checking how to convert aarch64-apple-darwin21.2.0 file names to aarch64-apple-darwin21.2.0 format... func_convert_file_noop checking how to convert aarch64-apple-darwin21.2.0 file names to toolchain format... func_convert_file_noop checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r checking for file... file checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... rm: conftest.dSYM: is a directory @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from cc object... rm: conftest.dSYM: is a directory ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if cc supports -fno-rtti -fno-exceptions... yes checking for cc option to produce PIC... -fno-common -DPIC checking if cc PIC flag -fno-common -DPIC works... yes checking if cc static flag -static works... no checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin21.2.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking whether make supports nested variables... (cached) yes checking for pkg-config... /opt/homebrew/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for ar... /usr/bin/libtool checking for ranlib... /usr/bin/ranlib checking for strip... /usr/bin/strip checking how to run the C preprocessor... cc -E checking for gcc... gcc checking whether the compiler supports GNU C... (cached) yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... (cached) unsupported checking for gcc option to enable C99 features... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) none checking how to run the C preprocessor... gcc -E checking dependency style of cc... none checking for brew... /opt/homebrew/bin/brew checking if cc supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes checking if cc supports -fvisibility=hidden... yes checking for valgrind/memcheck.h... no checking for __builtin_popcount... yes checking if native gcc supports -Wall -Wextra -Wno-unused-function... yes checking for working native compiler: gcc... yes checking for __builtin_clzll... yes configure: ****** configure: WARNING: experimental build configure: Experimental features do not have stable APIs or properties, and may not be safe for production use. configure: Building NUMS generator module: yes configure: Building range proof module: yes configure: Building key whitelisting module: yes configure: Building surjection proof module: yes configure: Building MuSig module: no configure: Building extrakeys module: yes configure: Building schnorrsig module: yes configure: Building ECDSA sign-to-contract module: yes configure: ****** checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libsecp256k1.pc config.status: creating src/libsecp256k1-config.h config.status: src/libsecp256k1-config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commandsBuild Options: with ecmult precomp = yes with external callbacks = no with benchmarks = no with tests = no with openssl tests = no with coverage = no module ecdh = yes module recovery = yes module extrakeys = yes module schnorrsig = yes module ecdsa-s2c = yes
asm = no bignum = no ecmult window size = 15 ecmult gen prec. bits = 4
valgrind = no CC = cc CFLAGS = -O2 -fvisibility=hidden -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -std=c99 CPPFLAGS = LDFLAGS = -O0 -ggdb
Making all in src /Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in secp256k1 CCLD libsecp256k1.la ./libtool: line 151: -o: command not found error: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output) Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols] Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table
] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] make[4]: *** [libsecp256k1.la] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [external/arm64-apple-darwin21.2.0/libwally-core-build/src/libwallycore.la] Error 2
I am running into this as well on mac monterey intel... any luck?
I was attempting to adapt the build instructions as per the unix instructions running:
poetry install ./configure poetry run make
Here is my error message:
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in secp256k1
CCLD libsecp256k1.la
./libtool: line 151: -o: command not found
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table
That error originates from libtool
which was recently updated in MacOS homebrew. The configure script in secp256k1 was incompatible. The fix has been slowly making its way up the dependency tree. Secp256k1 is a dependency of libwally, which is then a dependency for cln. We should update libwally (or did we already do that?) And then it'll work again. I'll try later today 👍
I am also trying to get clightning running locally for some tests and I am not sure how to debug this compilation error.
Any tips?
I am using nigiri to get around this but it would be nice to be able to get it running locally.
$ poetry run make
/opt/homebrew/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Makefile:608: target `bitcoin/test/run-bitcoin_block_from_hex' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `bitcoin/test/run-secret_eq_consttime' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `bitcoin/test/run-tx-bitcoin_tx_2of2_input_witness_weight' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `bitcoin/test/run-tx-encode' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-amount' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-base64' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-bigsize' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-blindedpath_enctlv' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-blindedpath_onion' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-bolt11' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-bolt12_decode' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-bolt12_merkle-json' given more than once in the same rule.
Makefile:608: target `common/test/run-bolt12_merkle' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-bolt12_period' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-cryptomsg' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-derive_basepoints' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-features' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-gossip_rcvd_filter' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-gossmap-fp16' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-gossmap_guess_node_id' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-gossmap_local' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-ip_port_parsing' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-json' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-json_remove' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-json_scan' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-key_derive' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-lease_rates' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-param' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-psbt_diff' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-route-specific' given more than once in the same rule.
Makefile:608: target `common/test/run-route' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-route_blinding_override_test' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-route_blinding_test' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-softref' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-sphinx-xor_cipher_stream' given more than once in the same rule.
Makefile:608: target `common/test/run-sphinx' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `common/test/run-wireaddr' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `gossipd/test/run-check_channel_announcement' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `gossipd/test/run-check_node_announcement' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `gossipd/test/run-crc32_of_update' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `gossipd/test/run-extended-info' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `gossipd/test/run-next_block_range' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `gossipd/test/run-txout_failure' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `channeld/test/run-commit_tx' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `channeld/test/run-full_channel' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `onchaind/test/run-grind_feerate-bug' given more than once in the same rule.
Makefile:608: target `onchaind/test/run-grind_feerate' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `connectd/test/run-initiator-success' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `connectd/test/run-netaddress' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `connectd/test/run-onion_message' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `connectd/test/run-responder-success' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `connectd/test/run-websocket' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `wallet/test/run-db' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `wallet/test/run-wallet' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `lightningd/test/run-find_my_abspath' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `lightningd/test/run-invoice-select-inchan' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `lightningd/test/run-jsonrpc' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `lightningd/test/run-log-pruning' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `lightningd/test/run-shuffle_fds' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `cli/test/run-human-mode' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `cli/test/run-large-input' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `cli/test/run-remove-hint' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `plugins/test/run-funder_policy' given more than once in the same rule.
Makefile:608: target `2' given more than once in the same rule.
Makefile:608: target `plugins/test/run-route-overlong' given more than once in the same rule.
CC: cc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -std=gnu11 -g -fstack-protector-strong -Og -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/gheap/ -I external/arm64-apple-darwin21.5.0/libbacktrace-build -I external/libsodium/src/libsodium/include -I external/libsodium/src/libsodium/include/sodium -I external/arm64-apple-darwin21.5.0/libsodium-build/src/libsodium/include -I . -I/usr/local/include -I/opt/homebrew/opt/libpq/include -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 -DBUILD_ELEMENTS=1 -c -o
LD: cc -Og config.vars -Lexternal/arm64-apple-darwin21.5.0 -lwallycore -lsecp256k1 -ljsmn -lbacktrace -lsodium -L/usr/local/lib -lm -lgmp -lsqlite3 -lz -L/opt/homebrew/opt/libpq/lib -lpq -o
ld ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > common/htlc_state_names_gen.h
wiregen common/status_wiregen.h
wiregen common/peer_status_wiregen.h
wiregen wire/peer_wiregen.h
wiregen wire/onion_wiregen.h
wiregen wire/bolt12_wiregen.h
wiregen wire/channel_type_wiregen.h
printgen wire/bolt12_printgen.h
printgen wire/peer_printgen.h
printgen wire/onion_printgen.h
cc tools/headerversions.c
Version updated
printgen wire/channel_type_printgen.h
wiregen gossipd/gossipd_wiregen.h
wiregen gossipd/gossipd_peerd_wiregen.h
wiregen gossipd/gossip_store_wiregen.h
wiregen openingd/openingd_wiregen.h
wiregen openingd/dualopend_wiregen.h
ccan/ccan/cdump/tools/cdump-enumstr channeld/full_channel_error.h > channeld/full_channel_error_names_gen.h
wiregen channeld/channeld_wiregen.h
wiregen closingd/closingd_wiregen.h
wiregen onchaind/onchaind_wiregen.h
ccan/ccan/cdump/tools/cdump-enumstr onchaind/onchain_types.h > onchaind/onchain_types_names_gen.h
wiregen connectd/connectd_wiregen.h
wiregen connectd/connectd_gossipd_wiregen.h
ccan/ccan/cdump/tools/cdump-enumstr lightningd/channel_state.h > lightningd/channel_state_names_gen.h
tools/generate-wire.py --page header tools/test/test_gen.h test_type < tools/test/test_cases > tools/test/test_gen.h
tools/generate-wire.py -P --page header tools/test/print_gen.h test_type < tools/test/test_cases > tools/test/print_gen.h
GEN plugins/list_of_builtin_plugins_gen.h
cc hsmd/hsmd.c
wiregen hsmd/hsmd_wiregen.c
cc hsmd/hsmd_wiregen.c
cc hsmd/libhsmd.c
cc common/amount.c
cc common/autodata.c
cc common/base32.c
cc common/bigsize.c
cc common/bip32.c
cc common/bolt12_merkle.c
cc common/channel_id.c
cc common/daemon.c
cc common/daemon_conn.c
cc common/derive_basepoints.c
cc common/hash_u5.c
cc common/hsm_encryption.c
cc common/htlc_wire.c
cc common/key_derive.c
cc common/lease_rates.c
cc common/memleak.c
cc common/msg_queue.c
cc common/node_id.c
cc common/onionreply.c
cc common/permute_tx.c
cc common/psbt_open.c
cc common/pseudorand.c
cc common/setup.c
cc common/status.c
cc common/status_wire.c
wiregen common/status_wiregen.c
cc common/status_wiregen.c
cc common/subdaemon.c
cc common/type_to_string.c
cc common/utils.c
cc common/utxo.c
cc common/version.c
cc common/wireaddr.c
cc bitcoin/base58.c
cc bitcoin/block.c
cc bitcoin/chainparams.c
cc bitcoin/feerate.c
cc bitcoin/locktime.c
cc bitcoin/preimage.c
cc bitcoin/privkey.c
cc bitcoin/psbt.c
cc bitcoin/pubkey.c
cc bitcoin/script.c
cc bitcoin/shadouble.c
cc bitcoin/short_channel_id.c
cc bitcoin/signature.c
cc bitcoin/tx.c
cc bitcoin/tx_parts.c
cc bitcoin/varint.c
cc wire/wire_sync.c
cc wire/wire_io.c
cc wire/fromwire.c
cc wire/peer_wire.c
cc wire/tlvstream.c
cc wire/towire.c
wiregen wire/bolt12_wiregen.c
cc wire/bolt12_wiregen.c
wiregen wire/peer_wiregen.c
cc wire/peer_wiregen.c
wiregen wire/channel_type_wiregen.c
cc wire/channel_type_wiregen.c
wiregen wire/onion_wiregen.c
cc wire/onion_wiregen.c
ld lightningd/lightning_hsmd
wiregen gossipd/gossipd_wiregen.c
cc gossipd/gossipd_wiregen.c
wiregen gossipd/gossipd_peerd_wiregen.c
cc gossipd/gossipd_peerd_wiregen.c
wiregen gossipd/gossip_store_wiregen.c
cc gossipd/gossip_store_wiregen.c
cc gossipd/gossipd.c
cc gossipd/gossip_store.c
cc gossipd/queries.c
cc gossipd/gossip_generation.c
cc gossipd/routing.c
cc gossipd/seeker.c
cc common/bech32.c
cc common/bech32_util.c
cc common/cryptomsg.c
cc common/decode_array.c
cc common/dev_disconnect.c
cc common/ecdh_hsmd.c
cc common/features.c
cc common/gossip_rcvd_filter.c
cc common/per_peer_state.c
cc common/ping.c
cc common/private_channel_announcement.c
cc common/random_select.c
cc common/timeout.c
cc common/wire_error.c
wiregen connectd/connectd_gossipd_wiregen.c
cc connectd/connectd_gossipd_wiregen.c
ld lightningd/lightning_gossipd
cc openingd/openingd.c
cc openingd/common.c
wiregen openingd/openingd_wiregen.c
cc openingd/openingd_wiregen.c
cc common/billboard.c
cc common/blockheight_states.c
cc common/channel_config.c
cc common/channel_type.c
cc common/fee_states.c
cc common/gossip_store.c
cc common/htlc_state.c
cc common/initial_channel.c
cc common/initial_commit_tx.c
cc common/keyset.c
cc common/peer_billboard.c
cc common/peer_failed.c
cc common/peer_io.c
wiregen common/peer_status_wiregen.c
cc common/peer_status_wiregen.c
cc common/penalty_base.c
cc common/psbt_internal.c
cc common/read_peer_msg.c
cc common/shutdown_scriptpubkey.c
ld lightningd/lightning_openingd
cc openingd/dualopend.c
wiregen openingd/dualopend_wiregen.c
cc openingd/dualopend_wiregen.c
ld lightningd/lightning_dualopend
cc channeld/channeld.c
cc channeld/commit_tx.c
cc channeld/full_channel.c
wiregen channeld/channeld_wiregen.c
cc channeld/channeld_wiregen.c
cc channeld/watchtower.c
cc common/blinding.c
cc common/hmac.c
cc common/htlc_trim.c
cc common/htlc_tx.c
cc common/onion.c
cc common/psbt_keypath.c
cc common/sphinx.c
ld lightningd/lightning_channeld
cc closingd/closingd.c
wiregen closingd/closingd_wiregen.c
cc closingd/closingd_wiregen.c
cc common/close_tx.c
ld lightningd/lightning_closingd
cc onchaind/onchaind.c
wiregen onchaind/onchaind_wiregen.c
cc onchaind/onchaind_wiregen.c
cc onchaind/onchaind_wire.c
cc common/coin_mvt.c
cc common/wallet.c
ld lightningd/lightning_onchaind
wiregen connectd/connectd_wiregen.c
cc connectd/connectd_wiregen.c
cc connectd/connectd.c
cc connectd/peer_exchange_initmsg.c
cc connectd/handshake.c
cc connectd/multiplex.c
cc connectd/netaddress.c
cc connectd/onion_message.c
cc connectd/tor_autoservice.c
cc connectd/tor.c
cc common/base64.c
cc common/blindedpath.c
ld lightningd/lightning_connectd
cc connectd/sha1.c
cc connectd/websocketd.c
ld lightningd/lightning_websocketd
cc lightningd/bitcoind.c
cc lightningd/chaintopology.c
cc lightningd/channel.c
cc lightningd/channel_control.c
cc lightningd/closing_control.c
cc lightningd/coin_mvts.c
cc lightningd/dual_open_control.c
cc lightningd/connect_control.c
cc lightningd/onion_message.c
cc lightningd/gossip_control.c
cc lightningd/hsm_control.c
cc lightningd/htlc_end.c
cc lightningd/htlc_set.c
cc lightningd/invoice.c
cc lightningd/io_loop_with_timers.c
cc lightningd/json.c
cc lightningd/jsonrpc.c
cc lightningd/lightningd.c
cc lightningd/log.c
cc lightningd/log_status.c
cc lightningd/memdump.c
cc lightningd/notification.c
cc lightningd/onchain_control.c
cc lightningd/opening_common.c
cc lightningd/opening_control.c
cc lightningd/options.c
cc lightningd/pay.c
cc lightningd/peer_control.c
cc lightningd/peer_fd.c
cc lightningd/peer_htlcs.c
cc lightningd/plugin.c
cc lightningd/plugin_control.c
cc lightningd/plugin_hook.c
cc lightningd/routehint.c
cc lightningd/subd.c
cc lightningd/watch.c
cc lightningd/datastore.c
cc lightningd/ping.c
cc lightningd/offer.c
cc lightningd/signmessage.c
cc wallet/db.c
cc wallet/invoices.c
cc wallet/txfilter.c
cc wallet/wallet.c
cc wallet/walletrpc.c
cc wallet/reservation.c
xgettext wallet/statements_gettextgen.po
sql-rewrite wallet/db_sqlite3_sqlgen.c
cc wallet/db_sqlite3_sqlgen.c
sql-rewrite wallet/db_postgres_sqlgen.c
cc wallet/db_postgres_sqlgen.c
cc common/addr.c
cc common/bolt11.c
cc common/bolt11_json.c
cc common/bolt12.c
cc common/configdir.c
cc common/status_levels.c
cc common/json.c
cc common/json_helpers.c
cc common/json_stream.c
cc common/json_tok.c
cc common/param.c
cc db/bindings.c
cc db/exec.c
cc db/utils.c
cc db/db_postgres.c
cc db/db_sqlite3.c
ld lightningd/lightningd
cc cli/lightning-cli.c
ld cli/lightning-cli
cc devtools/bolt11-cli.c
ld devtools/bolt11-cli
printgen wire/onion_printgen.c
cc wire/onion_printgen.c
printgen wire/peer_printgen.c
cc wire/peer_printgen.c
printgen wire/bolt12_printgen.c
cc wire/bolt12_printgen.c
printgen wire/channel_type_printgen.c
cc wire/channel_type_printgen.c
cc devtools/print_wire.c
cc devtools/decodemsg.c
ld devtools/decodemsg
cc devtools/onion.c
ld devtools/onion
cc devtools/dump-gossipstore.c
ld devtools/dump-gossipstore
cc devtools/gossipwith.c
ld devtools/gossipwith
cc devtools/create-gossipstore.c
ld devtools/create-gossipstore
cc devtools/mkcommit.c
ld devtools/mkcommit
cc devtools/mkfunding.c
ld devtools/mkfunding
cc devtools/mkclose.c
ld devtools/mkclose
cc devtools/mkgossip.c
ld devtools/mkgossip
cc devtools/mkencoded.c
ld devtools/mkencoded
cc devtools/mkquery.c
ld devtools/mkquery
cc devtools/lightning-checkmessage.c
ld devtools/lightning-checkmessage
cc common/gossmap.c
cc common/fp16.c
cc common/dijkstra.c
cc common/route.c
cc devtools/clean_topo.c
cc devtools/topology.c
ld devtools/topology
cc devtools/route.c
ld devtools/route
cc devtools/bolt12-cli.c
cc common/iso4217.c
ld devtools/bolt12-cli
cc devtools/encodeaddr.c
ld devtools/encodeaddr
cc devtools/features.c
ld devtools/features
cc devtools/fp16.c
ld devtools/fp16
cc devtools/checkchannels.c
ld devtools/checkchannels
cc tools/hsmtool.c
cc common/descriptor_checksum.c
ld tools/hsmtool
cc tools/check-bolt.c
ld tools/check-bolt
cc plugins/autoclean.c
cc plugins/libplugin.c
ld plugins/autoclean
cc plugins/bcli.c
ld plugins/bcli
cc plugins/fetchinvoice.c
ld plugins/fetchinvoice
cc plugins/funder.c
cc plugins/funder_policy.c
ld plugins/funder
cc plugins/topology.c
ld plugins/topology
cc plugins/keysend.c
cc plugins/libplugin-pay.c
ld plugins/keysend
cc plugins/offers.c
cc plugins/offers_offer.c
cc plugins/offers_invreq_hook.c
cc plugins/offers_inv_hook.c
ld plugins/offers
cc plugins/pay.c
ld plugins/pay
cc plugins/txprepare.c
ld plugins/txprepare
cc plugins/spender/fundchannel.c
cc plugins/spender/main.c
cc plugins/spender/multifundchannel.c
cc plugins/spender/multiwithdraw.c
cc plugins/spender/openchannel.c
ld plugins/spenderp
tools/generate-wire.py --page impl tools/test/test_gen.h test_type < tools/test/test_cases > tools/test/test_gen.c.tmp.c
mocking out tools/test/test_gen.c.tmp.c:
fromwire_amount_msat
fromwire_bool
fromwire_tlv
fromwire_tu32
fromwire_tu64
fromwire_u16
fromwire_u32
fromwire_u64
fromwire_u8
fromwire_u8_array
towire_amount_msat
towire_bool
towire_tlv
towire_tu32
towire_tu64
towire_u16
towire_u32
towire_u64
towire_u8
towire_u8_array
echo '#include "test_gen.h"' > tools/test/print_gen.c
tools/generate-wire.py -P --page impl tools/test/print_gen.h test_type < tools/test/test_cases >> tools/test/print_gen.c
cc bitcoin/test/run-bitcoin_block_from_hex.c
ld bitcoin/test/run-bitcoin_block_from_hex
clang: error: cannot specify -o when generating multiple output files
make: *** [bitcoin/test/run-bitcoin_block_from_hex] Error 1
Hey, any updates here? I also faced a similar issue
Hey, any updates here? I also faced a similar issue
This should be merged, did not work?
cc @cdecker
Nope. I have rather encountered this issue. Tried to install lightning on MacOS Monterey (Intel) following the instructions in two ways with a precompiled binary and via compiling source code from the github. Both options give errors related to libtool.
Source code compilation:
$ poetry run make
CC: cc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -std=gnu11 -g -fstack-protector-strong -Og -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/gheap/ -I external/x86_64-apple-darwin21.6.0/libbacktrace-build -I . -I/usr/local/include -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 -DBUILD_ELEMENTS=1 -c -o
LD: cc -Og config.vars -Lexternal/x86_64-apple-darwin21.6.0 -lwallycore -lsecp256k1 -ljsmn -lbacktrace -L/usr/local/lib -lm -lgmp -lsqlite3 -lz -lsodium -o
cd external/libwally-core && ./tools/autogen.sh
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
glibtoolize: copying file 'build-aux/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
glibtoolize: copying file 'build-aux/m4/libtool.m4'
glibtoolize: copying file 'build-aux/m4/ltoptions.m4'
glibtoolize: copying file 'build-aux/m4/ltsugar.m4'
glibtoolize: copying file 'build-aux/m4/ltversion.m4'
glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
configure.ac:35: installing 'build-aux/compile'
configure.ac:30: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'tools/build-aux'.
glibtoolize: copying file 'tools/build-aux/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'tools/build-aux/m4'.
glibtoolize: copying file 'tools/build-aux/m4/libtool.m4'
glibtoolize: copying file 'tools/build-aux/m4/ltoptions.m4'
glibtoolize: copying file 'tools/build-aux/m4/ltsugar.m4'
glibtoolize: copying file 'tools/build-aux/m4/ltversion.m4'
glibtoolize: copying file 'tools/build-aux/m4/lt~obsolete.m4'
configure.ac:35: installing 'tools/build-aux/compile'
configure.ac:31: installing 'tools/build-aux/missing'
src/Makefile.am: installing 'tools/build-aux/depcomp'
mkdir -p external/x86_64-apple-darwin21.6.0/libwally-core-build
cd external/x86_64-apple-darwin21.6.0/libwally-core-build \
&& PYTHON_VERSION=3 CFLAGS=-std=c99 ../../libwally-core/configure CC="cc" \
--enable-static=yes \
\
--enable-module-recovery \
--enable-module-extrakeys \
--enable-module-schnorrsig \
--enable-elements \
--enable-shared=no \
--prefix=/ \
--libdir=/ \
--enable-debug \
&& /Applications/Xcode.app/Contents/Developer/usr/bin/make
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ../../libwally-core/tools/build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... unsupported
checking for cc option to enable C99 features... none needed
checking whether cc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.6.0 file names to x86_64-apple-darwin21.6.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.6.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common -DPIC
checking if cc PIC flag -fno-common -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gsed... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for size_t... yes
checking for uint64_t... yes
checking for uint32_t... yes
checking for uint16_t... yes
checking for uint8_t... yes
checking whether C compiler accepts -O0... yes
checking whether C compiler accepts -ggdb... yes
checking whether the linker accepts -O0... yes
checking whether the linker accepts -ggdb... yes
checking whether C compiler accepts -DBUILD_ELEMENTS=1... yes
checking whether C compiler accepts -flax-vector-conversions... yes
checking whether C compiler accepts -fno-strict-aliasing... yes
checking whether C compiler accepts -fno-builtin... yes
checking whether C compiler accepts -Wformat-nonliteral... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wformat... yes
checking whether C compiler accepts -Wstrict-prototypes... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wnested-externs... yes
checking whether C compiler accepts -Wcast-align... yes
checking whether C compiler accepts -Wpedantic... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -D_DEFAULT_SOURCE=1... yes
checking whether C compiler accepts -Wno-unused-function... yes
checking whether C compiler accepts -Wno-long-long... yes
checking whether C compiler accepts -Wno-overlength-strings... yes
checking whether C compiler accepts -Wno-variadic-macros... yes
checking whether C compiler accepts -Wno-shadow... yes
checking whether C compiler accepts -Wno-self-assign... yes
checking whether C compiler accepts -Wno-missing-field-initializers... yes
checking whether C compiler accepts -fvisibility=hidden... yes
checking for memset_s... yes
checking for explicit_bzero... no
checking for explicit_memset... no
checking whether we can use inline asm code... yes
checking for byteswap.h,... no
checking for sys/mman.h... yes
checking how to run the C preprocessor... cc -E
checking whether cc is Clang... yes
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for asm/page.h... no
checking for python3... /Users/*********/Library/Caches/pypoetry/virtualenvs/cln-meta-project-pgIvwjZr-py3.7/bin/python3
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '2.7.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/Users/********/.pyenv/versions/3.7.4/include/python3.7m
checking for Python library path... -L/Users/*********/.pyenv/versions/3.7.4/lib -lpython3.7m
checking for Python site-packages path... /Users/********/Library/Caches/pypoetry/virtualenvs/cln-meta-project-pgIvwjZr-py3.7/lib/python3.7/site-packages
checking python extra libraries... -lintl -ldl -framework CoreFoundation
checking python extra linking flags... -Wl,-stack_size,1000000 -framework CoreFoundation
checking consistency of all components of python development environment... yes
checking for swig... no
configure: WARNING: cannot find 'swig' program. You should look at http://www.swig.org
checking for java... java
checking for javac... javac
checking for jar... jar
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/wallycore.pc
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in src/secp256k1 (/Users/*******/Desktop/********/lightning/external/x86_64-apple-darwin21.6.0/libwally-core-build/src/secp256k1)
configure: running /bin/sh ../../../../libwally-core/src/secp256k1/configure --disable-option-checking '--prefix=/' 'CC=cc' '--enable-static=yes' '--enable-module-recovery' '--enable-module-extrakeys' '--enable-module-schnorrsig' '--enable-elements' '--enable-shared=no' '--libdir=/' '--enable-debug' 'CFLAGS=-std=c99' 'PYTHON_VERSION=3' '--disable-shared' '--with-pic' '--with-bignum=no' '--enable-experimental' '--enable-module-ecdh' '--enable-module-recovery' '--enable-module-ecdsa-s2c' '--enable-module-rangeproof' '--enable-module-surjectionproof' '--enable-module-whitelist' '--enable-module-generator' '--disable-tests' '--enable-openssl-tests=no' '--enable-exhaustive-tests=no' '--enable-benchmark=no' '--disable-dependency-tracking' '--with-asm=no' --cache-file=/dev/null --srcdir=../../../../libwally-core/src/secp256k1
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ../../../../libwally-core/src/secp256k1/build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... unsupported
checking for cc option to enable C99 features... none needed
checking whether cc understands -c and -o together... rm: conftest.dSYM: is a directory
yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... none
checking dependency style of cc... none
checking the archiver (ar) interface... ar
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... rm: conftest.dSYM: is a directory
BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.6.0 file names to x86_64-apple-darwin21.6.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.6.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... rm: conftest.dSYM: is a directory
no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... rm: conftest.dSYM: is a directory
ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common -DPIC
checking if cc PIC flag -fno-common -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for brew... brew
checking if cc supports -Werror=unknown-warning-option... yes
checking if cc supports -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef... yes
checking if cc supports -Wno-overlength-strings... yes
checking if cc supports -Wall... yes
checking if cc supports -Wno-unused-function... yes
checking if cc supports -Wextra... yes
checking if cc supports -Wcast-align... yes
checking if cc supports -Wcast-align=strict... no
checking if cc supports -Wconditional-uninitialized... yes
checking if cc supports -fvisibility=hidden... yes
checking for __builtin_popcount... no
checking for __builtin_clzll... no
configure: ******
configure: WARNING: experimental build
configure: Experimental features do not have stable APIs or properties, and may not be safe for production use.
configure: Building NUMS generator module: yes
configure: Building range proof module: yes
configure: Building key whitelisting module: yes
configure: Building surjection proof module: yes
configure: Building MuSig module: no
configure: Building ECDSA sign-to-contract module: yes
configure: Building ECDSA adaptor signatures module: no
configure: ******
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libsecp256k1.pc
config.status: creating src/libsecp256k1-config.h
config.status: src/libsecp256k1-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Build Options:
with external callbacks = no
with benchmarks = no
with tests = no
with coverage = no
with examples = no
module ecdh = yes
module recovery = yes
module extrakeys = yes
module schnorrsig = yes
module musig = no
module ecdsa-s2c = yes
module ecdsa-adaptor = no
asm = no
ecmult window size = 15
ecmult gen prec. bits = 4
valgrind = no
CC = cc
CPPFLAGS =
SECP_CFLAGS = -O2 -std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-overlength-strings -Wall -Wno-unused-function -Wextra -Wcast-align -Wconditional-uninitialized -fvisibility=hidden
CFLAGS = -std=c99
LDFLAGS = -O0 -ggdb
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in secp256k1
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CCLD libsecp256k1.la
./libtool: line 5941: cd: /Users/*******/Desktop/*******: No such file or directory
./libtool: line 1887: cd: .libs/libsecp256k1.lax/libsecp256k1_precomputed.a: No such file or directory
make[5]: *** [libsecp256k1.la] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [external/x86_64-apple-darwin21.6.0/libwally-core-build/src/libwallycore.la] Error 2
Binary:
$ make
CC: cc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -std=gnu11 -g -fstack-protector-strong -Og -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/gheap/ -I external/x86_64-apple-darwin21.6.0/libbacktrace-build -I . -I/usr/local/include -I/usr/local/Cellar/sqlite/3.36.0/include -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 -DBUILD_ELEMENTS=1 -c -o
LD: cc -Og config.vars -Lexternal/x86_64-apple-darwin21.6.0 -lwallycore -lsecp256k1 -ljsmn -lbacktrace -L/usr/local/include -lm -lgmp -L/usr/local/Cellar/sqlite/3.36.0/lib -lsqlite3 -lz -lsodium -o
cd external/libwally-core && ./tools/autogen.sh
/bin/sh: ./tools/autogen.sh: No such file or directory
make: *** [external/x86_64-apple-darwin21.6.0/libwally-core-build/src/libwallycore.la] Error 127
Would be very grateful if someone could tell me what I'm doing wrong or point out a mistake :)
Is there any working scheme to build Core Lightning on macOS currently? I still have a problem with the secp256k1 сonfigure script