Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Oct 1998 01:29:38 +0900 (JST)
From:      issei@jp.FreeBSD.ORG
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/8336: Cannot compile security/SSLeay port on ELF system
Message-ID:  <199810151629.BAA09022@ordin.issei.org>

next in thread | raw e-mail | index | archive | help

>Number:         8336
>Category:       ports
>Synopsis:       Cannot compile security/SSLeay port on ELF system
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 15 09:30:01 PDT 1998
>Last-Modified:
>Originator:     Issei Suzuki
>Organization:
Personal
>Release:        FreeBSD 3.0-BETA i386
>Environment:

	

>Description:

	Cannot compile security/SSLeay port on ELF system such as FreeBSD 3.0
BETA, because ports-current choose a.out format assember code in SSLeay.

>How-To-Repeat:

	Try to make security/SSLeay port on ELFed FreeBSD system, and you will
get "undefined reference error" message when linking libcrypt.a and other
libraries.

e.g.
  ../libcrypto.a(c_ofb64.o): In function `CAST_ofb64_encrypt':
  c_ofb64.o(.text+0xcf): undefined reference to `CAST_encrypt'

>Fix:
	
	Apply the following patch to the ports-current. The important patch
is patch-ac and patch-ae.  I also split original patch-aa into patch-aa,
patch-ac and patch-ad for maintainance reason and remake diff files to
suppless fuzz warning message by patch command.


diff -urN SSLeay.old/patches/patch-aa SSLeay/patches/patch-aa
--- SSLeay.old/patches/patch-aa	Fri Oct 16 00:36:58 1998
+++ SSLeay/patches/patch-aa	Fri Oct 16 00:43:20 1998
@@ -1,6 +1,5 @@
-diff -udr ../SSLeay-0.8.1.ORIG/apps/ca.c ./apps/ca.c
---- ../SSLeay-0.8.1.ORIG/apps/ca.c	Fri Jul 18 20:15:56 1997
-+++ ./apps/ca.c	Tue Feb 17 20:27:52 1998
+--- apps/ca.c.orig	Thu Apr  9 20:59:27 1998
++++ apps/ca.c	Fri Oct 16 00:42:07 1998
 @@ -82,7 +82,7 @@
  #define PROG ca_main
  
@@ -10,38 +9,3 @@
  
  #define ENV_DEFAULT_CA		"default_ca"
  
