Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: avro-cpp (Also update request: 1.11.3 → 1.12.0) #368981

Closed
jcaesar opened this issue Dec 29, 2024 · 0 comments · Fixed by #369338
Closed

Build failure: avro-cpp (Also update request: 1.11.3 → 1.12.0) #368981

jcaesar opened this issue Dec 29, 2024 · 0 comments · Fixed by #369338
Labels
0.kind: build failure A package fails to build 9.needs: package (update) This needs a package to be updated

Comments

@jcaesar
Copy link
Contributor

jcaesar commented Dec 29, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build github:NixOS/nixpkgs/eda595acd85d7c8607994d3517a92fcb9211a5cd#avro-cpp

Build log

Build Log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/xyqw8rk1xfg9yzrix16m09rpd0w05kjr-avro-cpp-1.11.3.tar.gz
source root is avro-cpp-1.11.3
setting SOURCE_DATE_EPOCH to timestamp 1694800068 of file avro-cpp-1.11.3/test/unittest.cc
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/rack107dk6h9yacqhf48g6b14nx0ashw-fix-boost-compatibility.patch
patching file CMakeLists.txt
patching file impl/avrogencpp.cc
Hunk #1 succeeded at 130 (offset 5 lines).
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
substituteStream() in derivation avro-c++-1.11.3: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'test/SchemaTests.cc')
substituteStream() in derivation avro-c++-1.11.3: WARNING: pattern BOOST_CHECKPOINT doesn't match anything in file 'test/SchemaTests.cc'
substituteStream() in derivation avro-c++-1.11.3: WARNING: pattern BOOST_MESSAGE doesn't match anything in file 'test/buffertest.cc'
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/share/doc/Avro-cpp -DCMAKE_INSTALL_INFODIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/include -DCMAKE_INSTALL_SBINDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/xcn9p4xxfbvlkpah7pwchpav4ab9d135-gcc-wrapper-14-20241116/bin/strip -DCMAKE_RANLIB=/nix/store/xcn9p4xxfbvlkpah7pwchpav4ab9d135-gcc-wrapper-14-20241116/bin/ranlib -DCMAKE_AR=/nix/store/xcn9p4xxfbvlkpah7pwchpav4ab9d135-gcc-wrapper-14-20241116/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/5hp2c369fim5w7cpa07jjixicl1cfyql-avro-c++-1.11.3
CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/xcn9p4xxfbvlkpah7pwchpav4ab9d135-gcc-wrapper-14-20241116/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: /nix/store/xcn9p4xxfbvlkpah7pwchpav4ab9d135-gcc-wrapper-14-20241116/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:78 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /nix/store/f0qbspim8mzycf2df88sqvvmfnd7yxxj-boost-1.86.0-dev/lib/cmake/Boost-1.86.0/BoostConfig.cmake (found suitable version "1.86.0", minimum required is "1.38") found components: filesystem iostreams program_options regex system
CMake Warning at CMakeLists.txt:81 (find_package):
  By not providing "FindSnappy.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Snappy", but
  CMake did not find one.

  Could not find a package configuration file provided by "Snappy" with any
  of the following names:

    SnappyConfig.cmake
    snappy-config.cmake

  Add the installation prefix of "Snappy" to CMAKE_PREFIX_PATH or set
  "Snappy_DIR" to a directory containing one of the above files.  If "Snappy"
  provides a separate development package or SDK, be sure it has been
  installed.


