Lightning: Building master (and 0.7.2) on OSX generates critical -Werrors and fails

Created on 3 Sep 2019  路  4Comments  路  Source: ElementsProject/lightning

Issue and Steps to Reproduce

  • clone repo
  • checkout master or 0.7.2
  • ./configure
  • make

Attached are results of ./configure and make

uname -a:

18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64

gcc --version:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

cc --version:

Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Let me know if you'd like anything else to try and replicate.

debug_configure_output.txt
debug_make_output.txt

compilation mac

Most helpful comment

I solved this. I can't be 100% sure what did it. But I ran approximately:

git checkout v0.7.2.1

make distclean

  • deleted python virtual environment and recreated

pip install -r tests/requirements.txt -r doc/requirements.txt (mentioned under Debian/ubuntu install in INSTALL.md but not in OSX section, likely could have been this?)

./configure --enable-developer

make

sudo make install

All 4 comments

I solved this. I can't be 100% sure what did it. But I ran approximately:

git checkout v0.7.2.1

make distclean

  • deleted python virtual environment and recreated

pip install -r tests/requirements.txt -r doc/requirements.txt (mentioned under Debian/ubuntu install in INSTALL.md but not in OSX section, likely could have been this?)

./configure --enable-developer

make

sudo make install

@willcl-ark The above steps didn't help.
Getting the same error:

gossipd/gossip_store.c:74:6: error: implicit declaration of function 'pwritev' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (pwritev(fd, iov, ARRAY_SIZE(iov), *len) != sizeof(hdr) + msglen)
            ^
gossipd/gossip_store.c:74:6: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]

FWIW I have just successfully compiled master@3418e59d764531b9ed14137a1743f7fcc88b76cf on OSX, using Homebrew-installed gcc-9

make distclean
./configure --enable-developer
# make while piping make STDOTU and STDERR to log
make -j8 CC=gcc-9 -k 2>&1 | tee build.log

I did try this a number of times before, but not with the logging (I was going to upload logs here). Have not tested again with the logging in place as I need C-Lightning to work again for now :)

Closing as resolved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZsZolee picture ZsZolee  路  5Comments

igreshev picture igreshev  路  4Comments

Christewart picture Christewart  路  3Comments

saubyk picture saubyk  路  3Comments

Xian001 picture Xian001  路  3Comments