TileDB: Compilation failed in ArchLinux

In ArchLinux I got this error recently, while it worked in the past:

OS: ArchLinux GCC: 12.1.0 CMake: 3.23.1

This is how I compile it (based on sample Dockerfile):

../bootstrap \
    --prefix=/usr/local \
    --enable-verbose \
    --enable-serialization \
    --enable-tools
make -j "$(nproc)"

Logs:

-- Starting TileDB superbuild.
-- Found Zlib, adding imported target: /usr/lib/libz.so
-- Adding Magic as an external project
-- Found CapnProto lib: capnp
-- Found CapnProto lib: kj
-- Found CapnProto lib: capnp-json
-- Found OpenSSL: /usr/lib/libssl.so -- OpenSSL crypto: /usr/lib/libcrypto.so -- root: /home/mort/tiledb/src/TileDB-2.9.0/build/externals/install;/usr/local/opt/openssl
-- Found CURL: '/usr/lib/libcurl.so' (found version "")
-- searching for catch in /home/mort/tiledb/src/TileDB-2.9.0/build/externals/src
-- Found clang-tidy: /usr/bin/clang-tidy
-- Found clang-format: /usr/bin/clang-format
-- clang hunt, found /usr/bin/clang-format
-- Install prefix is /home/mort/tiledb/pkg/tiledb/usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mort/tiledb/src/TileDB-2.9.0/build
bootstrap success. Run "make" to build, "make check" to test, or "make -C tiledb install" to install.
[ 50%] Built target ep_magic
[ 56%] Performing build step for 'tiledb'
Consolidate compiler generated dependencies of target baseline
[  2%] Generating ../../../tiledb/sm/misc/magic_mgc_gzipped.bin
[  5%] Built target time
[  5%] Built target stringx
[  5%] Built target math
[  7%] Built target try_assert
[  7%] Built target constants
[ 10%] Built target datum
[ 10%] Building CXX object tiledb/common/CMakeFiles/baseline.dir/heap_memory.cc.o
[ 10%] Built target test_assert
[ 10%] Built target gen_mgc_unarch
Consolidate compiler generated dependencies of target TILEDB_CORE_OBJECTS
[ 10%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/common/heap_memory.cc.o
[ 13%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/c_api/tiledb.cc.o
[ 13%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/cache/buffer_lru_cache.cc.o
[ 13%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/compressors/dd_compressor.cc.o
[ 13%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/compressors/bzip_compressor.cc.o
[ 15%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/compressors/dict_compressor.cc.o
[ 15%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/compressors/gzip_compressor.cc.o
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc: In function ‘void* tiledb::common::tiledb_realloc(void*, std::size_t, const std::string&)’:
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:93:31: error: pointer ‘p’ may be used after ‘void* realloc(void*, size_t)’ [-Werror=use-after-free]
   93 |   heap_profiler.record_dealloc(p);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:88:39: note: call to ‘void* realloc(void*, size_t)’ here
   88 |   void* const p_realloc = std::realloc(p, size);
      |                           ~~~~~~~~~~~~^~~~~~~~~
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc: In function ‘void tiledb::common::tiledb_free(void*)’:
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:108:31: error: pointer ‘p’ used after ‘void free(void*)’ [-Werror=use-after-free]
  108 |   heap_profiler.record_dealloc(p);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:107:7: note: call to ‘void free(void*)’ here
  107 |   free(p);
      |   ~~~~^~~
cc1plus: all warnings being treated as errors
make[5]: *** [tiledb/common/CMakeFiles/baseline.dir/build.make:118: tiledb/common/CMakeFiles/baseline.dir/heap_memory.cc.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:1113: tiledb/common/CMakeFiles/baseline.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
[ 15%] Building CXX object tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/sm/compressors/lz4_compressor.cc.o
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc: In function ‘void* tiledb::common::tiledb_realloc(void*, std::size_t, const std::string&)’:
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:93:31: error: pointer ‘p’ may be used after ‘void* realloc(void*, size_t)’ [-Werror=use-after-free]
   93 |   heap_profiler.record_dealloc(p);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:88:39: note: call to ‘void* realloc(void*, size_t)’ here
   88 |   void* const p_realloc = std::realloc(p, size);
      |                           ~~~~~~~~~~~~^~~~~~~~~
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc: In function ‘void tiledb::common::tiledb_free(void*)’:
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:108:31: error: pointer ‘p’ used after ‘void free(void*)’ [-Werror=use-after-free]
  108 |   heap_profiler.record_dealloc(p);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/mort/tiledb/src/TileDB-2.9.0/tiledb/common/heap_memory.cc:107:7: note: call to ‘void free(void*)’ here
  107 |   free(p);
      |   ~~~~^~~
cc1plus: all warnings being treated as errors
make[5]: *** [tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/build.make:76: tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/common/heap_memory.cc.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [CMakeFiles/Makefile2:983: tiledb/CMakeFiles/TILEDB_CORE_OBJECTS.dir/all] Error 2
make[3]: *** [Makefile:146: all] Error 2
make[2]: *** [CMakeFiles/tiledb.dir/build.make:86: tiledb-prefix/src/tiledb-stamp/tiledb-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/tiledb.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

So, I have it as well. It’s weird why it doesn’t work here 🤔 But, as you suggested, I’m going to disable it just for now, but as soon as you can find a solution or fix it, please let me know to update the AUR package. Thanks 😃

I’m trying to update the AUR package. What’s your idea? should we ignore it?

I happen to have “inherited” (in the sense of I didn’t start the process knowing how demanding our build can be once you turn enough features on) the Debian package (as I have been a Debian Developer / Contributor for many moons now) and if you promise to not tell anyone 😁 that is exactly what I did for 2.13.* – turn off webp. Life too short and all that. We already must patch (or override) capnp and catch to have a ‘clean room’ build that doesn’t run away to github so I (for now) suppress webp. I look forward to re-enabling it once the branch is merged.

Thanks for the bug report.

The most recent g++ and clang++ versions emit more warnings, and the build defaults to treating warnings as errrors, creating an impasse. The build will work with g++-11, for g++-12 you can add the --disable-werror flag to the bootstrap invocation. Please let us know if the build still fails with warnings ‘as just warnings’.