Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Sep 2018 14:34:39 +0300
From: John Found <>
Subject: Re: How to use MUSL without installing it?

On Tue, 4 Sep 2018 11:40:20 +0200
Szabolcs Nagy <> wrote:

> * 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

Well, it works this way actually.

> i think you can pass 'CROSS_COMPILE=' to configure
> and then you don't need such symlinks.
What value should I set CROSS_COMPILE to? i386?

> > 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.

Well, I will keep it the right way then. BTW, "make install"
tries to create symlink for in /usr/lib/ directory
How to prevent this attempt?

John Found <>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.