I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details). Check the attached build log. Thanks, Diego
Created attachment 171818 [details] Build log
Hmmm, the build log shows the command being run by upstream's Makefile as: /usr/bin/gcc -o samdump2 hive.o list.o bkhive.o samdump2.o main.o -Wall -lssl which seems to have the library listed last (as I believe it should be for --as-needed). The symbols seem to be from openssl, so I'm not sure why this fails. Are the symbols actually from -lcrypto, and is there an easy way to tell what symbols come from which libraries? The relevant Makefile line is: $(CC) -o $@ $^ $(CFLAGS) $(LIBS) where CC, CFLAGS and LIBS are all defined in the Makefile as follows: CC = $(shell which gcc) CFLAGS = -Wall LIBS = -lssl LDFLAGS isn't present, which is probably why this wasn't spotted before. Other than that, there isn't much difference between this and your boilerplate Makefile mentioned in http://blog.flameeyes.eu/2008/10/15/fixing-cflags-ldflags-handling-with-a-single-boilerplate-makefile. I know CC should be using $(tc-getCC), but I doubt that would explain the symbol errors, and I don't see how -Wall would cause them. So, is this a broken Makefile, or something going wrong with --as-needed, or something going wrong with the spec file? Any help would be greatly appreciated... 5:)
Read here, I wrote about this issue (which is all too common) http://blog.flameeyes.eu/2008/11/15/building-the-whole-portage . The problem is that libcrypto is the one needed, not libssl, and thus --as-needed drops -lssl out.
Ok, 3.0.1-r2 was just committed to the tree and should fix this issue. I've removed the samdump2 program, since it's used as a library in the latest version and therefore doesn't need additional packaging/installing. Please feel free to re-open this bug if you come across any other as-needed issues with ophcrack...