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

Unexplained linking errors if you forget to clone the submodules #235

Open
sfan5 opened this issue Dec 21, 2023 · 2 comments
Open

Unexplained linking errors if you forget to clone the submodules #235

sfan5 opened this issue Dec 21, 2023 · 2 comments

Comments

@sfan5
Copy link
Contributor

sfan5 commented Dec 21, 2023

%%% meson build
The Meson build system
Version: 1.3.0
Source dir: /tmp/libplacebo
Build dir: /tmp/libplacebo/build
Build type: native build
Project name: libplacebo
Project version: 7.342.0
C compiler for the host machine: cc (gcc 13.2.1 "cc (GCC) 13.2.1 20230801")
C linker for the host machine: cc ld.bfd 2.41.0
C++ compiler for the host machine: c++ (gcc 13.2.1 "c++ (GCC) 13.2.1 20230801")
C++ linker for the host machine: c++ ld.bfd 2.41.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wincompatible-pointer-types: YES 
Compiler for C supports link arguments -Wl,--exclude-libs=ALL: YES 
Library m found: YES
Program python3 found: YES (/usr/bin/python)
Run-time dependency threads found: YES
Header "pthread.h" has symbol "pthread_condattr_setclock" with dependency threads: YES 
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.0
Run-time dependency libunwind found: YES 1.7.2
Library execinfo found: NO
Checking for function "backtrace_symbols" with dependency -lexecinfo: YES 
Check usable header "dbghelp.h" : NO 
Library dl found: YES
Fetching value of define "__MINGW32__" : (undefined) 
Run-time dependency shaderc found: YES 2023.7.1
Message: Skipping `glslang` because `shaderc` is available
Check usable header "d3d11.h" : NO 
Check usable header "d3d11_4.h" : NO 
Check usable header "dxgi1_6.h" : NO 
Found CMake: /usr/bin/cmake (3.28.1)
Run-time dependency spirv-cross-c-shared found: NO (tried pkgconfig and cmake)
Library version found: NO
Library dl found: YES
Run-time dependency vulkan found: YES 1.3.274
Header "vulkan/vulkan_core.h" has symbol "VK_VERSION_1_3" with dependency vulkan: YES 
Run-time dependency lcms2 found: YES 2.16
Run-time dependency dovi found: YES 3.2.0
Run-time dependency libxxhash found: YES 0.8.2
Configuring config.h using configuration
Configuring config_internal.h using configuration
WARNING: Library target 'placebo' has 'name_prefix' set. Compilers may not find it from its '-lplacebo' linker flag in the 'libplacebo.pc' pkg-config file.
WARNING: Library target 'placebo' has 'name_prefix' set. Compilers may not find it from its '-lplacebo' linker flag in the 'libplacebo-uninstalled.pc' pkg-config file.
Run-time dependency glfw3 found: NO (tried pkgconfig and cmake)
Run-time dependency sdl2 found: YES 2.28.5
Run-time dependency sdl2_image found: YES 2.8.1
Run-time dependency libavcodec found: YES 60.31.102
Run-time dependency libavformat found: YES 60.16.100
Run-time dependency libavutil found: YES 58.29.100
Has header "nuklear.h" : NO 
demos/meson.build:31: WARNING: Nuklear was not found in `demos/3rdparty`. Please run `git submodule update --init` followed by `meson --wipe`.
Check usable header "EGL/egl.h" : YES 
Configuring config_demos.h using configuration
Build targets in project: 24

libplacebo 7.342.0

  Optional features
    d3d11       : NO
    dovi        : YES
    gl-proc-addr: YES
    glslang     : NO
    lcms        : YES
    libdovi     : YES
    opengl      : YES
    shaderc     : YES
    vk-proc-addr: YES
    vulkan      : YES
    xxhash      : YES

