From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13176 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: How to use MUSL without installing it? Date: Tue, 4 Sep 2018 11:40:20 +0200 Message-ID: <20180904094020.GM4418@port70.net> References: <20180903232441.0c0e1e868bac54e3b9b31226@asm32.info> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1536053912 32116 195.159.176.226 (4 Sep 2018 09:38:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2018 09:38:32 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: musl@lists.openwall.com Original-X-From: musl-return-13192-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 04 11:38:28 2018 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 1fx7n2-0008Gm-2y for gllmg-musl@m.gmane.org; Tue, 04 Sep 2018 11:38:28 +0200 Original-Received: (qmail 20411 invoked by uid 550); 4 Sep 2018 09:40:33 -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 20390 invoked from network); 4 Sep 2018 09:40:32 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20180903232441.0c0e1e868bac54e3b9b31226@asm32.info> Xref: news.gmane.org gmane.linux.lib.musl.general:13176 Archived-At: * John Found [2018-09-03 23:24:41 +0300]: > I am writing a script that to compile musl, then a program with musl, using the latest versions. > > I am doing it following way: > > mkdir muslsrc > tar --wildcards --strip-components 1 -C ./muslsrc/ -xzf ./musl*.tar.gz > cd muslsrc > ln -s /usr/bin/ar ./i386-ar > ln -s /usr/bin/ranlib ./i386-ranlib > ./configure --prefix=../musl --host=i386 CC="gcc -m32 -O3" i think you need . in PATH for this to work i think you can pass 'CROSS_COMPILE=' to configure and then you don't need such symlinks. > make > make install > cd .. > > Then I am compiling agains ./musl/ directory. > > But after "make" I have all needed files in ./muslsrc/ directory. > Is it possible to use them directly instead of making fake "installation"? no, the right way is to run make install (DESTDIR and --prefix works the usual way) there are only a small number of files that are copied this way, if you directly use the build directory then the target specific header files are not set up correctly, i think you can hack that around with a bits symlink and appropriate modifications to musl-gcc and the specs file, but such hacks are not guaranteed to work in the future.