Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941214 - media-gfx/darktable-4.8.0: unable fails to compile: "ld.lld: error: undefined symbol: main", "Did not find <zlib.h> header", "Did not find uncompress() function in ZLIB" and other errors
Summary: media-gfx/darktable-4.8.0: unable fails to compile: "ld.lld: error: undefined...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Markus Meier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-10 00:04 UTC by Vitaly Zdanevich
Modified: 2024-10-10 00:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Zdanevich 2024-10-10 00:04:10 UTC
Log before errors:

[ebuild     U  ] media-gfx/darktable-4.8.0 [4.6.0]

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Running pre-merge checks for media-gfx/darktable-4.8.0

>>> Emerging (1 of 1) media-gfx/darktable-4.8.0::gentoo
 * darktable-4.8.0.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                               [ ok ]
 * Using lua5.4 to build
>>> Unpacking source...
>>> Unpacking darktable-4.8.0.tar.xz to /var/tmp/portage/media-gfx/darktable-4.8.0/work
>>> Source unpacked in /var/tmp/portage/media-gfx/darktable-4.8.0/work
>>> Preparing source in /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0 ...
 * SED: the following did not cause any changes
 *     sed -i -e 's:/appdata:/metainfo:g' data/CMakeLists.txt || die;
 * no-op: -e s:/appdata:/metainfo:g
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build"
 * Applying darktable-3.4.0_jsonschema-automagic.patch ...                                                                                                          [ ok ]
 * Applying darktable-3.4.1_libxcf-cmake.patch ...                                                                                                                  [ ok ]
 * Applying darktable-4.2.1_cmake-musl.patch ...