Disabled snappy codec. libsnappy not found.
-- Configuring done (1.2s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DOCDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_INFODIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_LOCALEDIR
    CMAKE_INSTALL_MANDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CMAKE_POLICY_DEFAULT_CMP0025


-- Build files have been written to: /build/avro-cpp-1.11.3/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j16 SHELL=/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/bash
[  1%] Building CXX object CMakeFiles/avrocpp.dir/impl/Compiler.cc.o
[  2%] Building CXX object CMakeFiles/avrocpp.dir/impl/Node.cc.o
[  3%] Building CXX object CMakeFiles/avrocpp.dir/impl/LogicalType.cc.o
[  4%] Building CXX object CMakeFiles/avrocpp.dir/impl/NodeImpl.cc.o
[  5%] Building CXX object CMakeFiles/avrocpp.dir/impl/ResolverSchema.cc.o
[  6%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Compiler.cc.o
[  7%] Building CXX object CMakeFiles/avrocpp.dir/impl/Schema.cc.o
[  9%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Node.cc.o
[  9%] Building CXX object CMakeFiles/avrocpp.dir/impl/Types.cc.o
[ 10%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/LogicalType.cc.o
[ 11%] Building CXX object CMakeFiles/avrocpp.dir/impl/ValidSchema.cc.o
[ 12%] Building CXX object CMakeFiles/avrocpp.dir/impl/Zigzag.cc.o
[ 13%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/NodeImpl.cc.o
[ 14%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/ResolverSchema.cc.o
[ 15%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Schema.cc.o
[ 16%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Types.cc.o
[ 17%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/ValidSchema.cc.o
[ 18%] Building CXX object CMakeFiles/avrocpp.dir/impl/BinaryEncoder.cc.o
[ 19%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Zigzag.cc.o
[ 20%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/BinaryEncoder.cc.o
[ 21%] Building CXX object CMakeFiles/avrocpp.dir/impl/BinaryDecoder.cc.o
[ 22%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/BinaryDecoder.cc.o
[ 23%] Building CXX object CMakeFiles/avrocpp.dir/impl/Stream.cc.o
/build/avro-cpp-1.11.3/impl/Compiler.cc: In function 'avro::NodePtr avro::makeRecordNode(const json::Entity&, const Name&, const std::string*, const json::Object&, SymbolTable&, const std::string&)':
/build/avro-cpp-1.11.3/impl/Compiler.cc:304:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
  304 |     const Array &v = getArrayField(e, m, "fields");
      |                  ^
/build/avro-cpp-1.11.3/impl/Compiler.cc:304:35: note: the temporary was destroyed at the end of the full expression 'avro::getArrayField((* & e), (* & m), std::__cxx11::basic_string<char>(((const char*)"fields"), std::allocator<char>()))'
  304 |     const Array &v = getArrayField(e, m, "fields");
      |                      ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/build/avro-cpp-1.11.3/impl/Compiler.cc: In function 'avro::NodePtr avro::makeEnumNode(const json::Entity&, const Name&, const json::Object&)':
/build/avro-cpp-1.11.3/impl/Compiler.cc:370:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
  370 |     const Array &v = getArrayField(e, m, "symbols");
      |                  ^
/build/avro-cpp-1.11.3/impl/Compiler.cc:370:35: note: the temporary was destroyed at the end of the full expression 'avro::getArrayField((* & e), (* & m), std::__cxx11::basic_string<char>(((const char*)"symbols"), std::allocator<char>()))'
  370 |     const Array &v = getArrayField(e, m, "symbols");
      |                      ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
[ 25%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Stream.cc.o
/build/avro-cpp-1.11.3/impl/Compiler.cc: In function 'avro::NodePtr avro::makeRecordNode(const json::Entity&, const Name&, const std::string*, const json::Object&, SymbolTable&, const std::string&)':
/build/avro-cpp-1.11.3/impl/Compiler.cc:304:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
  304 |     const Array &v = getArrayField(e, m, "fields");
      |                  ^
/build/avro-cpp-1.11.3/impl/Compiler.cc:304:35: note: the temporary was destroyed at the end of the full expression 'avro::getArrayField((* & e), (* & m), std::__cxx11::basic_string<char>(((const char*)"fields"), std::allocator<char>()))'
  304 |     const Array &v = getArrayField(e, m, "fields");
      |                      ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/build/avro-cpp-1.11.3/impl/Compiler.cc: In function 'avro::NodePtr avro::makeEnumNode(const json::Entity&, const Name&, const json::Object&)':
/build/avro-cpp-1.11.3/impl/Compiler.cc:370:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
  370 |     const Array &v = getArrayField(e, m, "symbols");
      |                  ^
/build/avro-cpp-1.11.3/impl/Compiler.cc:370:35: note: the temporary was destroyed at the end of the full expression 'avro::getArrayField((* & e), (* & m), std::__cxx11::basic_string<char>(((const char*)"symbols"), std::allocator<char>()))'
  370 |     const Array &v = getArrayField(e, m, "symbols");
      |                      ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
[ 26%] Building CXX object CMakeFiles/avrocpp.dir/impl/FileStream.cc.o
[ 27%] Building CXX object CMakeFiles/avrocpp.dir/impl/Generic.cc.o
[ 28%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/FileStream.cc.o
[ 29%] Building CXX object CMakeFiles/avrocpp.dir/impl/GenericDatum.cc.o
[ 30%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Generic.cc.o
[ 31%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/GenericDatum.cc.o
[ 32%] Building CXX object CMakeFiles/avrocpp.dir/impl/DataFile.cc.o
[ 33%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/DataFile.cc.o
[ 34%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/parsing/Symbol.cc.o
[ 35%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/parsing/ValidatingCodec.cc.o
[ 36%] Building CXX object CMakeFiles/avrocpp.dir/impl/parsing/Symbol.cc.o
[ 37%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/parsing/JsonCodec.cc.o
[ 38%] Building CXX object CMakeFiles/avrocpp.dir/impl/parsing/ValidatingCodec.cc.o
[ 39%] Building CXX object CMakeFiles/avrocpp.dir/impl/parsing/JsonCodec.cc.o
[ 40%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/parsing/ResolvingDecoder.cc.o
[ 41%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/json/JsonIO.cc.o
[ 42%] Building CXX object CMakeFiles/avrocpp.dir/impl/parsing/ResolvingDecoder.cc.o
[ 43%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/json/JsonDom.cc.o
[ 44%] Building CXX object CMakeFiles/avrocpp.dir/impl/json/JsonIO.cc.o
[ 45%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Resolver.cc.o
[ 46%] Building CXX object CMakeFiles/avrocpp.dir/impl/json/JsonDom.cc.o
[ 47%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Validator.cc.o
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/avrocpp.dir/build.make:76: CMakeFiles/avrocpp.dir/impl/Compiler.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 48%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/CustomAttributes.cc.o
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/avrocpp_s.dir/build.make:76: CMakeFiles/avrocpp_s.dir/impl/Compiler.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:155: CMakeFiles/avrocpp_s.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:129: CMakeFiles/avrocpp.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Additional context

Can be easily worked around by

  cmakeFlags = [
    (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-Wno-error=dangling-reference")
  ];

But the sensible thing would really be to update.

Metadata

➜ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.3, NixOS, 25.05 (Warbler), j_93110e1_20241209082912`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - nixpkgs: `/nix/store/mxv25ag637gkza620ff80pfhc6wii21z-source`

Notify maintainers

@rasendubi


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 9.needs: package (update) This needs a package to be updated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant