Commit Graph

5 Commits

Author SHA1 Message Date
Konstantin Akimov
0c38cc325e
fix: drop -static-libstc++ from depends/hosts/{linux,mingw32}.mk which is clang-only 2024-04-03 16:03:26 +07:00
fanquake
b8d3a682fb
Merge bitcoin/bitcoin#24392: build: Fix configuring depends with cmake
ff4a38a32766942ce5c4be6d6510f800a9f8e0d9 build: Fix configuring depends with cmake (Hennadii Stepanov)

Pull request description:

  This PR fixes bitcoin/bitcoin#24389.

  On master (28aa0e3ca0a6cfeb5b2b63929d4bc58de6ee6f02) configuring of the `libmultiprocess` package for the `x86_64-w64-mingw32` target fails:
  ```
  $ cd depends
  $ make libmultiprocess_configured MULTIPROCESS=1 HOST=x86_64-w64-mingw32
  Configuring libmultiprocess...
  CMake Warning:
    No source or binary directory provided.  Both will be assumed to be the
    same as the current working directory, but note that this warning will
    become a fatal error in future CMake releases.

  -- The CXX compiler identification is GNU 9.3.0
  -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++-posix
  -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++-posix -- broken
  CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
    The C++ compiler

      "/usr/bin/x86_64-w64-mingw32-g++-posix"

    is not able to compile a simple test program.

    It fails with the following output:

      Change Dir: /home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeTmp

      Run Build Command(s):/usr/bin/make cmTC_93273/fast && make[1]: Entering directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeTmp'
      /usr/bin/make -f CMakeFiles/cmTC_93273.dir/build.make CMakeFiles/cmTC_93273.dir/build
      make[2]: Entering directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeTmp'
      Building CXX object CMakeFiles/cmTC_93273.dir/testCXXCompiler.cxx.o
      /usr/bin/x86_64-w64-mingw32-g++-posix    -I/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32/include     -pipe -O2    -o CMakeFiles/cmTC_93273.dir/testCXXCompiler.cxx.o -c /home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
      Linking CXX executable cmTC_93273
      /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_93273.dir/link.txt --verbose=1
      /usr/bin/x86_64-w64-mingw32-g++-posix  -I/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32/include     -pipe -O2   -L/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32/lib  -rdynamic CMakeFiles/cmTC_93273.dir/testCXXCompiler.cxx.o  -o cmTC_93273
      x86_64-w64-mingw32-g++-posix: error: unrecognized command line option ‘-rdynamic’
      make[2]: *** [CMakeFiles/cmTC_93273.dir/build.make:87: cmTC_93273] Error 1
      make[2]: Leaving directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeTmp'
      make[1]: *** [Makefile:121: cmTC_93273/fast] Error 2
      make[1]: Leaving directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeTmp'

    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:6 (project)

  -- Configuring incomplete, errors occurred!
  See also "/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeOutput.log".
  See also "/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/CMakeFiles/CMakeError.log".
  make: *** [funcs.mk:283: /home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-w64-mingw32/libmultiprocess/d576d975debdc9090bd2582f83f49c76c0061698-f496b1e64cb/./.stamp_configured] Error 1

  ```

  The reason of that failure is the unset `-DCMAKE_SYSTEM_NAME` flag:
  ```
  $ make print-libmultiprocess_cmake MULTIPROCESS=1 HOST=x86_64-w64-mingw32
  libmultiprocess_cmake=env CC="x86_64-w64-mingw32-gcc" CFLAGS="  -I/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32/include     -pipe -O2    " CXX="x86_64-w64-mingw32-g++-posix" CXXFLAGS="  -I/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32/include     -pipe -O2    " LDFLAGS="  -L/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32/lib    " cmake -DCMAKE_INSTALL_PREFIX:PATH="/home/hebasto/GitHub/bitcoin/depends/x86_64-w64-mingw32" -DCMAKE_SYSTEM_NAME= -DCMAKE_C_COMPILER_TARGET=x86_64-w64-mingw32 -DCMAKE_CXX_COMPILER_TARGET=x86_64-w64-mingw32
  ```

  This PR fixes this error:
  ```
  $ make libmultiprocess_configured MULTIPROCESS=1 HOST=x86_64-w64-mingw32
  $ # no errors
  ```