patching file src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cmake
Hunk #1 succeeded at 4 with fuzz 2 (offset 2 lines).
patching file src/external/rawspeed/cmake/Modules/cpu-page-size.cpp
Hunk #1 succeeded at 4 with fuzz 1.                                                                                                                                 [ ok ]
 * Applying darktable-4.8.0_fix-has-attribute-musl.patch ...                                                                                                        [ ok ]
 * Hardcoded definition(s) removed in src/external/libxcf/CMakeLists.txt:
 *    SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, option
 * Hardcoded definition(s) removed in src/external/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE "Release")
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *  	SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, 
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build"
cmake -C /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_CURVE_TOOLS=no -DBUILD_NOISE_TOOLS=no -DBUILD_PRINT=no -DCUSTOM_CFLAGS=ON -DDONT_USE_INTERNAL_LUA=ON -DRAWSPEED_ENABLE_LTO=yes -DRAWSPEED_ENABLE_WERROR=OFF -DRAWSPEED_MUSL_SYSTEM=no -DTESTBUILD_OPENCL_PROGRAMS=OFF -DUSE_AVIF=yes -DUSE_CAMERA_SUPPORT=no -DUSE_COLORD=no -DUSE_GMIC=OFF -DUSE_GRAPHICSMAGICK=no -DUSE_HEIF=yes -DUSE_JXL=no -DUSE_KWALLET=no -DUSE_LIBSECRET=no -DUSE_LUA=yes -DUSE_MAP=no -DUSE_NLS=yes -DUSE_OPENCL=no -DUSE_OPENEXR=no -DUSE_OPENJPEG=no -DUSE_OPENMP=yes -DUSE_PORTMIDI=no -DUSE_SDL2=no -DUSE_WEBP=yes -DWANT_JSON_VALIDATION=no -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/gentoo_toolchain.cmake /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0
loading initial cache file /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/gentoo_common_config.cmake
-- The CXX compiler identification is GNU 13.3.1
-- The C compiler identification is GNU 13.3.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found OpenMP_C: -fopenmp (found suitable version "4.5", minimum required is "4.5")
-- Found OpenMP_CXX: -fopenmp (found suitable version "4.5", minimum required is "4.5")
-- Found OpenMP: TRUE (found suitable version "4.5", minimum required is "4.5")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test IS_SUPPORTED_PLATFORM
-- Performing Test IS_SUPPORTED_PLATFORM - Success
-- Looking for cpuid.h
-- Looking for cpuid.h - found
-- Looking for __get_cpuid
-- Looking for __get_cpuid - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Performing Test HAVE_OMP_FIRSTPRIVATE_WITH_CONST
-- Performing Test HAVE_OMP_FIRSTPRIVATE_WITH_CONST - Success
-- Performing Test HAVE_THREAD_RWLOCK_ARCH_T_READERS
-- Performing Test HAVE_THREAD_RWLOCK_ARCH_T_READERS - Success
-- Performing Test HAVE_THREAD_RWLOCK_ARCH_T_NR_READERS
-- Performing Test HAVE_THREAD_RWLOCK_ARCH_T_NR_READERS - Failed
-- Performing Test _MSSE2
-- Performing Test _MSSE2 - Success
-- Building SSE2-optimized codepaths: ON
-- Performing libstdc++ version check
-- Performing libstdc++ version check - Success
-- Performing libc++ version check
-- Performing libc++ version check - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wall
-- Performing Test C_COMPILER_UNDERSTANDS_-Wall - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wall
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wall - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wformat
-- Performing Test C_COMPILER_UNDERSTANDS_-Wformat - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wformat
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wformat - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wformat-security
-- Performing Test C_COMPILER_UNDERSTANDS_-Wformat-security - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wformat-security
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wformat-security - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wshadow
-- Performing Test C_COMPILER_UNDERSTANDS_-Wshadow - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wshadow
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wshadow - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wtype-limits
-- Performing Test C_COMPILER_UNDERSTANDS_-Wtype-limits - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wtype-limits
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wtype-limits - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wvla
-- Performing Test C_COMPILER_UNDERSTANDS_-Wvla - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wvla
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wvla - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wold-style-declaration
-- Performing Test C_COMPILER_UNDERSTANDS_-Wold-style-declaration - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wthread-safety
-- Performing Test C_COMPILER_UNDERSTANDS_-Wthread-safety - Failed
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wthread-safety
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wthread-safety - Failed
-- Performing Test C_COMPILER_UNDERSTANDS_-Wmaybe-uninitialized
-- Performing Test C_COMPILER_UNDERSTANDS_-Wmaybe-uninitialized - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wmaybe-uninitialized
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wmaybe-uninitialized - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-unknown-pragmas
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-unknown-pragmas - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-unknown-pragmas
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-unknown-pragmas - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=varargs
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=varargs - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=varargs
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=varargs - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-format-truncation
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-format-truncation - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-format-truncation
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-format-truncation - Success
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member
-- Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member - Success
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member
-- Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member - Success
-- Looking for external programs
-- Found perl
-- Found intltool-merge
-- Found desktop-file-validate
-- Found xsltproc
-- Found xmllint
-- All external programs found
-- Found Gettext: /usr/bin/msgmerge (found version "0.22.5")
-- Found msgfmt to convert .po file. Translation enabled
-- Checking for -march=native support
-- Performing Test RAWSPEED_MARCHNATIVE
-- Performing Test RAWSPEED_MARCHNATIVE - Success
-- Checking for -march=native support - works
-- Found GCCAr: /usr/bin/gcc-ar
-- Found GCCNm: /usr/bin/gcc-nm
-- Found GCCRanLib: /usr/bin/gcc-ranlib
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WALL
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WALL - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WEXTRA
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WEXTRA - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WCAST_QUAL
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WCAST_QUAL - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WEXTRA_SEMI
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WEXTRA_SEMI - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WFORMAT_2
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WFORMAT_2 - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WPOINTER_ARITH
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WPOINTER_ARITH - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WVLA
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WVLA - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WMISSING_FORMAT_ATTRIBUTE
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WMISSING_FORMAT_ATTRIBUTE - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WSUGGEST_ATTRIBUTE_FORMAT
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WSUGGEST_ATTRIBUTE_FORMAT - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_UNUSED_PARAMETER
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_UNUSED_PARAMETER - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_MAYBE_UNINITIALIZED
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_MAYBE_UNINITIALIZED - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_STRINGOP_OVERFLOW
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_STRINGOP_OVERFLOW - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_ARRAY_BOUNDS
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WNO_ARRAY_BOUNDS - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WSTACK_USAGE_4096
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WSTACK_USAGE_4096 - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WFRAME_LARGER_THAN_4096
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WFRAME_LARGER_THAN_4096 - Failed
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WLARGER_THAN_32768
-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WLARGER_THAN_32768 - Failed
-- Performing basic integral type checks
Comment 1 Vitaly Zdanevich 2024-10-10 00:04:26 UTC
Second log part with errors:

