| Summary: | Generated SDL2 Makefile has bug with missing dependency file for Wayland protocol file, breaks build | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ellie <etc0de> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
Ellie
2020-05-16 13:24:56 UTC
For what it's worth, now the build is failing for me on Ubuntu too, with the same error. So I can't actually manage to get the Wayland support to build anywhere. I wonder if this some obscure race condition or unclean-rebuild bug that can manifest on any platform? But I don't even know what "gen" is or what it does, so I find it hard to tell what really is going on Ok, so I played around a bit with the generated Makefile resulting from bash ./autogen.sh && ./configure ./configure --disable-video-opengles1 --disable-video-vulkan --enable-sse3 --disable-oss --disable-jack --enable-static --disable-shared --enable-ssemath
... and the following direct change to the Makefile fixes it:
Find this block:
$(objects)/org-kde-kwin-server-decoration-manager-protocol.lo: $(gen)/org-kde-kwin-server-decoration-manager-protocol.c $(gen)/org-kde-kwin-server-decoration-manager-client-protocol.h
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
Alter it to:
$(objects)/org-kde-kwin-server-decoration-manager-protocol.lo: $(gen)/org-kde-kwin-server-decoration-manager-protocol.c $(gen)/org-kde-kwin-server-decoration-manager-client-protocol.h
mkdir -p build
gcc -M $(gen)/org-kde-kwin-server-decoration-manager-protocol.c > build/org-kde-kwin-server-decoration-manager-protocol.d.$$;
sed 's,\(foo\)\.o[ :]*,\1.o foo.d : ,g' < build/org-kde-kwin-server-decoration-manager-protocol.d.$$ > $(gen)/org-kde-kwin-server-decoration-manager-protocol.d;
rm -f build/org-kde-kwin-server-decoration-manager-protocol.d.$$
$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
This suggests to me that either the Makefile.in or configure.ac script of SDL2 is broken and should be changed such that this step is somehow generated. It would be pretty good if this could be fixed, because this seems to break the build with Wayland on both Fedora 32 and Ubuntu 18.04 under some conditions (or always? I'm not sure yet).
Has there been any progress on this? It's kind of ugly to use my suggested workaround, since 1. it requires altering the Makefile which has a high risk of clashes and chaos if any minor thing about it changes, 2. it creates a new "build" folder that isn't actually supposed to be there, but I'm not sure what the exact 'proper' equivalent would be that SDL2's Makefile runs since it's all so indirect. So working around this is basically pretty smelly and almost guaranteed to be a future source of maintenance trouble, at least if done as shoddily as I managed to. A proper fix would be very helpful (In reply to Ellie from comment #3) > A proper fix would be very helpful I have to look at this more closely, but it's probably the extremely scary looking WAYLAND_PROTOCOL_DEPENDS code in configure.ac where this fix needs to be made. --ryan. WAYLAND_PROTOCOLS_DEPENDS, plural, not WAYLAND_PROTOCOL_DEPENDS, singular, sorry. |