NetBSD Problem Report #42901

From kre@munnari.OZ.AU  Sun Feb 28 15:32:24 2010
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 4BE6963C3E3
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Feb 2010 15:32:24 +0000 (UTC)
Message-Id: <201002281532.o1SFWHk1014994@jade.coe.psu.ac.th>
Date: Sun, 28 Feb 2010 22:32:17 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: net/wpa_supplicant link error (undefined symbol) (NetBSD 4.0 / i386)
X-Send-Pr-Version: 3.95

>Number:         42901
>Category:       pkg
>Synopsis:       net/wpa_supplicant link error (undefined symbol) (NetBSD 4.0 / i386)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    reed
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 28 15:35:00 +0000 2010
>Closed-Date:    
>Last-Modified:  Sat Nov 05 14:02:07 +0000 2011
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386 (pkgsrc current 2010-02-28)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 kre@jade.coe.psu.ac.th:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
	The latest version of net/wpa_supplicant (wpa_supplicant-0.7.1)
	fails to link with an openssl related undefined symbol.

	It might be that the openssl in NetBSD 4.0 is too old for
	this version of wpa_supplicant, and the package, perhaps
	pkgsrc machinery, isn't detecting that and requiring the
	pkgsrc version of openssl.   Might be...

>How-To-Repeat:
	I use pkg_comp with libkver and NetBSD 4.0 release sets installed
	(except the x* sets, I use pkgsrc modular xorg (X11_TYPE=modular)
	instead.)

	In that environment, expect to see ...

  CC  ../src/l2_packet/l2_packet_freebsd.c
cc -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib  -o wpa_supplicant config.o notify.o bss.o eap_register.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/wpabuf.o ../src/utils/os_unix.o ../src/utils/eloop.o config_file.o ../src/rsn_supp/wpa.o ../src/rsn_supp/preauth.o ../src/rsn_supp/pmksa_cache.o ../src/rsn_supp/peerkey.o ../src/rsn_supp/wpa_ie.o ../src/common/wpa_common.o ../src/eap_peer/eap_tls.o ../src/eap_peer/eap_peap.o ../src/eap_common/eap_peap_common.o ../src/eap_peer/eap_ttls.o ../src/eap_peer/eap_md5.o ../src/eap_peer/eap_mschapv2.o ../src/eap_peer/mschapv2.o ../src/eap_peer/eap_gtc.o ../src/eap_peer/eap_otp.o ../src/eap_peer/eap_leap.o ../src/eap_peer/eap_psk.o ../src/eap_common/eap_psk_common.o ../src/eap_peer/eap_pax.o ../src/eap_common/eap_pax_common.o ../src/eapol_supp/eapol_supp_sm.o ../src/eap_peer/eap.o ../src/eap_common/eap_common.o ../src/eap_peer/eap_methods.o ../src/crypto/ms_funcs.o ../src/eap_common/chap.o ../src/eap_peer/e!
 ap_tls_common.o ../src/crypto/tls_openssl.o ../src/crypto/crypto_openssl.o  ../src/crypto/aes-unwrap.o ../src/crypto/aes-eax.o ../src/crypto/aes-ctr.o ../src/crypto/aes-encblock.o ../src/crypto/aes-omac1.o ../src/crypto/md5.o ctrl_iface.o ctrl_iface_unix.o dbus/dbus_old.o dbus/dbus_old_handlers.o dbus/dbus_dict_helpers.o dbus/dbus_common.o ../src/utils/base64.o ../src/crypto/sha1.o ../src/crypto/sha1-pbkdf2.o ../src/crypto/sha1-tlsprf.o  wpa_supplicant.o events.o blacklist.o wpas_glue.o scan.o main.o ../src/drivers/driver_wired.o ../src/drivers/driver_bsd.o ../src/drivers/drivers.o ../src/l2_packet/l2_packet_freebsd.o  -lpcap -lssl -lcrypto -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -ldbus-1   
../src/crypto/crypto_openssl.o: In function `dh5_init':
crypto_openssl.c:(.text+0x14e): undefined reference to `get_rfc3526_prime_1536'
gmake: *** [wpa_supplicant] Error 1
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/net/wpa_supplicant
*** Error code 1

Stop.

	I didn't expect it to help, as the buildlink3 stuff will
	(correctly) ignore it (and it did), but I tried manually
	installing security/openssl which (kind of) succeeded - for
	why "kind of" see a subsequent PR - it succeeded well enough
	though that it would have been able to be used here, if pkgsrc
	would just use some random package that's lying around without
	it being listed as a dependency (it doesn't, and it shouldn't,
	but this test was just 10 minutes of extra waiting, so harmess...).

>Fix:
	When I first saw this, I thought that perhaps I could just
	(conditionally upon NetBSD 4) .include openssl/buildlink3.mk
	and that would magically fix everything.   Then I saw that
	that bl3.mk file was already unconditionally included (but
	just does nothing).   I guess pkgsrc thinks "this is NetBSD,
	it has openssl in base, don't need another" and ignores it.
	But for this package, it appears as if that might be incorrect.

	I suppose now that some kind of PREFER_PKGSRC trickery,
	depending upon NetBSD 4, might fix it, but that's getting
	beyond my abilities...

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->reed
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Tue, 02 Mar 2010 10:31:20 +0000
Responsible-Changed-Why:
Over to maintainer.
Probaly related to PR#37505.


State-Changed-From-To: open->suspended
State-Changed-By: shattered@NetBSD.org
State-Changed-When: Thu, 01 Sep 2011 22:26:46 +0000
State-Changed-Why:
It's definitely related to 37505, but the fix never went into netbsd-4.


State-Changed-From-To: suspended->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 05 Nov 2011 14:02:07 +0000
State-Changed-Why:
"suspended" is for issues waiting on 3rd-party action. There are two things
we can do with this PR: fix it, or give up and say we won't fix it.

Adding PREFER.openssl=pkgsrc should allow it to build, if openssl builds.
Packages aren't supposed to set that themselves though (AIUI) so someone
needs to dig around to figure out the proper way to express it.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.