-diff -udr ../SSLeay-0.8.1.ORIG/util/FreeBSD.sh ./util/FreeBSD.sh
---- ../SSLeay-0.8.1.ORIG/util/FreeBSD.sh	Fri Jul 18 20:15:59 1997
-+++ ./util/FreeBSD.sh	Tue Feb 17 20:38:32 1998
-@@ -2,5 +2,4 @@
- 
- perl util/perlpath.pl /usr/bin
- perl util/ssldir.pl /usr/local  
--perl util/mk1mf.pl FreeBSD >Makefile.FreeBSD
- perl Configure FreeBSD
-diff -udr ../SSLeay-0.8.1.ORIG/util/ssldir.pl ./util/ssldir.pl
---- ../SSLeay-0.8.1.ORIG/util/ssldir.pl	Fri Jul 18 20:15:59 1997
-+++ ./util/ssldir.pl	Tue Feb 17 20:37:46 1998
-@@ -4,7 +4,6 @@
- @files=('crypto/cryptlib.h',
- 	'Makefile.ssl',
- 	'tools/c_rehash',
--	'util/mk1mf.pl',
- 	);
- 
- %cryptlib=(
-@@ -22,14 +21,9 @@
- 	'^DIR=',	'DIR=%s',
- 	);
- 
--%mk1mf=(
--	'^$INSTALLTOP=','$INSTALLTOP="%s";',
--	);
--
- &dofile("crypto/cryptlib.h",$ARGV[0],%cryptlib);
- &dofile("Makefile.ssl",$ARGV[0],%Makefile_ssl);
- &dofile("tools/c_rehash",$ARGV[0],%c_rehash);
--&dofile("util/mk1mf.pl",$ARGV[0],%mk1mf);
- 
- sub dofile
- 	{
diff -urN SSLeay.old/patches/patch-ab SSLeay/patches/patch-ab
--- SSLeay.old/patches/patch-ab	Fri Oct 16 00:36:58 1998
+++ SSLeay/patches/patch-ab	Fri Oct 16 00:43:40 1998
@@ -1,5 +1,5 @@
---- Makefile.ssl.orig	Fri Jun 26 10:25:25 1998
-+++ Makefile.ssl	Sat Aug 22 13:14:34 1998
+--- Makefile.ssl.orig	Fri Jun 26 17:25:25 1998
++++ Makefile.ssl	Fri Oct 16 00:42:18 1998
 @@ -175,7 +175,7 @@
  	VERSION PROBLEMS MINFO makefile.one e_os.h \
  	MICROSOFT makevms.com config PATENTS
diff -urN SSLeay.old/patches/patch-ac SSLeay/patches/patch-ac
--- SSLeay.old/patches/patch-ac	Thu Jan  1 09:00:00 1970
+++ SSLeay/patches/patch-ac	Fri Oct 16 00:48:08 1998
@@ -0,0 +1,9 @@
+--- util/FreeBSD.sh.orig	Thu Apr  9 13:07:28 1998
++++ util/FreeBSD.sh	Fri Oct 16 00:47:58 1998
+@@ -2,5 +2,4 @@
+ 
+ perl util/perlpath.pl /usr/bin
+ perl util/ssldir.pl /usr/local  
+-perl util/mk1mf.pl FreeBSD >Makefile.FreeBSD
+-perl Configure FreeBSD
++perl Configure FreeBSD-${PORTOBJFORMAT}
diff -urN SSLeay.old/patches/patch-ad SSLeay/patches/patch-ad
--- SSLeay.old/patches/patch-ad	Thu Jan  1 09:00:00 1970
+++ SSLeay/patches/patch-ad	Fri Oct 16 00:44:24 1998
@@ -0,0 +1,25 @@
+--- util/ssldir.pl.orig	Thu Apr  9 13:07:28 1998
++++ util/ssldir.pl	Fri Oct 16 00:44:04 1998
+@@ -4,7 +4,6 @@
+ @files=('crypto/cryptlib.h',
+ 	'Makefile.ssl',
+ 	'tools/c_rehash',
+-	'util/mk1mf.pl',
+ 	);
+ 
+ %cryptlib=(
+@@ -22,14 +21,9 @@
+ 	'^DIR=',	'DIR=%s',
+ 	);
+ 
+-%mk1mf=(
+-	'^$INSTALLTOP=','$INSTALLTOP="%s";',
+-	);
+-
+ &dofile("crypto/cryptlib.h",$ARGV[0],%cryptlib);
+ &dofile("Makefile.ssl",$ARGV[0],%Makefile_ssl);
+ &dofile("tools/c_rehash",$ARGV[0],%c_rehash);
+-&dofile("util/mk1mf.pl",$ARGV[0],%mk1mf);
+ 
+ sub dofile
+ 	{
diff -urN SSLeay.old/patches/patch-ae SSLeay/patches/patch-ae
--- SSLeay.old/patches/patch-ae	Thu Jan  1 09:00:00 1970
+++ SSLeay/patches/patch-ae	Fri Oct 16 00:40:33 1998
@@ -0,0 +1,12 @@
+--- Configure.old	Tue Oct 13 23:11:42 1998
++++ Configure	Tue Oct 13 23:13:56 1998
+@@ -132,7 +132,8 @@
+ "NetBSD-sparc",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+ "NetBSD-m86",	"gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
+ "NetBSD-x86",	"gcc:-DTERMIOS -DBN_ASM -D_ANSI_SOURCE -O3 -fomit-frame-pointer -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:",
+-"FreeBSD",   "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
++"FreeBSD-aout",   "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
++"FreeBSD-elf",   "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
+ #"bsdi-gcc",     "gcc:-O3 -ffast-math -DBN_ASM -DL_ENDIAN -DPERL5 -m486::RSA_LLONG $x86_gc_des $x86_gcc_opts:$x86_bsdi_asm",
+ "nextstep",	"cc:-O3 -Wall -DBN_ASM::BN_LLONG $x86_gcc_des $x86_gcc_opts:::",
+ # NCR MP-RAS UNIX ver 02.03.01
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810151629.BAA09022>