From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 844AB1F66E for ; Fri, 21 Aug 2020 20:46:05 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1k9DvF-0006YD-7p; Fri, 21 Aug 2020 20:46:01 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9DvE-0006Y6-0V for sox-devel@lists.sourceforge.net; Fri, 21 Aug 2020 20:46:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=V9rZJ7OabN1FAqgSqGaRlNndrrSr5AdYLMv4a4qMEnY=; b=Hv/SSDvt7zTi8RdIORpwz2mGXq DzMtO/KXV8cd+qottZuv/JSVV0vNPhDO3XCHW7oqrK39SUiwL701ZKYBABcDtmxw84Eaz+vd/UYS0 A4upwjc+6+39uGDebxLNp33pfXzd3WgaVKzL+8JnwRfAxJr7a8GQZEyd5086iwWcNgHk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=V9rZJ7OabN1FAqgSqGaRlNndrrSr5AdYLMv4a4qMEnY=; b=cX4KXZ4IrcODFqbH++GYf1N+G4 7vI0R1PeeHYO/U5Xa83exkvclzxXzeYAv/GudbbLyK6dXpgliJMiMpMXgtWwzB8+urj1ZAb5i3GZK ly+W60793I1EoM0Zvm+zZLv0m/0NzWtdHZy7btlg6VxbXWs3NUrgy7jsJIVfyNSBwmEY=; Received: from uvt.stare.cz ([185.63.96.79] helo=mx.stare.cz) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1k9DvC-003Rn3-Ih for sox-devel@lists.sourceforge.net; Fri, 21 Aug 2020 20:45:59 +0000 Received: from localhost (stare.cz [local]) by stare.cz (OpenSMTPD) with ESMTPA id 60ebbd7a; Fri, 21 Aug 2020 22:45:50 +0200 (CEST) Date: Fri, 21 Aug 2020 22:45:50 +0200 From: Jan Stary To: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Message-ID: <20200821204550.GA67586@www.stare.cz> References: <20200821081621.GA85272@www.stare.cz> <20200821151610.GA82566@www.stare.cz> <20200821152130.GA6847@www.stare.cz> <20200821174358.GA88757@www.stare.cz> <20200821201758.GA23884@www.stare.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200821201758.GA23884@www.stare.cz> X-Headers-End: 1k9DvC-003Rn3-Ih Subject: Re: Build system cleanup X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-devel@lists.sourceforge.net Cc: sox-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-devel-bounces@lists.sourceforge.net > However, the build eventually fails with a linking error: > > /bin/sh ../libtool --tag=CC --mode=link cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -avoid-version -module -L/usr/local/lib -fstack-protector-strong -Wl,--as-needed -o sox sox.o libsox.la -lm > libtool: link: cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -fstack-protector-strong -Wl,--as-needed -o .libs/sox sox.o -L/usr/local/lib -L./.libs -lsox -lpng -lltdl -lao -lgsm -lid3tag -lz -lmad -lmp3lame -ltwolame -lopusfile -lopus -lsndio -lvorbisfile -lwavpack -lcrypto -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib > ld: error: undefined symbol: lsx_malloc > [...] > > Indeed, none of the input files defines lsx_malloc; > it is defined in libsox.so > > $ nm .libs/libsox.so.3.0 | grep lsx_malloc > 00042a30 T lsx_malloc > > but that is not one of the inputs. Adding .libs/libsox.so.3.0 > as an input to the above line make it link as expected. Hm. but the "-L./.libs -lsox" should take care of that. Is it because of the extra -L/usr/local/lib? When building without any extra LDFLAGS, that line is cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -fstack-protector-strong -Wl,--as-needed -o .libs/sox sox.o -L ./.libs -lsox -L/usr/local/lib -lFLAC -lopusfile -lopus -lsndio -lvorbisenc -lvorbisfile -lvor bis -logg -lm -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib and it links fine. Is it because of the _order_ of the -L options? Note that with LDFLAGS=/usr/local/lib, the order is -o .libs/sox sox.o -L/usr/local/lib -L./.libs -lsox [etc] but without LDFLAGS it's -o .libs/sox sox.o -L ./.libs -lsox -L/usr/local/lib -lFLAC [etc] Jan _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel