NetBSD Problem Report #47139

From msaitoh@execsw.org  Mon Oct 29 04:30:44 2012
Return-Path: <msaitoh@execsw.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 271D763CAFB
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Oct 2012 04:30:44 +0000 (UTC)
Message-Id: <20121029043042.1A42043985B@vslock.execsw.org>
Date: Mon, 29 Oct 2012 13:30:42 +0900 (JST)
From: msaitoh@execsw.org
Reply-To: msaitoh@execsw.org
To: gnats-bugs@gnats.NetBSD.org
Subject: multiple definition of __umodsi3 on arm
X-Send-Pr-Version: 3.95

>Number:         47139
>Category:       port-arm
>Synopsis:       multiple definition of __umodsi3 on arm
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 29 04:35:00 +0000 2012
>Closed-Date:    Tue Nov 20 03:15:23 +0000 2012
>Last-Modified:  Tue Nov 20 03:15:23 +0000 2012
>Originator:     SAITOH Masanobu
>Release:        6.0
>Organization:
>Environment:
Architecture: arm
Machine: evbarm
>Description:
	When compiling usr.bin/netstat with LDSTATIC=-static, object in
	ibc.a and libgcc.a confilct.

	cd usr.bin/netstat
	env LDSTATIC=-static make dependall
	(snip)
#      link  netstat/netstat
gcc      -static  -o netstat  atalk.o bpf.o fast_ipsec.o if.o inet.o inet6.o ipsec.o iso.o main.o mbuf.o mroute.o mroute6.o pfkey.o pfsync.o show.o route.o tp_astring.o unix.o vtw.o netstat_hostops.o -lkvm       -Wl,-rpath-link,/lib  -L=/lib
/usr/lib/libc.a(divsi3.o): In function `__umodsi3':
(.text+0x0): multiple definition of `__umodsi3'
/usr/lib/libgcc.a(_umodsi3.o):(.text+0x0): first defined here
/usr/lib/libc.a(divsi3.o): In function `__modsi3':
(.text+0x18): multiple definition of `__modsi3'
/usr/lib/libgcc.a(_modsi3.o):(.text+0x0): first defined here
/usr/lib/libc.a(divsi3.o): In function `__udivsi3':
(.text+0x40): multiple definition of `__udivsi3'
/usr/lib/libgcc.a(_udivsi3.o):(.text+0x0): first defined here
*** Error code 1

Stop.

	The output is alomost the same as in -current.

>How-To-Repeat:
	See above.
>Fix:
	I don't know.

>Release-Note:

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/47139: multiple definition of __umodsi3 on arm
Date: Mon, 29 Oct 2012 09:49:58 -0400

 On Oct 29,  4:35am, msaitoh@execsw.org (msaitoh@execsw.org) wrote:
 -- Subject: port-arm/47139: multiple definition of __umodsi3 on arm


 This is pullup-654.

 christos

From: SAITOH Masanobu <msaitoh@execsw.org>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org, 
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, msaitoh@execsw.org
Subject: Re: port-arm/47139: multiple definition of __umodsi3 on arm
Date: Tue, 30 Oct 2012 02:24:36 +0900

 Hi, Christos.

 (2012/10/29 22:49), Christos Zoulas wrote:
 > On Oct 29,  4:35am, msaitoh@execsw.org (msaitoh@execsw.org) wrote:
 > -- Subject: port-arm/47139: multiple definition of __umodsi3 on arm
 > 
 > 
 > This is pullup-654.
 > 
 > christos
 > 

  I thinks that change doesn't solve my problem. That problem occurs
 both netbsd-6 and "yesterday's" current.

 > http://mail-index.netbsd.org/source-changes/2012/10/10/msg037776.html

 The data of that commit is October 10th.

 > #      link  netstat/netstat
 > gcc      -static  -o netstat  atalk.o bpf.o fast_ipsec.o if.o inet.o inet6.o iso.o main.o mbuf.o mroute.o mroute6.o pfkey.o pfsync.o show.o route.o tp_astring.o unix.o vtw.o netstat_hostops.o -lkvm       -Wl,-rpath-link,/lib  -L=/lib
 > /usr/lib/libc.a(divsi3.o): In function `__udivsi3':
 > (.text+0x10): multiple definition of `__aeabi_uidivmod'
 > /usr/lib/libgcc.a(_udivsi3.o):(.text+0xf8): first defined here
 > /usr/lib/libc.a(divsi3.o): In function `__udivsi3':
 > (.text+0x10): multiple definition of `__aeabi_uidiv'
 > /usr/lib/libgcc.a(_udivsi3.o):(.text+0x0): first defined here
 > /usr/lib/libc.a(divsi3.o): In function `__udivsi3':
 > (.text+0x10): multiple definition of `__udivsi3'
 > /usr/lib/libgcc.a(_udivsi3.o):(.text+0x0): first defined here
 > *** Error code 1
 > 
 > Stop.
 > make: stopped in /var/sources/NetBSD-current/src/usr.bin/netstat
 > *** Error code 1
 > 
 > Stop.

  Is that chage imcomplete? I observed this problem only in src/usr.bin/netstat.



 -- 
 -----------------------------------------------
                 SAITOH Masanobu (msaitoh@execsw.org
                                  msaitoh@netbsd.org)

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, msaitoh@execsw.org
Cc: 
Subject: Re: port-arm/47139: multiple definition of __umodsi3 on arm
Date: Mon, 29 Oct 2012 13:47:15 -0400

 On Oct 29,  5:25pm, msaitoh@execsw.org (SAITOH Masanobu) wrote:
 -- Subject: Re: port-arm/47139: multiple definition of __umodsi3 on arm

 |   Is that chage imcomplete? I observed this problem only in src/usr.bin/netstat.

 Yes, we need to split divsi3 and udivsi3... I was hoping to avoid that.

 christos

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 07 Nov 2012 08:25:21 +0000
State-Changed-Why:
christos did the split; does it work now?


