BlindMindStudios / StarRuler2-Source

4X Space Strategy game Star Ruler 2's open source distribution.
http://starruler2.com
Other
1.45k stars 244 forks source link

Build error while linking #9

Open 42triangles opened 5 years ago

42triangles commented 5 years ago

The build fails on my Linux system while trying to create bin/lin64/StarRuler2.bin in the linking phase.

The log is below. Errors start appearing in line 826.

starruler2-source-log.txt

Edit: Because there is no preview on github, I'll quickly describe whats going on: A lot of symbols are not found during the linking phase ("[...]: undefined reference to [...]"). This seems to happen to library exports, especially networking and threading.

lucyllewy commented 5 years ago

The linking line (323) of the linux Makefile is ordered incorrectly. You need to move $(LDFLAGS) to the end. The fixed version is below for clarification of the correct order:

#Complete binary compile
$(BINDIR)/$(BIN): makelibs $(OBJ_FILES) $(LIB_FILES) $(COPY_LIBS)
    @mkdir -p $(BINDIR)
    @$(CC) $(CXXFLAGS) $(OBJ_FILES) $(LIB_FILES) -o $@ $(LDFLAGS)
Quix0r commented 2 years ago

Same here with Debian! Won't link.

Quix0r commented 2 years ago

@diddledani If you found the fix, can you please fork this project and provide a PR?