Subject: bin/11887: usr.sbin/amd can not be linked statically
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 01/04/2001 02:01:15
>Number:         11887
>Category:       bin
>Synopsis:       usr.sbin/amd can not be linked statically
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 04 02:01:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Release:        1.5Q (crosscompiling for sh3)
>Organization:
	itojun.org
>Environment:
System: NetBSD starfruit.itojun.org 1.5Q NetBSD 1.5Q (STARFRUIT) #306: Thu Jan 4 00:49:06 JST 2001 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386

Architecture: i386
Machine: i386
>Description:
	usr.sbin/amd cannot be lined statically, as there's duplicated
	symbol between urs.sbin/amd/libamu and lib/libc.
/export/up1000/home/itojun/NetBSD/sh3eb/usr/lib/libc.a(clnt_perror.o)(.text+0x6bc): multiple definition of `clnt_sperrno'
/export/up1000/home/itojun/NetBSD/src/usr.sbin/amd/libamu/obj.evbsh3/libamu.a(clnt_sperrno.o)(.text+0x1e4): first defined here
collect2: ld returned 1 exit status

	source codes are:
	lib/libc/rpc/clnt_perror.c
	dist/am-utils/libamu/clnt_sperrno.c

	clnt_sperrno() do seem very similar, however, there seem to be some
	differences between them.

	the issue is fatal to NetBSD ports that have no shared library support
	(like NetBSD/sh3).
>How-To-Repeat:
	try to link usr.sbin/amd statically.
>Fix:
	get rid of clnt_sperrno() in usr.sbin/amd/libamu?
>Release-Note:
>Audit-Trail:
>Unformatted: