From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15576 invoked from network); 17 Jul 2021 11:44:00 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 17 Jul 2021 11:44:00 -0000 Received: (qmail 11879 invoked by uid 550); 17 Jul 2021 11:43:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11861 invoked from network); 17 Jul 2021 11:43:57 -0000 Date: Sat, 17 Jul 2021 07:43:45 -0400 From: Rich Felker To: daggs Cc: musl@lists.openwall.com Message-ID: <20210717114344.GF13220@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] musl 1.2.2 link error on __libc_malloc with --with-malloc=oldmalloc On Sat, Jul 17, 2021 at 01:35:27PM +0200, daggs wrote: > Greetings, > > I seems to encounter an issue when creating a musl libc based cross compiler using crosstool-ng. > the error is as follows: > [ALL ] /home/dagg/workspace/crosstool-ng/.build/x86_64-unknown-linux-musl/buildtools/lib/gcc/x86_64-unknown-linux-musl/10.3.0/../../../../x86_64-unknown-linux-musl/bin/ld: obj/src/malloc/oldmalloc/malloc.lo: in function `__libc_malloc': > [ALL ] malloc.c:(.text.__libc_malloc+0x0): multiple definition of `__libc_malloc'; obj/src/malloc/lite_malloc.lo:lite_malloc.c:(.text.__libc_malloc+0x0): first defined here > > from the looks of it, __libc_malloc is defined in more than one files which are getting linked. > in comparison,in I downgrade musl to 1.2.1, the issue doesn't reproduces. > > has anyone encountered it? how can I fix this issue? commit 98b9df994c85dcb6a8a5a9099495dd44c7cf2bce fixes it: https://git.musl-libc.org/cgit/musl/commit/?id=98b9df994c85dcb6a8a5a9099495dd44c7cf2bce