CMake Error at src/external/rawspeed/cmake/src-dependencies.cmake:48 (message):
  Change Dir:
  '/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/lib64/darktable/rawspeed/byte/CMakeFiles/CMakeTmp'




  Run Build Command(s): /usr/bin/ninja -v cmTC_37898

  [1/2] /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -std=c++20 -fPIE -o
  CMakeFiles/cmTC_37898.dir/byte.cpp.o -c
  /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/lib64/darktable/rawspeed/byte.cpp


  [2/2] : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -fuse-ld=lld -Wl,-O3
  -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0
  -Wl,--as-needed -flto CMakeFiles/cmTC_37898.dir/byte.cpp.o -o cmTC_37898 &&
  :

  FAILED: cmTC_37898

  : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -fuse-ld=lld -Wl,-O3
  -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0
  -Wl,--as-needed -flto CMakeFiles/cmTC_37898.dir/byte.cpp.o -o cmTC_37898 &&
  :

  ld.lld: error: undefined symbol: main

  >>> referenced by
  /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o:(_start)

  collect2: error: ld returned 1 exit status

  ninja: build stopped: subcommand failed.



Call Stack (most recent call first):
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Looking for OpenMP
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for OpenMP - found (system)
-- Looking for pugixml
-- Found Pugixml 1.14
-- Looking for pugixml - found (system)
-- Looking for JPEG
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Looking for JPEG - found
-- Looking for jpeg_mem_src
-- Looking for jpeg_mem_src - not found
-- Looking for ZLIB
-- Found ZLIB: /usr/lib64/libz.so (found suitable version "1.3.1", minimum required is "1.2.11")
-- Looking for C++ include zlib.h
-- Looking for C++ include zlib.h - not found
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:23 (message):
  Did not find <zlib.h> header
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Looking for sys/types.h
-- Looking for sys/types.h - not found
-- Looking for stdint.h
-- Looking for stdint.h - not found
-- Looking for stddef.h
-- Looking for stddef.h - not found
-- Check size of uLongf
-- Check size of uLongf - failed
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:30 (message):
  Did not find uLongf type in <zlib.h>
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Looking for Z_OK
-- Looking for Z_OK - not found
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:35 (message):
  Did not find Z_OK macro in <zlib.h>
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Checking prototype uncompress for HAVE_ZLIB_UNCOMPRESS_PROTOTYPE
-- Checking prototype uncompress for HAVE_ZLIB_UNCOMPRESS_PROTOTYPE - False
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:44 (message):
  Found unexpected prototype for uncompress() in <zlib.h>
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Checking prototype zError for HAVE_ZLIB_ZERROR_PROTOTYPE
-- Checking prototype zError for HAVE_ZLIB_ZERROR_PROTOTYPE - False
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:53 (message):
  Found unexpected prototype for zError() in <zlib.h>
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Looking for uncompress
-- Looking for uncompress - not found
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:60 (message):
  Did not find uncompress() function in ZLIB
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Looking for zError
-- Looking for zError - not found
CMake Error at src/external/rawspeed/cmake/Modules/CheckZLIB.cmake:65 (message):
  Did not find zError() function in ZLIB
Call Stack (most recent call first):
  src/external/rawspeed/cmake/src-dependencies.cmake:195 (include)
  src/external/rawspeed/CMakeLists.txt:210 (include)


