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.8 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,URIBL_BLOCKED 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 1CB401F66E for ; Thu, 27 Aug 2020 14:38:44 +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 1kBJ31-0001vU-Dd; Thu, 27 Aug 2020 14:38:39 +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 1kBJ30-0001vL-3m for sox-devel@lists.sourceforge.net; Thu, 27 Aug 2020 14:38:38 +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=HlTrpgl8kcRU3OVV9QXNFjPkpy3aqEE8bd9hHTD5IeM=; b=b7bysjgcgYNDpEqEIzr6bF5Kxm +YgvQO61m0gSSyFnlwQqr7SErHMjFDqvylVTDAEx94k2wli/b8LMX3Vu1ClKgpIMmYy4w1fv7M8cU j9asCrF0D4rap2cPnisiyYK9dzYv8JVZHEAAIgc23A9lO3bRbVtKcUOi8nDEXJSr2el8=; 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=HlTrpgl8kcRU3OVV9QXNFjPkpy3aqEE8bd9hHTD5IeM=; b=iUJ4X9YdVIB37++tBquGTLjzsV gPfDobIttAEhTmQxnbvAlVXhDOEgpFIjblCI6NSQ6LniLXoI20t3HwOeQU+BFJsPXxvX+1qOHRKob k+Cw7hER5vA0SgDPx0K/M2DTKG8vX8QuQJXgYyXNA5eHr9LieeobxTUy+xcct0eVOwRw=; Received: from uvt.stare.cz ([185.63.96.79] helo=mx.stare.cz) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kBJ2w-004zY9-48 for sox-devel@lists.sourceforge.net; Thu, 27 Aug 2020 14:38:38 +0000 Received: from localhost (stare.cz [local]) by stare.cz (OpenSMTPD) with ESMTPA id 06e11b1f; Thu, 27 Aug 2020 16:38:23 +0200 (CEST) Date: Thu, 27 Aug 2020 16:38:22 +0200 From: Jan Stary To: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Message-ID: <20200827143822.GA98176@www.stare.cz> References: <20200822153545.GA61858@www.stare.cz> <20200823140733.GA9403@www.stare.cz> <20200823215551.GA83582@www.stare.cz> <20200824065643.GA91434@www.stare.cz> <20200827094048.GC5768@www.stare.cz> <20200827130507.GA5432@www.stare.cz> <20200827141012.GA28669@www.stare.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200827141012.GA28669@www.stare.cz> X-Headers-End: 1kBJ2w-004zY9-48 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 On Aug 27 16:10:12, hans@stare.cz wrote: > On Aug 27 14:31:51, mans@mansr.com wrote: > > Jan Stary writes: > > > > > On Aug 27 11:40:48, hans@stare.cz wrote: > > >> On Aug 24 08:56:43, hans@stare.cz wrote: > > >> > On Aug 23 23:55:51, hans@stare.cz wrote: > > >> > > > > cc [...] -o .libs/sox sox.o -L./.libs -lsox -L/usr/local/lib -lpng [...] > > >> > > > > cc [...] -o .libs/sox sox.o -L/usr/local/lib -L./.libs -lsox -lpng [...] > > >> > > > > > > >> > > > > The first works, the second does not. > > >> > > > > The only difference between the two is the place > > >> > > > > where the extra -L/usr/local/lib gets added, > > >> > > > > as described in the previous emails. > > >> > > > > >> > > And it seems libtool itself is the one who breaks it. > > >> > > This is the failing line again: > > >> > > > > >> > > /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 -Wl,--as-needed -o sox sox.o libsox.la -lm > > >> > > > > >> > > Notice the "-L/usr/local/lib -Wl,--as-needed". > > >> > > The "-L/usr/local/lib" part comes from the configure arg: > > >> > > > > >> > > ./configure CC=cc CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib > > >> > > > > >> > > The "-Wl,--as-needed" comes from > > >> > > > > >> > > $ grep as-needed configure.ac > > >> > > AX_APPEND_LINK_FLAGS([-Wl,--as-needed]) > > >> > > > > >> > > That results in the following line in src/Makefile: > > >> > > > > >> > > LDFLAGS = -L/usr/local/lib -Wl,--as-needed > > >> > > > > >> > > and that's what is passed in the above command line. Now, libtool > > >> > > apparently preprocesses the line into something else; in particular, > > >> > > it reorders the options. The very next command is: > > >> > > > > >> > > libtool: link: cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed -o .libs/sox sox.o -L/usr/local/lib -L./.libs -lsox -lpng -lltdl -lao -lgsm -lmad -lmp3lame -ltwolame -lid3tag -lz -lopusfile -lopus -lsndio -lvorbisfile -lwavpack -lcrypto -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -Wl,-rpath,/usr/local/lib > > >> > > > > >> > > Notice where the -L/usr/local/lib has been moved. > > >> > > As described previously, if it comes after -lsox > > >> > > instead of before it, it links just fine. > > >> > > > >> > That being said, the same problem is present in the master branch, > > >> > but it works in 14.4.2, where the libtool line is > > >> > > > >> > bin/sh ../libtool --silent --tag=CC --silent --mode=link cc -Wtraditional-co > > >> > nversion -g -O2 -fstack-protector -Wall -W -Wmissing-prototypes -Wstrict-protot > > >> > ypes -pedantic -avoid-version -module -L/usr/local/lib -o sox sox.o libsox.la > > >> > -lm > > >> > > > >> > which becomes (without 'silent') > > >> > > > >> > libtool: link: cc -Wtraditional-conversion -g -O2 -fstack-protector -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -o .libs/sox sox.o -L/usr/local/lib -L./.libs -lsox -lltdl -lpng -lao -lgsm -lmad -lid3tag -lz -lmp3lame -ltwolame -lopusfile -lopus -lsndio -lvorbisfile -lwavpack -lcrypto -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib > > > > > > With the current new-build, the ultimate linkage fails on OpenBSD > > > for plain ./configure (without any args or env variables): > > > > > > /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed -o sox sox.o libsox.la -lm > > > libtool: link: gcc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed -o .libs/sox sox.o -lsox -L/usr/local/lib -lFLAC -lopusfile -lopus -lsndio -lvorbisenc -lvorbisfile -lvorbis -logg -lm -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib > > > ld: error: undefined symbol: lsx_realloc_array > > > > > > NB: -o .libs/sox sox.o -lsox ... > > > > > > Is it the literal '.' in "-L.*"? > > > It works with "-L\.*" > > > > Aargh, the OpenBSD package for GNU libtool is slightly (9 years) old. > > Yes. That would be around 2011; the OpenBSD libtool is from 2012 > - since then, the GNU libtool is only kept for ports that require it > (unlike the audio/sox port). > > Do you run a newer version of GNU libtool on your OpenBSD machine > that behaves differently with respect to the "." pattern > and makes the current new-build link? Maybe that's not it - the patch in configure.ac doesn't apply cleanly. $ doas pkg_add -i libtool $ env AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 autoreconf -i $ find . -name libtool\* ./m4/libtool.m4 $ ./configure --disable-silent-rules --prefix=$HOME [...] config.status: executing libtool commands No such line 10787 in input file, ignoring 1 out of 3 hunks failed--saving rejects to libtool.rej [...] (Should the while build fail here?) $ find . -name libtool\* ./m4/libtool.m4 ./libtool ./libtool.rej ./libtool.orig $ cat libtool.rej @@ -9144,7 +9146,7 @@ *) func_append new_libs " $deplib" ;; esac done - compile_deplibs=$new_libs + compile_deplibs="$pri_libs $new_libs" func_append compile_command " $compile_deplibs" $ diff libtool.orig libtool --- libtool.orig Thu Aug 27 16:21:12 2020 +++ libtool Thu Aug 27 16:21:12 2020 @@ -9122,6 +9122,7 @@ EOF # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= + pri_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; @@ -9135,6 +9136,7 @@ EOF done for deplib in $compile_deplibs; do case $deplib in + -L.*) func_append pri_libs " $deplib" ;; -L*) case " $new_libs " in *" $deplib "*) ;; (In case you would like a user account on an actual OpenBSD system, send me you public key.) Instead of trying to patch the broken libtool, can ./configure jus use /usr/bin/libtool on OpenBSD? While /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed -o sox sox.o libsox.la -lm libtool: link: gcc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed -o .libs/sox sox.o -lsox -L/usr/local/lib -lFLAC -lopusfile -lsndio -lvorbisenc -lvorbisfile -lvorbis -logg -lopus -lm -Wl,-rpath,/usr/local/lib ld: error: undefined symbol: lsx_realloc_array fails, "make LIBTOOL=/usr/bin/libtool" works just fine: /usr/bin/libtool --tag=CC --mode=link gcc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed -o sox sox.o libsox.la -lm libtool: link: gcc -o .libs/sox -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes -Wstrict-prototypes -Wl,--as-needed sox.o -L.libs -lsox -lFLAC -logg -lm -lopusfile -lopus -lsndio -lvorbis -lvorbisenc -lvorbisfile -Wl,-rpath-link,/usr/local/lib Note the "/usr/bin/libtool" instead of "/bin/sh ../libtool". Also, patching with a diff between libtool~ and libtool (as configure.ac currently does) apparently requires a specific version of GNU libtool; and is doomed to fail on every subsequent run anyway. Jan _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel