Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 21 Mar 2013 01:32:54 +0100
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Building unstable jumbo failed

$ make linux-x86-native > /dev/null
crawSHA1_ng_fmt.c:559:3: warning: #warning not using optimized sse4.1
compare because -msse4 was not specified [-Wcpp]
make[1]: g++: Command not found
make[1]: *** [gpg2john] Error 127
make: *** [linux-x86-native] Error 2

Before jumbo-8 gets released, we might need to document the new
dependency, unless someone rewrites the C++ implementations in C ;)

On Fedora, I had to install the gcc-c++ (C++ for GCC)
The other package, libstdc++-devel has already been installed as a
dependency of clang.

What about using ($CC) instead of gcc and defining CPLUSPLUS in the
Makefile, instead of hard coding g++ when building *2john tools?
Something like the attached patch?
(I don't know how CPLUSPLUS needs to be defined for CC=cc, CC=ccc,
CC=icc. So I just fixed the gcc/clang cases.)

I also wonder whether we should reuse ($CFLAGS) instead of using -Wall
or --Wall -Wdeclaration-after-statement

Frank

diff --git a/src/Makefile b/src/Makefile
index fa77278..55a880a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,6 +9,7 @@ CC = gcc
 AS = $(CC)
 LD = $(CC)
 CPP = $(CC)
+CPLUSPLUS = g++
 CP = cp
 CP_PRESERVE = cp -p
 LN = ln -f -s
@@ -444,7 +445,7 @@ linux-x86-64-clang:
 		JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o sse-intrinsics.o" \
 		CFLAGS="-Wall -c -O2 -I/usr/include -msse2 -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS) $(HAVE_GMP) $(HAVE_KRB5) $(JOHN_CFLAGS)" \
 		LDFLAGS="$(LDFLAGS) -lcrypt -ldl" \
-		CPP="clang" CC="clang" AS="clang" LD="clang"
+		CPP="clang" CC="clang" AS="clang" LD="clang" CPLUSPLUS="clang++"
 
 linux-x86-64-clang-debug:
 	$(LN) x86-64.h arch.h
@@ -453,7 +454,7 @@ linux-x86-64-clang-debug:
 		JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o sse-intrinsics.o" \
 		CFLAGS="-Wall -Wdeclaration-after-statement -c -g -O1 -faddress-sanitizer -I/usr/include -msse2 -DDEBUG -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS) $(HAVE_GMP) $(HAVE_KRB5) $(JOHN_CFLAGS)" \
 		LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto -lm -lz -lcrypt -ldl -faddress-sanitizer $(NSS_LDFLAGS) $(GMP_LDFLAGS) $(KRB5_LDFLAGS)" \
-		CPP="clang" CC="clang" AS="clang" LD="clang"
+		CPP="clang" CC="clang" AS="clang" LD="clang" CPLUSPLUS="clang++"
 
 linux-x86-64-icc:
 	$(LN) x86-64.h arch.h
@@ -619,7 +620,7 @@ linux-x86-clang:
 		JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o sha1-mmx.o md4-mmx.o md5-mmx.o sse-intrinsics.o" \
 		CFLAGS="-Wall -c -O2 -I/usr/include -msse2 -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS) $(HAVE_GMP) $(HAVE_KRB5) $(OMPFLAGS) $(JOHN_CFLAGS)" \
 		LDFLAGS="$(LDFLAGS) -lcrypt -ldl" \
-		CPP="clang" CC="clang" AS="clang" LD="clang"
+		CPP="clang" CC="clang" AS="clang" LD="clang" CPLUSPLUS="clang++"
 
 linux-x86-clang-debug:
 	$(LN) x86-sse.h arch.h
@@ -628,7 +629,7 @@ linux-x86-clang-debug:
 		JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o sha1-mmx.o md4-mmx.o md5-mmx.o sse-intrinsics.o" \
 		CFLAGS="-Wall -Wdeclaration-after-statement -c -g -O1 -faddress-sanitizer -I/usr/include -msse2 -DDEBUG -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS) $(HAVE_GMP) $(HAVE_KRB5) $(OMPFLAGS) $(JOHN_CFLAGS)" \
 		LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto -lm -lz -lcrypt -ldl -faddress-sanitizer $(NSS_LDFLAGS) $(GMP_LDFLAGS) $(KRB5_LDFLAGS)" \
-		CPP="clang" CC="clang" AS="clang" LD="clang"
+		CPP="clang" CC="clang" AS="clang" LD="clang" CPLUSPLUS="clang++"
 
 linux-alpha:
 	$(LN) alpha.h arch.h
@@ -1140,7 +1141,7 @@ macosx-x86-64-clang-debug:
 		ASFLAGS="$(ASFLAGS) -m64 -DUNDERSCORES -DBSD -DALIGN_LOG" \
 		CFLAGS="-Wall -Wdeclaration-after-statement -c -g -O1 -I/usr/include -I/usr/local/include -Wno-deprecated-declarations -DDEBUG -DHAVE_CRYPT -DBSD $(HAVE_NSS) $(HAVE_GMP) $(HAVE_KRB5) $(JOHN_CFLAGS)" \
 		LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto -lm -lz $(NSS_LDFLAGS) $(GMP_LDFLAGS) $(KRB5_LDFLAGS)" \
-		CPP="clang" CC="clang" AS="clang" LD="clang"
+		CPP="clang" CC="clang" AS="clang" LD="clang" CPLUSPLUS="clang++"
 
 macosx-x86-sse2:
 	$(LN) x86-sse.h arch.h
@@ -1830,19 +1831,19 @@ SIPdump: SIPdump.o
 	$(LD) SIPdump.o $(LDFLAGS) -lpcap -o ../run/SIPdump
 
 vncpcap2john:
-	g++ -Wall vncpcap2john.cpp -lpcap -o ../run/vncpcap2john
+	$(CPLUSPLUS) -Wall vncpcap2john.cpp -lpcap -o ../run/vncpcap2john
 
 gpg2john:
-	g++ -Wall gpg2john.cpp -lcrypto -o ../run/gpg2john
+	$(CPLUSPLUS) -Wall gpg2john.cpp -lcrypto -o ../run/gpg2john
 
 truecrypt_volume2john:
-	gcc -Wall truecrypt_volume2john.c -lcrypto -o ../run/truecrypt_volume2john
+	$(CC) -Wall truecrypt_volume2john.c -lcrypto -o ../run/truecrypt_volume2john
 
 uaf2john: uaf2john.o uaf_encode_plug.o
 	$(CC) -Wall uaf2john.c uaf_encode_plug.o -o ../run/uaf2john
 
 wpapcap2john:
-	gcc -Wall -Wdeclaration-after-statement wpapcap2john.c -o ../run/wpapcap2john
+	$(CC) -Wall -Wdeclaration-after-statement wpapcap2john.c -o ../run/wpapcap2john
 
 office2john:
 	$(CC) `xml2-config --cflags` `pkg-config --cflags libgsf-1` office2john.c common.o base64.o `pkg-config --libs libgsf-1` `xml2-config --libs` -o ../run/office2john

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