Fixing env variables/arguments in OpenBSD build instructions #11921

pull canselcik wants to merge 1 commits into bitcoin:master from canselcik:master changing 1 files +6 −5
  1. canselcik commented at 11:41 AM on December 17, 2017: none

    When the before version of the commands are executed, ./configure fails with:

     configure: error: C compiler cannot create executables
    

    However, when the arguments are passed as environment variables rather than arguments (at least on BSD), the ./configure runs with no issues and the build succeeds.

  2. Fixing env variables/arguments in OpenBSD build instructions a9014e782b
  3. laanwj added the label Linux/Unix on Dec 17, 2017
  4. laanwj commented at 11:49 AM on December 17, 2017: member

    Will try to reproduce this - the last time I tried the OpenBSD build instructions they worked fine for me.

    The reason we pass those options as arguments, FWIW, is that configure will remember them when the configuration needs to be regenerated. That avoids problems such as #11657.

  5. laanwj commented at 7:38 PM on December 17, 2017: member

    Is this problem new in OpenBSD 6.2? I've tried on 6.1 with my usual configure script, and found no issues;

    ./configure --with-gui=no --enable-experimental-asm CC=egcc CXX=eg++ CPP=ecpp BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"
    

    However I can't try with 6.2 right now.

  6. canselcik commented at 9:00 PM on December 17, 2017: none

    I am trying on 6.2, I haven't tried on 6.1.

    I am familiar with autoconf and aware that passing them as command-line arguments should work in theory, I was surprised when it told me configure: error: C compiler cannot create executables. Interestingly enough, feeding them in as environment variables took care of it.

  7. fanquake commented at 7:50 AM on December 18, 2017: member

    I've reproduced the problem on a new 6.2 install. The changes to the build commands do seem to fix the issue. This will also close #11868.

  8. laanwj commented at 8:12 AM on December 19, 2017: member

    Can you please take a look here @theuni? Any idea what could cause this change to be necessary?

  9. laanwj commented at 10:37 AM on December 19, 2017: member

    This seems to work on OpenBSD 6.2, to build using the built-in clang 4.0 (no need to install any compiler anymore):

    ./configure --disable-wallet CC=cc CXX=c++ CPP=cpp
    

    So maybe this is only wallet related? The contrib/install_db4.sh script, unlike configure, very likely doesn't take X=Y pairs for arguments, and the build guide mentions doing that.

  10. laanwj commented at 12:10 PM on December 19, 2017: member

    See #11945 (which should make these changes unnecessary)

  11. theuni commented at 10:39 PM on December 20, 2017: member

    ACK closing in favor of #11945.

  12. fanquake closed this on Dec 21, 2017

  13. laanwj referenced this in commit 7a11ba7e01 on Dec 21, 2017
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me