Bug 74886 - security/php4-openssl not compiling with OpenSSL _port_.
Summary: security/php4-openssl not compiling with OpenSSL _port_.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 10:20 UTC by William Fletcher
Modified: 2005-01-10 17:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Fletcher 2004-12-09 10:20:22 UTC
	the security/php4-openssl port doesn't appear to be able to compile against the OpenSSL port, I'm attempting to install it in a jail without OpenSSL base, the OpenSSL port is already installed and some software is working with it, like postfix.

checking for C compiler default output... configure: error: C compiler cannot create executables

/usr/ports/security/php4-openssl/work/php-4.3.9/ext/openssl/config.log gives...
configure:1640: cc -O -pipe -mcpu=pentiumpro   -lcrypto -lssl -rpath=/usr/local/
lib conftest.c  >&5
/usr/bin/ld: cannot find -lcrypto

Please contact me if there is anything else you'd like to know.

Fix: 

I apologise for failing to understand how to fix it.
How-To-Repeat: 	You will need to build a very cut down jail, I chopped out mostly everything in /etc/make.conf and then nullfs my ports into the jail, all my other ports compile fine, just php4-openssl doesn't appear to be able to compile for the OpenSSL port.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-12-11 20:53:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer.
Comment 2 Simon Barner 2005-01-05 03:59:16 UTC
Inspired by ports/73896, I came up with the following patch (the
solution there did not work for me).

I guess this will fix all "Compiler cannot create executables" problems
where only the OpenSSL library from the ports is available, although I
tested it with php4-openssl only.

--- Makefile.ext.orig	Wed Jan  5 04:39:01 2005
+++ Makefile.ext	Wed Jan  5 04:49:07 2005
@@ -181,7 +181,7 @@
 CONFIGURE_ARGS+=--with-mcve=${LOCALBASE} \
                 --with-openssl-dir=${OPENSSLBASE}
 
-LDFLAGS+=       -lcrypto -lssl
+LDFLAGS+=       -L${OPENSSLLIB} -lcrypto -lssl
 USE_OPENSSL=    yes
 .endif
 
@@ -230,7 +230,7 @@
 CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \
 		--with-openssl-dir=${OPENSSLBASE}
 
-LDFLAGS+=	-lcrypto -lssl
+LDFLAGS+=	-L${OPENSSLLIB} -lcrypto -lssl
 USE_OPENSSL=	yes
 .endif
 
@@ -295,7 +295,7 @@
 		--with-openssl-dir=${OPENSSLBASE} \
 		--enable-ucd-snmp-hack
 
-LDFLAGS+=       -lcrypto -lssl
+LDFLAGS+=       -L${OPENSSLLIB} -lcrypto -lssl
 USE_OPENSSL=    yes
 
 OPTIONS=	SNMP4 "Use old UCD SNMP instead of the new NET SNMP" off
Comment 3 Alex Dupre freebsd_committer 2005-01-10 17:02:52 UTC
State Changed
From-To: open->closed

Fixed, thanks!