-- Looking for ZLIB - found (system)
-- Performing Test HAVE_CXX_THREAD_LOCAL
-- Performing Test HAVE_CXX_THREAD_LOCAL - Failed
-- Performing Test HAVE_GCC_THREAD_LOCAL
-- Performing Test HAVE_GCC_THREAD_LOCAL - Failed
CMake Error at src/external/rawspeed/cmake/Modules/thread-local.cmake:25 (MESSAGE):
  The compiler does not support Thread-local storage.
Call Stack (most recent call first):
  src/external/rawspeed/src/CMakeLists.txt:1 (include)


-- Trying to query CPU L1d cache line size
CMake Error at src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cmake:17 (message):
  Failed to query CPU L1d cache line size:

  Change Dir:
  '/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/CMakeFiles/CMakeTmp'




  Run Build Command(s): /usr/bin/ninja -v cmTC_5f34a

  [1/2] /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -std=c++20 -fPIE -o
  CMakeFiles/cmTC_5f34a.dir/cpu-cache-line-size.cpp.o -c
  /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0/src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cpp


  [2/2] : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -fuse-ld=lld -Wl,-O3
  -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0
  -Wl,--as-needed -flto CMakeFiles/cmTC_5f34a.dir/cpu-cache-line-size.cpp.o
  -o cmTC_5f34a && :

  FAILED: cmTC_5f34a

  : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -fuse-ld=lld -Wl,-O3
  -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0
  -Wl,--as-needed -flto CMakeFiles/cmTC_5f34a.dir/cpu-cache-line-size.cpp.o
  -o cmTC_5f34a && :

  ld.lld: error: undefined symbol: main

  >>> referenced by
  /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o:(_start)

  collect2: error: ld returned 1 exit status

  ninja: build stopped: subcommand failed.





Call Stack (most recent call first):
  src/external/rawspeed/src/CMakeLists.txt:2 (include)


-- Trying to query CPU page size
CMake Error at src/external/rawspeed/cmake/Modules/cpu-page-size.cmake:18 (message):
  Failed to query CPU page size:

  Change Dir:
  '/var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0_build/CMakeFiles/CMakeTmp'




  Run Build Command(s): /usr/bin/ninja -v cmTC_47f18

  [1/2] /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -std=c++20 -fPIE -o
  CMakeFiles/cmTC_47f18.dir/cpu-page-size.cpp.o -c
  /var/tmp/portage/media-gfx/darktable-4.8.0/work/darktable-4.8.0/src/external/rawspeed/cmake/Modules/cpu-page-size.cpp


  [2/2] : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -fuse-ld=lld -Wl,-O3
  -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0
  -Wl,--as-needed -flto CMakeFiles/cmTC_47f18.dir/cpu-page-size.cpp.o -o
  cmTC_47f18 && :

  FAILED: cmTC_47f18

  : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -march=native -pipe
  -frecord-gcc-switches -mavx -msse3 -Wall -Wformat -Wformat-security
  -Wshadow -Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
  -Wno-error=varargs -Wno-format-truncation
  -Wno-error=address-of-packed-member -w -flto -fuse-ld=lld -Wl,-O3
  -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0
  -Wl,--as-needed -flto CMakeFiles/cmTC_47f18.dir/cpu-page-size.cpp.o -o
  cmTC_47f18 && :

  ld.lld: error: undefined symbol: main

  >>> referenced by
  /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o:(_start)

  collect2: error: ld returned 1 exit status

  ninja: build stopped: subcommand failed.





Call Stack (most recent call first):
  src/external/rawspeed/src/CMakeLists.txt:3 (include)


CMake Error at src/external/rawspeed/cmake/Modules/cpu-large-page-size.cmake:2 (message):
  Should first run CPU page size detection
Call Stack (most recent call first):
  src/external/rawspeed/src/CMakeLists.txt:4 (include)


-- Configuring incomplete, errors occurred!
 * ERROR: media-gfx/darktable-4.8.0::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 2657:  Called cmake_src_configure
 *   environment, line 1303:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
Comment 2 Vitaly Zdanevich 2024-10-10 00:05:10 UTC
$ emerge --info darktable 

Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-13, glibc-2.39-r9, 6.6.47-gentoo+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.47-gentoo+-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.39
KiB Mem:    65053048 total,  48331388 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 09 Oct 2024 22:45:01 +0000
Head commit of repository gentoo: 392948fea15993f44e04422b3714e8ce49cd9976
Head commit of repository deepin: 7cf5eb8a683836b4e37d3b8b1ba50116de530d26

