From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11048 Path: news.gmane.org!.POSTED!not-for-mail From: Charlie Kester Newsgroups: gmane.linux.lib.musl.general Subject: Re: link failures when building projects that use libtool Date: Wed, 15 Feb 2017 18:55:40 -0800 Message-ID: <20170216025540.GE20945@comcast.net> References: <20170216020612.GB20945@comcast.net> <20170216022910.GL1520@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: blaine.gmane.org 1487213754 8096 195.159.176.226 (16 Feb 2017 02:55:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 16 Feb 2017 02:55:54 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) To: musl@lists.openwall.com Original-X-From: musl-return-11063-gllmg-musl=m.gmane.org@lists.openwall.com Thu Feb 16 03:55:51 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1ceCEY-0001nF-Qx for gllmg-musl@m.gmane.org; Thu, 16 Feb 2017 03:55:51 +0100 Original-Received: (qmail 9240 invoked by uid 550); 16 Feb 2017 02:55:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 9222 invoked from network); 16 Feb 2017 02:55:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1487213742; bh=zgrF/ozW8ooXsPQ/jJ4+4PiSX2kxdlmwpz5N21unvy8=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=fK7R87TjMUocdPZM7Ayxst3uICSxreeKQCNeuf9U5eowIfokcM1U5YgydbNYYi//R xAuL9u6Sj0FIE4qOLy8cRGrgUzzzOdCwLhDcdBUARodxFAEJkUnOIo+hURM/+jMShg 2SHQgYpBAVunR65ZQasXybAtujIeQMCQzuuzyqe1dCpTHA1OyToXESxbDCYponnxyM YCGC+VQRxC+yfbAWtwOOFBezo621X+YV/OPrIEsm+St9pT9s0+o2e1cf0CkzcD1Unl F8XLVKj2X96TXtr5i80NMERRqo66V4a0WWEXzMrJGT8KCFdk1HumxwiXS4UWsVXYox +BM8cNW9q+rNw== Content-Disposition: inline In-Reply-To: <20170216022910.GL1520@brightrain.aerifal.cx> X-Mailer: Mutt 1.7.0 X-Composer: Vim 7.4.2229 X-CMAE-Envelope: MS4wfIIZvyd8ndacfsYGD3Mx0MqyJHTKRmsDV1VsPbvi/OpcxHHAs9AWlwFm6RmDUuceE/ipc/wRLMXmqXoDPBy1yf5dDop9IKcwDyCExzpIyXoS87qIyZIg KyqpWrE/Qy2VKlTv6EnHbD+X/z5gyi1KHUKezICQLFX+5pQBQ7Ms181TuuaNCmRMxQtSTdHRS4DQZw== Xref: news.gmane.org gmane.linux.lib.musl.general:11048 Archived-At: On Wed 15 Feb 2017 at 18:29:11 PST Rich Felker wrote: > >Of course the other issue is that you're trying to produce >static-linked programs (where this wouldn't be an issue to begin with, >since your system gcc doesn't do pie with static linking, since glibc >can't handle it) but libtool is suppressing static linking. You can >fix this by passing both -static (which libtool needs to see) and >--static (which libtool doesn't know about, so it safely makes it >through to gcc without getting stripped by libtool). This is a >standard trick for fixing broken programs that use libtool. Adding --static to LDFLAGS solved the problem building the executables that come with libzip. I expect it will also work for the other libtool-using projects I've had trouble with. Thanks for the speedy reply (and, of course, for musl itself)!