Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#450 closed Bug (fixed)

configure fails on FreeBSD; can't find OpenSSL

Reported by: mezz Owned by: charles
Priority: Normal Milestone: 1.40
Component: Transmission Version: 0.95
Severity: Minor Keywords:
Cc:

Description

Current, I had to add a hack to backout the r3621 (configure.ac) and re-run autogen.sh to create a new configure to allow me to create a patch of configure for in FreeBSD ports. I am wondering if it is possibe to add some check like if openssl.pc doesn't exists then check on crypto and ssl like old one before r3621? If both don't exist then give an error of OpenSSL doesn't exist in system.

Attachments (1)

patch-check-ssl.m4 (467 bytes) - added by mezz 12 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 13 years ago by charles

  • Resolution set to invalid
  • Status changed from new to closed

this is an OpenBSD bug, not a Transmission bug. some cursory googling indicates that OpenBSD might be installing openssl.pc in /usr/lib instead of /usr/lib/pkgconfig as it should be doing...

comment:2 Changed 13 years ago by mezz

FreeBSD and OpenBSD aren't same. FreeBSD does not include or install openssl.pc at all, so it's not a bug.

comment:3 Changed 13 years ago by charles

This is a FreeBSD bug, not a Transmission bug.

http://osdir.com/ml/freebsd.isp/2004-03/msg00120.html says:

Add to /etc/make.conf:

WITH_OPENSSL_BASE=yes

I ran into the same problem with mod_php and ssl, out of some reason the bsd.openssl.mk file for ports thinks that you have openssl installed as package in /usr/local and so the php port calls the configure with --with-openssl=/usr/local

http://osdir.com/ml/encryption.opensc.devel/2004-07/msg00092.html suggests a workaround by appending the local path to your PKGCONFIGDIR. I'd also recommend you file a bug report with the FreeBSD openssl packagers. From these Google results, it sounds like they've had the .pc file mislocated for over three years now.

comment:4 Changed 13 years ago by mezz

The first link is about mess up between basesystem and ports/package of OpenSSL (ie: have two OpenSSL installed.). So... It is a different problem.

The second link, you seem to have missed a comment. A user said, "openssl.pc isn't available on any of the other BSD systems". FreeBSD does not have openssl.pc at all in the basesystem with OpenSSL. So... There is no reason for us to set PKGCONFIGDIR, because it doesn't has any openssl.pc at all.

From these Google results, it sounds like they've had the .pc file mislocated for over three years now.

I have been using FreeBSD and being a committer in FreeBSD for years; it does not has openssl.pc in the basesystem.

comment:5 Changed 13 years ago by charles

mezz: I don't see your point. Many many many software projects rely on pkg-config now. If FreeBSD is stripping out the opensll.pc file that OpenSSL's tarballs come with, that's FreeBSD's fault.

comment:6 Changed 13 years ago by charles

  • Milestone changed from None Set to 1.40
  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:7 follow-up: Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

fixed in r6695

comment:8 in reply to: ↑ 7 Changed 13 years ago by mezz

Replying to charles:

fixed in r6695

Thanks! I haven't test it yet, but I will.

comment:9 Changed 13 years ago by charles

  • Keywords backport-candidate added

comment:10 Changed 13 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:11 Changed 13 years ago by charles

  • Owner changed from somebody to charles
  • Status changed from reopened to new

comment:12 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed

comment:13 Changed 12 years ago by charles

backported to 1.3x in r6750

comment:14 Changed 12 years ago by charles

  • Keywords backport-candidate removed
  • Milestone changed from 1.40 to 1.34

comment:15 Changed 12 years ago by mezz

  • Resolution fixed deleted
  • Status changed from closed to reopened

It works nice, thanks! I have a simple patch to fix the --with-ssl=/path/to. It's nice to have that --with-ssl=/path/to feature for users can choice which OpenSSL they want to use.

Changed 12 years ago by mezz

comment:16 Changed 12 years ago by charles

mezz: are you sure that patch is an improvement? I'll add it if you're certain, but I'm more-or-less taking your word for it here.

comment:17 Changed 12 years ago by mezz

Yes, it works and this patch is available in FreeBSD ports tree with no bug report and no build failure. You can test it by remove or reduce the paths like this below. :-)

-    for dir in $withval /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
+    for dir in $with_ssl /usr/pkg; do

Here's example in my jail, I have moved all stuff in /opt. I ran ./configure --with-ssl=/opt:

Before:

checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for OpenSSL... configure: error: Cannot locate ssl

After:

checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for OpenSSL... /opt

In the m4/ssl.m4's comment has an explain about '--with-ssl=/path/to' and an URL point to http://autoconf-archive.cryp.to/check_ssl.html .. It looks like Transmission's m4/ssl.m4 has removed or break '--with-ssl=/path/to'.

comment:18 Changed 12 years ago by charles

  • Keywords backport-candidate added
  • Milestone changed from 1.34 to 1.40
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Summary changed from OpenSSL in FreeBSD basesystem doesn't has openssl.pc.. to configure fails on FreeBSD; can't find OpenSSL

comment:19 Changed 12 years ago by charles

mezz's patch included in r6830.

comment:20 Changed 12 years ago by charles

thanks mezz :)

comment:21 Changed 12 years ago by charles

  • Keywords backport-candidate removed
Note: See TracTickets for help on using tickets.