From: Masanobu SAITOH <msaitoh@execsw.org>
To: gnats-bugs@NetBSD.org
Cc: dholland@NetBSD.org, port-arm-maintainer@netbsd.org, 
 netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, msaitoh@execsw.org
Subject: Re: port-arm/47139 (multiple definition of __umodsi3 on arm)
Date: Wed, 07 Nov 2012 17:54:50 +0900

 (2012/11/07 17:25), dholland@NetBSD.org wrote:
 > Synopsis: multiple definition of __umodsi3 on arm
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: dholland@NetBSD.org
 > State-Changed-When: Wed, 07 Nov 2012 08:25:21 +0000
 > State-Changed-Why:
 > christos did the split; does it work now?

 Yes, it was fixed.

 -- 
 -----------------------------------------------
                 SAITOH Masanobu (msaitoh@execsw.org
                                  msaitoh@netbsd.org)

State-Changed-From-To: feedback->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 07 Nov 2012 20:38:25 +0000
State-Changed-Why:
pullup-6 #654


From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47139 CVS commit: [netbsd-6] src
Date: Mon, 19 Nov 2012 18:38:05 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Nov 19 18:38:04 UTC 2012

 Modified Files:
 	src/common/lib/libc/arch/arm/gen [netbsd-6]: divsi3.S
 	src/lib/libc/arch/arm/gen [netbsd-6]: Makefile.inc
 	src/sys/lib/libkern/arch/arm [netbsd-6]: Makefile.inc
 Added Files:
 	src/common/lib/libc/arch/arm/gen [netbsd-6]: divide.S modsi3.S
 	    udivsi3.S umodsi3.S

 Log Message:
 Pull up following revision(s) (requested by christos in ticket #654):
 	common/lib/libc/arch/arm/gen/modsi3.S: revision 1.1
 	common/lib/libc/arch/arm/gen/umodsi3.S: revision 1.1
 	sys/lib/libkern/arch/arm/Makefile.inc: revision 1.11
 	sys/lib/libkern/arch/arm/Makefile.inc: revision 1.12
 	common/lib/libc/arch/arm/gen/divide.S: revision 1.1
 	lib/libc/arch/arm/gen/Makefile.inc: revision 1.20
 	common/lib/libc/arch/arm/gen/divsi3.S: revision 1.3
 	common/lib/libc/arch/arm/gen/udivsi3.S: revision 1.1
 	common/lib/libc/arch/arm/gen/divsi3.S: revision 1.4
 Split out modsi3 and umodsi3 from the divsi3 file. This is so that
 we don't get re-defined symbols in libc from libgcc in static linking.
 Example: cc -pthread -static main-calls-pthread-create.c
 add split files.
 add new divsi3 related files.
 add new files to fix static linking
 split udivsi3 and divsi3 to fix static linking. This could be done better.
 Fixes PR#47139


 To generate a diff of this commit:
 cvs rdiff -u -r0 -r1.1.2.2 src/common/lib/libc/arch/arm/gen/divide.S \
     src/common/lib/libc/arch/arm/gen/udivsi3.S
 cvs rdiff -u -r1.1 -r1.1.52.1 src/common/lib/libc/arch/arm/gen/divsi3.S
 cvs rdiff -u -r0 -r1.1.4.2 src/common/lib/libc/arch/arm/gen/modsi3.S \
     src/common/lib/libc/arch/arm/gen/umodsi3.S
 cvs rdiff -u -r1.16.8.2 -r1.16.8.3 src/lib/libc/arch/arm/gen/Makefile.inc
 cvs rdiff -u -r1.9 -r1.9.18.1 src/sys/lib/libkern/arch/arm/Makefile.inc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Tue, 20 Nov 2012 03:15:23 +0000
State-Changed-Why:
Fixed and pulled-up to netbsd-6 branch.


>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.