Llywar Report post Posted October 17, 2009 Gentoo is trying to move to building packages with --as-needed by default (simplifies library upgrades when sonames change, and also improves launch times). However, eternal lands does not build with --as-needed. With this flag the linker is sensitive to the command-line order of libraries - they must follow the objects they are needed for, otherwise the linker just discards them and you get unresolved symbols. A quick fix is to edit the Makefile to replace: @$(LINK) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS) with: @$(LINK) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS) More ideally, the libraries should be put in a separate variable so that LDFLAGS can still be used for anything that must go earlier on the command line. Gentoo is already patching this now, but it would be nice to have this fixed upstream. I understand other distros are starting to use --as-needed as well. Share this post Link to post Share on other sites
bluap Report post Posted October 19, 2009 A quick fix is to edit the Makefile to replace: @$(LINK) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS) with: @$(LINK) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS) I'm committed that change. As for separating out LDFLAGS, there are only -L and -l parameters currently. Some are generated, e.g. "sdl-config --libs" which output both parts so it would be tricky to separate. Share this post Link to post Share on other sites