It should be noted that LDFLAGS must be single quoted for this to work like so:
LDFLAGS='-L$(abspath $(TOOLS_DIR64))/lib -lrt' \
I am also working on getting Proton compiled with Wine 4.10 (thanks for your makefile_base.mak modifications for adding Bison as a submodule!) and ran into this exact issue with both Bison and Wine.
I need Planet Coaster in my life.
@GloriousEggroll Thanks again for this work. Like the other PR, I'll take a closer look when we do the next Wine merge.
@Smurf In that case, I have very good news for you in the near future...
This turned out to be an upstream bug. We have logic to add -lrt when needed, but it wasn't being used in kernel32. I've sent a patch to fix this: https://source.winehq.org/patches/data/166854
Edit: This was accepted upstream as d5d43ac9071cf53ca3f6eaa7179f55c6e28c5825, and will be in Wine 4.11.
@GloriousEggroll Since this is fixed upstream in 4.11+, shall we close this bug?
@aeikum most def. I've just made a 4.11 build. it seems solid.
Nothing extracted yet.
More future proofing:
If building with wine 4.10+, the glibc version used in the steam-runtime is too old, resulting in:
due to this commit:
https://github.com/wine-mirror/wine/commit/13e11d3fcbcf8790e031c4bc52f5f550b1377b3b#diff-6a2525504a46c037ba422bd9a152239f
this can be resolved by adding -lrt to the LDFLAG options for wine in makefile_base.mak:
This links in the librt.so "Real Time" shared library. More details can be found here:
https://stackoverflow.com/questions/2418157/c-error-undefined-reference-to-clock-gettime-and-clock-settime
Details regarding glibc:
Since glibc 2.17, the library linking -rt is no longer required.
The clock_* are now part of the main C library. You can see the change history of glibc 2.17 where this change was done explains the reason for this change:
+* The `clock_*' suite of functions (declared in <time.h>) is now available