ACKs for top commit:
  fanquake:
    ACK ff4a38a32766942ce5c4be6d6510f800a9f8e0d9 - going to merge this now, and we can follow up with more cmake improvements.

Tree-SHA512: bd8d8b2f4eedcc8c46cf995b9c39493ea4d0b13c224f77ef62985304ebd392f05119043a06f1401c64f962007a8faa4bb53715d99a408ee6c33bb49a2dd650ba
2024-01-19 11:02:22 -06:00
fanquake
098d0fd430
Merge #18677: Multiprocess build support
e2bab2aa162ae38b2bf8195b577c982402fbee9d multiprocess: add multiprocess travis configuration (Russell Yanofsky)
603fd6a2e708c04ef6c9880f89d0a4cbaa6fc7c5 depends: add MULTIPROCESS depends option (Russell Yanofsky)
5d1377b52bfcd4edf8553aaf332bfeb92fc554cc build: multiprocess autotools changes (Russell Yanofsky)

Pull request description:

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).

  ---

  This PR consists of build changes only. It adds an `--enable-multiprocess` autoconf option (off by default and marked experimental), that builds new `bitcoin-node` and `bitcoin-gui` binaries. These currently function the same as existing `bitcoind` and `bitcoin-qt` binaries, but are extended in #10102 with IPC features to execute node, wallet, and gui functions in separate processes.

  In addition to adding the `--enable-multiprocess` config flag, it also adds a depends package and autoconf rules to build with the [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) library, and it adds new travis configuration to exercise the build code and run functional tests with the new binaries.

  The changes in this PR were originally part of #10102 but were moved into #16367 to be able to develop and review the multiprocess build changes independently of the code changes. #16367 was briefly merged and then reverted in #18588. Only change since #16367 has been dropping the `native_boost.mk` depends package which was pointed out to be no longer necessary in https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-596484337 and https://github.com/bitcoin/bitcoin/pull/18588#pullrequestreview-391765649

ACKs for top commit:
  practicalswift:
    ACK e2bab2aa162ae38b2bf8195b577c982402fbee9d
  Sjors:
    tACK e2bab2aa162ae38b2bf8195b577c982402fbee9d on macOS 10.15.4
  hebasto:
    ACK e2bab2aa162ae38b2bf8195b577c982402fbee9d, tested on Linux Mint 19.3 (x86_64):

Tree-SHA512: b5a76eab5abf63d9d8b6d628cbdff4cc1888eef15cafa0a5d56369e2f9d02595fed623f4b74b2cf2830c42c05a774f0943e700f9c768a82d9d348cad199e135c
2024-01-16 09:34:26 -06:00
Alexander Block
f3e380659a Move to in-docker CI builds and add Jenkins support (#2178)
* GCC-7 and glibc-2.27 compat code

* Statically link libstdc++ for GCC based builds

Makes sure binaries which are built on a newer build host still work
on older distros.

* Use python3 when installing MacOS native tools

* Move actual build logic out of Travis and upgrade to gcc-7

Travis will now simply call a few scripts which do the actual work.
These scripts will first create a "builder image" which contains the
necessary environment for the actual build. Then scripts are called
inside this builder image to do the build.

This should make us more independant from Travis and also allows us
to do local CI testing.

The build matrix is also moved out of .travis.yml and instead moved
into ci/matrix.sh. This script is sourced with only "BUILD_TARGET" being
set so that it internally can figure out which other environment
variables need to be set.

This commit also upgrades the used GCC version to 7. This is due to the
use of ubuntu:bionic as base image for the builder image.

* Add Jenkinsfiles for regular CI and nightly gitian builds

* Automatically download OSX SDK in gitian-build.sh

* Remove bogus "export MAKEJOBS=-j5"

* Forward cache/src dirs into builder container

Fixes caching issues on Travis.

* fix

* Fail build immediately when building depends took too long
2018-07-12 16:28:59 +03:00
Evan Duffield
cf92651fc4 More gitian updates 2014-12-31 09:49:12 -07:00