http://bugzilla.novell.com/show_bug.cgi?id=533563
User AxelKoellhofer@web.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=533563#c2
--- Comment #2 from Axel Köllhofer
factory builds with as-needed to remove unnecessary library dependencies.
Thanks a lot for your reply Markus, it gave me the decisive hint. I previously found something about this "as-needed" when searching the web on the problem (for Mandriva in this case) http://wiki.mandriva.com/en/Overlinking but I could not directly "link it" (pun intended) to a solution. However:
gcc -lm -ldl -lpthread -o toga2 attack.o board.o book.o eval.o fen.o hasho list.o main.o material.o move.o move_check.o move_do.o move_evasion.o move_gen.o move_legal.o option.o pawn.o piece.o posix.o protocol.o pst.o pv.o random.o recog.o search.o search_full.o see.o sort.o square.o trans.o util.o value.o vector.o probe.o
should be: gcc -o toga2 attack.o board.o book.o eval.o fen.o hash.o list.o main.o material.o move.o move_check.o move_do.o move_evasion.o move_gen.o move_legal.o option.o pawn.o piece.o posix.o protocol.o pst.o pv.o random.o recog.o search.o search_full.o see.o sort.o square.o trans.o util.o value.o vector.o probe.o -lm -ldl -lpthread
This is directly on the spot, so a little patch for the Makefile: --- Makefile.orig 2008-10-22 09:50:44.000000000 +0200 +++ Makefile 2009-08-23 03:07:53.000000000 +0200 @@ -47,7 +47,7 @@ # dependencies $(EXE): $(OBJS) - $(CXX) $(LDFLAGS) -o $@ $(OBJS) + $(CXX) -o $@ $(OBJS) $(LDFLAGS) .depend: $(CXX) -MM $(OBJS:.o=.cpp) > $@ and sc build openSUSE_Factory togaII-141.spec --clean Building togaII-141.spec for openSUSE_Factory/x86_64 Overriding config value for build-root='/tmp/build-root' with '/tmp/build-root' Getting buildinfo from server Updating cache of required packages ---snip---- ét voilà RPMLINT report: =============== 2 packages and 0 specfiles checked; 0 errors, 0 warnings. Fatboy finished "build togaII-141.spec" at Sun Aug 23 03:10:41 CEST 2009. /tmp/build-root/usr/src/packages/SRPMS/togaII-141-1.4.1-0.1.src.rpm /tmp/build-root/usr/src/packages/RPMS/x86_64/togaII-141-debuginfo-1.4.1-0.1x86_64.rpm /tmp/build-root/usr/src/packages/RPMS/x86_64/togaII-141-1.4.1-0.1.x86_64.rpm
(basically libraries need to be after the .o files at the end of the link line). LDFLAGS is the wrong place for them, they need to be in a seperate variable (LIBS in autoconf speak)
Thanks for that second hint, unfortunately the above example does not come with "autoconf" or "automake" features (just a plain Makefile) but this will be _very_ helpful for the other "candidates" (like xboard). -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.