Timestamp of repository edgets: Tue, 08 Oct 2024 15:51:15 +0000
Head commit of repository edgets: b634da7846082ee8810a66f9bb58bf68aa8e4c89

Head commit of repository flash-games: 4a8718bd953b9e06ffc01d4882ec31483aae419f

Head commit of repository guru: 44c958432b32486c8255239c9cdcaae93e4e4316

Timestamp of repository pentoo: Tue, 08 Oct 2024 16:33:13 +0000
Head commit of repository pentoo: bcae81580ae468ee365e90f9e3ca06a718942a4e

sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p6) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.9.20_p1::gentoo, 3.11.10_p1::gentoo, 3.12.6_p4::gentoo
dev-lang/rust:             1.80.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r9::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync2.ru.gentoo.org/gentoo-portage/
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

deepin
    location: /var/db/repos/deepin
    sync-type: git
    sync-uri: https://github.com/zhtengw/deepin-overlay.git
    masters: gentoo
    volatile: False

edgets
    location: /var/db/repos/edgets
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/edgets.git
    masters: gentoo
    volatile: False

flash-games
    location: /home/vitaly/p/gentoo-overlays/flash-games
    sync-type: git
    sync-uri: git@gitlab.com:gentoo-overlays-by-vitaly-zdanevich/flash-games.git
    masters: gentoo
    volatile: True

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: git@git.gentoo.org:repo/proj/guru.git
    masters: gentoo
    volatile: False

overlay-of-vitaly-zdanevich
    location: /var/db/repos/overlay-of-vitaly-zdanevich
    masters: gentoo
    volatile: False

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2                -march=native -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2                -march=native -pipe -frecord-gcc-switches"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2                -march=native -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2                -march=native -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://gentoo-mirror.alexxy.name/"
LANG="C.UTF8"
LDFLAGS="-fuse-ld=lld -Wl,-O3 -Wl,--as-needed -Wl,--gc-sections -Wl,--defsym=__gentoo_check_ldflags__=0"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C debuginfo=0 -C target-cpu=native -C opt-level=3"
SHELL="/bin/bash"
USE="X acl amd64 avif bluray bzip2 chromecast cli crypt dbus dri dvd egl elogind eme-free exif ffmpeg flac fortran gdbm gdk-pixbuf graphite grub heif iconv jpeg libtirpc lto mp3 ncurses nls ogg opengl openh264 openmp opus pam pcre pgo png pulseaudio rdp readline seccomp split-usr ssl svg svt-av1 test-rust tiff tkip udf unicode v4l vaapi vpx vulkan webp x264 x265 xattr xml zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="x64" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

media-gfx/darktable-4.6.0::gentoo was built with the following:
USE="avif heif lto lua nls openmp webp -colord -cups -doc -gamepad -geolocation -gphoto2 -graphicsmagick -jpeg2k -jpegxl -keyring -kwallet -midi -opencl -openexr -test -tools" CPU_FLAGS_X86="avx sse3" L10N="-cs -de -es -fi -fr -hu -it -ja -nl -pl -pt-BR -ru -sl -sq -uk -zh-CN -zh-TW" LUA_SINGLE_TARGET="lua5-4"
CFLAGS="-O2 -march=native -pipe -mavx -msse3"
CXXFLAGS="-O2 -march=native -pipe -mavx -msse3"
FEATURES="network-sandbox pid-sandbox pkgdir-index-trusted usersync parallel-fetch buildpkg-live multilib-strict binpkg-docompress unknown-features-warn ebuild-locks protect-owned sandbox qa-unresolved-soname-deps merge-sync strict ipc-sandbox userfetch config-protect-if-modified assume-digests usersandbox distlocks xattr binpkg-dostrip unmerge-logs sfperms unmerge-orphans news userpriv fixlafiles binpkg-logs preserve-libs"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"