Page MenuHomePhabricator

depends: set two CMake options globally
ClosedPublic

Authored by Fabien on Aug 1 2024, 07:48.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC2b387df82b00: depends: set two CMake options globally
Summary
Set CMAKE_INSTALL_LIBDIR=lib/ and CMAKE_POSITION_INDEPENDENT_CODE=ON globally in depends, rather than per-package. CMAKE_INSTALL_LIBDIR=lib/ is needed to override the annoying GNUInstallDirs lib vs lib64 behaviour, and we always want PIC code. The PIC commit is the counterpart to the same Autotools change in #29488. I'm PRing these commits as I have a CMake branch building on top, and want to avoid adding the same workarounds to every package we are going to touch, but these can go in separately as the build should be tested for existing packages (i.e multiprocess).

Backport of core#29706.

I also reverted our usage of cmake_opts to use the config_opts like core. Using cmake or not, this is still a configure stage and this will avoid mistakes during backports.

Depends on D16566.

Test Plan

This is actually a no-op but will be useful when building miniupnpc with cmake.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR29706
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29821
Build 59177: Build Diff
Build 59176: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Aug 1 2024, 07:48
Fabien edited the summary of this revision. (Show Details)

@bot guix-linux guix-osx guix-win

Tail of the build log:

          ...bind-mounted in container to: /bitcoin/distsrc-1692027e3791-x86_64-linux-gnu
      ...outputting in: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/guix-linux/guix-results/x86_64-linux-gnu'
          ...bind-mounted in container to: '/outdir-base/x86_64-linux-gnu'
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
hint: Consider installing the `glibc-locales' package and defining
`GUIX_LOCPATH', along these lines:

     guix install glibc-locales
     export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

Required environment variables as seen inside the container:
    DIST_ARCHIVE_BASE: /outdir-base/dist-archive
    DISTNAME: bitcoin-1692027e3791
    HOST: x86_64-linux-gnu
    SOURCE_DATE_EPOCH: 1711126098
    JOBS: 12
    DISTSRC: distsrc-1692027e3791-x86_64-linux-gnu
    OUTDIR: /outdir-base/x86_64-linux-gnu
make: Entering directory '/bitcoin/depends'
Extracting native_protobuf...
/bitcoin/depends/sources/protobuf-all-21.12.tar.gz: OK
Preprocessing native_protobuf...
Configuring native_protobuf...
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 C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 
-- 3.21.12.0
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /bitcoin/depends/work/build/x86_64-linux-gnu/native_protobuf/21.12-dd63523e52e
Building native_protobuf...
ninja: error: loading 'build.ninja': No such file or directory
make: *** [funcs.mk:289: /bitcoin/depends/work/build/x86_64-linux-gnu/native_protobuf/21.12-dd63523e52e/./.stamp_built] Error 1
make: Leaving directory '/bitcoin/depends'
Build guix-linux failed with exit code 2

Tail of the build log:

          ...bind-mounted in container to: /bitcoin/distsrc-1692027e3791-x86_64-w64-mingw32
      ...outputting in: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/guix-win/guix-results/x86_64-w64-mingw32'
          ...bind-mounted in container to: '/outdir-base/x86_64-w64-mingw32'
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
hint: Consider installing the `glibc-locales' package and defining
`GUIX_LOCPATH', along these lines:

     guix install glibc-locales
     export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

Required environment variables as seen inside the container:
    DIST_ARCHIVE_BASE: /outdir-base/dist-archive
    DISTNAME: bitcoin-1692027e3791
    HOST: x86_64-w64-mingw32
    SOURCE_DATE_EPOCH: 1711126098
    JOBS: 12
    DISTSRC: distsrc-1692027e3791-x86_64-w64-mingw32
    OUTDIR: /outdir-base/x86_64-w64-mingw32
make: Entering directory '/bitcoin/depends'
Extracting native_protobuf...
/bitcoin/depends/sources/protobuf-all-21.12.tar.gz: OK
Preprocessing native_protobuf...
Configuring native_protobuf...
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 C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 
-- 3.21.12.0
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/21.12-987eafe5aef
Building native_protobuf...
ninja: error: loading 'build.ninja': No such file or directory
make: *** [funcs.mk:289: /bitcoin/depends/work/build/x86_64-w64-mingw32/native_protobuf/21.12-987eafe5aef/./.stamp_built] Error 1
make: Leaving directory '/bitcoin/depends'
Build guix-win failed with exit code 2

Tail of the build log:

 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'bitcode_strip.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-bitcode_strip.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'llvm-otool.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-llvm-otool.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'nm-classic.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-nm-classic.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'size-classic.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-size-classic.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'otool-classic.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-otool-classic.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'indr.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-indr.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'checksyms.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-checksyms.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'seg_addr_table.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-seg_addr_table.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'check_dylib.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-check_dylib.1'
 /home/bitcoinabc/.guix-profile/bin/install -c -m 644 'mtoc.1' '/bitcoin/depends/work/staging/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/bitcoin/depends/x86_64-apple-darwin/native/share/man/man1/x86_64-apple-darwin-mtoc.1'
make[3]: Leaving directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools/man'
make[2]: Leaving directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools/man'
make[2]: Entering directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools'
make[3]: Entering directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools'
make[2]: Leaving directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools'
make[1]: Leaving directory '/bitcoin/depends/work/build/x86_64-apple-darwin/native_cctools/2ef2e931cf641547eb8a68cfebde61003587c9fd-80a6ca1daa3/cctools'
Postprocessing native_cctools...
Caching native_cctools...
Extracting native_protobuf...
/bitcoin/depends/sources/protobuf-all-21.12.tar.gz: OK
Preprocessing native_protobuf...
Configuring native_protobuf...
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 C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/bitcoinabc/.guix-profile/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/bitcoinabc/.guix-profile/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 
-- 3.21.12.0
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /bitcoin/depends/work/build/x86_64-apple-darwin/native_protobuf/21.12-96e596467af
Building native_protobuf...
ninja: error: loading 'build.ninja': No such file or directory
make: *** [funcs.mk:289: /bitcoin/depends/work/build/x86_64-apple-darwin/native_protobuf/21.12-96e596467af/./.stamp_built] Error 1
make: Leaving directory '/bitcoin/depends'
Build guix-osx failed with exit code 2
PiRK requested changes to this revision.Aug 1 2024, 08:41
PiRK added a subscriber: PiRK.

We are not using libmultiprocess

This revision now requires changes to proceed.Aug 1 2024, 08:41
Fabien planned changes to this revision.Aug 1 2024, 09:02
In D16567#375134, @PiRK wrote:

We are not using libmultiprocess

That's not even the reason of the failure, I removed the -G Ninja by mistake

Restore the ninja generator and remove libmultiprocess

@bot guix-linux guix-osx guix-win

This revision is now accepted and ready to land.Aug 1 2024, 09:11
This revision was automatically updated to reflect the committed changes.