flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.13k stars 262 forks source link

Warnings when compiling with mold as linker #1280

Closed nokia8801 closed 1 month ago

nokia8801 commented 3 months ago

Describe the bug Throws out warnings when compiling with mold as the linker. Sometimes it fails linking completely as well. Don't know if they're important or not.

List relevant hardware/software information

To Reproduce Steps to reproduce the behavior:

  1. Set mold as your linker in makepkg.conf with LDFLAGS="... -fuse-ld=mold"
  2. Clone the AUR package and build with makepkg -src

Expected behavior No errors should be present, as is the case when mold is not used as the linker.

Additional context

[111/129] Linking target src/libMangoHud_dlsym.so
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetInstanceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect_to_fd`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetInstanceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect_to_fd`: symbol not found
[123/129] Linking target src/libMangoApp.so
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect_to_fd`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `wl_display_connect_to_fd`: symbol not found
[126/129] Linking target src/libMangoHud.so
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
[128/129] Linking target src/libMangoHud_opengl.so
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetInstanceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetInstanceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
[129/129] Linking target src/mangoapp
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetInstanceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `overlay_GetDeviceProcAddr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_glx_ptr`: symbol not found
mold: warning: /tmp/makepkg/mangohud-git/src/MangoHud/src/mangohud.version: cannot assign version `global` to symbol `mangohud_find_egl_ptr`: symbol not found
flightlessmango commented 3 months ago

No errors should be present

You haven't presented any errors so I'm not sure what I can do

nokia8801 commented 3 months ago

I meant warnings, sorry. When building with regular /usr/bin/ld those warnings aren't present. I am not sure if they affect the built package or not. It did fail a few times to link with mold as well but I can't seem to make it fail anymore, just these warnings.

flightlessmango commented 1 month ago

I don't think these warnings have any consequences, probably not worth spending time on