Found ninja-1.11.1 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
%%% ninja -C ./build
ninja: Entering directory `./build'
[23/95] Generating src/vulkan/utils_gen.c with a custom command (wrapped by meson to set env)
Found vk.xml: /usr/share/vulkan/registry/vk.xml
[32/95] Generating src/opengl/include/glad/gl.h with a custom command (wrapped by meson to set env)
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded language c: <class 'glad.generator.c.__init__.CGenerator'>
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded language rust: <class 'glad.generator.rust.__init__.RustGenerator'>
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded specification egl: <class 'glad.specification.EGL'>
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded specification gl: <class 'glad.specification.GL'>
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded specification glx: <class 'glad.specification.GLX'>
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded specification vk: <class 'glad.specification.VK'>
[21.12.2023 16:54:35][DEBUG	][glad.plugin	]: loaded specification wgl: <class 'glad.specification.WGL'>
[21.12.2023 16:54:35][INFO	][glad   	]: getting 'gl' specification from remote location
[21.12.2023 16:54:35][DEBUG	][glad.files	]: intercepted attempt to retrieve resource: 'https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/main/xml/gl.xml'
[21.12.2023 16:54:35][INFO	][glad.files	]: opening packaged resource: 'gl.xml'
[21.12.2023 16:54:35][INFO	][glad   	]: getting 'egl' specification from remote location
[21.12.2023 16:54:35][DEBUG	][glad.files	]: intercepted attempt to retrieve resource: 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/egl.xml'
[21.12.2023 16:54:35][INFO	][glad.files	]: opening packaged resource: 'egl.xml'
[21.12.2023 16:54:35][INFO	][glad   	]: generating gl:core/gl=None
[21.12.2023 16:54:35][INFO	][glad   	]: no explicit version given for api gl, using Version(major=4, minor=6)
[21.12.2023 16:54:35][INFO	][glad   	]: generating gles2:None/gl=None
[21.12.2023 16:54:35][INFO	][glad   	]: no explicit version given for api gles2, using Version(major=3, minor=2)
[21.12.2023 16:54:35][INFO	][glad   	]: merging [FeatureSet(name=gl, info=[gl:core=4.6], extensions=21), FeatureSet(name=gles2, info=[gles2=3.2], extensions=10)]
[21.12.2023 16:54:35][INFO	][glad   	]: merged into FeatureSet(name=gl, info=[gl:core=4.6, gles2=3.2], extensions=29)
[21.12.2023 16:54:35][INFO	][glad   	]: generating feature set FeatureSet(name=gl, info=[gl:core=4.6, gles2=3.2], extensions=29)
[21.12.2023 16:54:35][DEBUG	][glad.files	]: intercepted attempt to retrieve resource: 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/KHR/khrplatform.h'
[21.12.2023 16:54:35][INFO	][glad.files	]: opening packaged resource: 'khrplatform.h'
[21.12.2023 16:54:35][INFO	][glad   	]: generating egl:None/egl=None
[21.12.2023 16:54:35][INFO	][glad   	]: no explicit version given for api egl, using Version(major=1, minor=5)
[21.12.2023 16:54:35][INFO	][glad   	]: merging [FeatureSet(name=egl, info=[egl=1.5], extensions=7)]
[21.12.2023 16:54:35][INFO	][glad   	]: merged into FeatureSet(name=egl, info=[egl=1.5], extensions=7)
[21.12.2023 16:54:35][INFO	][glad   	]: generating feature set FeatureSet(name=egl, info=[egl=1.5], extensions=7)
[21.12.2023 16:54:35][DEBUG	][glad.files	]: intercepted attempt to retrieve resource: 'https://raw.githubusercontent.com/KhronosGroup/EGL-Registry/main/api/EGL/eglplatform.h'
[21.12.2023 16:54:35][INFO	][glad.files	]: opening packaged resource: 'eglplatform.h'
[58/95] Compiling C object src/libplacebo.so.342.p/glsl_spirv_shaderc.c.o
In Datei, eingebunden von ../src/hash.h:46,
                 von ../src/glsl/spirv_shaderc.c:21:
In Funktion »XXH_read64«,
    eingefügt von »XXH_readLE64« bei /usr/include/xxhash.h:3064:36,
    eingefügt von »XXH3_mix16B« bei /usr/include/xxhash.h:4365:34,
    eingefügt von »XXH3_len_129to240_64b.constprop« bei /usr/include/xxhash.h:4433:19:
/usr/include/xxhash.h:2995:12: Warnung: Arrayindex [14, 28] ist außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
 2995 |     return *((const xxh_unalign64*)ptr);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Funktion »XXH_read64«,
    eingefügt von »XXH_readLE64« bei /usr/include/xxhash.h:3064:36,
    eingefügt von »XXH3_mix16B« bei /usr/include/xxhash.h:4366:34,
    eingefügt von »XXH3_len_129to240_64b.constprop« bei /usr/include/xxhash.h:4433:19:
/usr/include/xxhash.h:2995:12: Warnung: Arrayindex [15, 29] ist außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
 2995 |     return *((const xxh_unalign64*)ptr);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Funktion »XXH_read64«,
    eingefügt von »XXH_readLE64« bei /usr/include/xxhash.h:3064:36,
    eingefügt von »XXH3_mix16B« bei /usr/include/xxhash.h:4365:34,
    eingefügt von »XXH3_len_129to240_64b.constprop« bei /usr/include/xxhash.h:4466:24:
/usr/include/xxhash.h:2995:12: Warnung: Arrayindex [16, 28] ist außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
 2995 |     return *((const xxh_unalign64*)ptr);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Funktion »XXH_read64«,
    eingefügt von »XXH_readLE64« bei /usr/include/xxhash.h:3064:36,
    eingefügt von »XXH3_mix16B« bei /usr/include/xxhash.h:4366:34,
    eingefügt von »XXH3_len_129to240_64b.constprop« bei /usr/include/xxhash.h:4466:24:
/usr/include/xxhash.h:2995:12: Warnung: Arrayindex [17, 29] ist außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
 2995 |     return *((const xxh_unalign64*)ptr);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Funktion »XXH_read64«,
    eingefügt von »XXH_readLE64« bei /usr/include/xxhash.h:3064:36,
    eingefügt von »XXH3_mix16B« bei /usr/include/xxhash.h:4366:34,
    eingefügt von »XXH3_len_129to240_64b.constprop« bei /usr/include/xxhash.h:4430:20:
/usr/include/xxhash.h:2995:12: Warnung: Arrayindex 1 ist außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
 2995 |     return *((const xxh_unalign64*)ptr);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Datei, eingebunden von /usr/include/xxhash.h:3439:
In Funktion »_mm_loadu_si128«,
    eingefügt von »XXH3_accumulate_512_sse2« bei /usr/include/xxhash.h:4803:41,
    eingefügt von »XXH3_hashLong_internal_loop« bei /usr/include/xxhash.h:5557:13,
    eingefügt von »XXH3_hashLong_64b_internal« bei /usr/include/xxhash.h:5607:5,
    eingefügt von »XXH3_hashLong_64b_default.constprop« bei /usr/include/xxhash.h:5643:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:706:10: Warnung: Arrayindex »__m128i_u[0]« ist teilweise außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
  706 |   return *__P;
      |          ^~~~
In Funktion »_mm_loadu_si128«,
    eingefügt von »XXH3_accumulate_512_sse2« bei /usr/include/xxhash.h:4803:41,
    eingefügt von »XXH3_accumulate_sse2« bei /usr/include/xxhash.h:4819:34,
    eingefügt von »XXH3_hashLong_internal_loop« bei /usr/include/xxhash.h:5552:9,
    eingefügt von »XXH3_hashLong_64b_internal« bei /usr/include/xxhash.h:5607:5,
    eingefügt von »XXH3_hashLong_64b_default.constprop« bei /usr/include/xxhash.h:5643:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:706:10: Warnung: Arrayindex »__m128i_u[0]« ist teilweise außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
  706 |   return *__P;
      |          ^~~~
In Funktion »_mm_loadu_si128«,
    eingefügt von »XXH3_accumulate_512_sse2« bei /usr/include/xxhash.h:4803:41,
    eingefügt von »XXH3_accumulate_sse2« bei /usr/include/xxhash.h:4819:34,
    eingefügt von »XXH3_hashLong_internal_loop« bei /usr/include/xxhash.h:5544:9,
    eingefügt von »XXH3_hashLong_64b_internal« bei /usr/include/xxhash.h:5607:5,
    eingefügt von »XXH3_hashLong_64b_default.constprop« bei /usr/include/xxhash.h:5643:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:706:10: Warnung: Arrayindex »__m128i_u[0]« ist teilweise außerhalb der Arraygrenzen von »char[8]« [-Warray-bounds=]
  706 |   return *__P;
      |          ^~~~
[95/95] Linking target demos/plplay
FAILED: demos/plplay 
c++  -o demos/plplay demos/plplay.p/plplay.c.o demos/plplay.p/settings.c.o demos/plplay.p/window.c.o demos/plplay.p/utils.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--exclude-libs=ALL '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/tmp/libplacebo/build/src -Wl,--start-group demos/libsdl-vk.a src/libplacebo.so.342 demos/libsdl-gl.a -lm -pthread /usr/lib/libunwind.so -ldl /usr/lib/libshaderc_shared.so /usr/lib/libvulkan.so /usr/lib/liblcms2.so /usr/lib/libdovi.so /usr/lib/libavcodec.so /usr/lib/libavformat.so /usr/lib/libavutil.so /usr/lib/libSDL2.so -Wl,--end-group
/usr/bin/ld: demos/plplay.p/plplay.c.o: in function `main':
/tmp/libplacebo/build/../demos/plplay.c:669:(.text.startup+0x7e): undefined reference to `parse_args'
collect2: Fehler: ld gab 1 als Ende-Status zurück
ninja: build stopped: subcommand failed.
@sfan5
Copy link
Contributor Author

sfan5 commented Dec 21, 2023

Apparently I forgot to clone recursively but this should still be detected earlier IMO.

@sfan5 sfan5 changed the title demos/plplay doesn't link Unexplained linking errors if you forget to clone the submodules Dec 21, 2023
@eli-schwartz
Copy link

If you wrap each submodule as a meson subproject then meson will enforce their presence and download it on demand... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants