mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Kevyn-Alexandre Paré" <kapare@rogue-research.com>
To: CLFS development discussion <clfs-dev@lists.cross-lfs.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	musl@lists.openwall.com,
	CLFS Support <clfs-support@lists.cross-lfs.org>,
	Gregor Richards <gr@purdue.edu>
Subject: Re: [Clfs-dev] CLFS embedded book switches to musl-libc
Date: Tue, 22 Oct 2013 14:58:24 -0400	[thread overview]
Message-ID: <CACgAsMdTDBH2cejyPG7p2PL7bqtf7rSCfzskJjcCKG72L8rO8A@mail.gmail.com> (raw)
In-Reply-To: <525EF012.1050606@bradfordembedded.com>

Hi Andrew,

So far so good! Very interesting that you passed to musl and I'm happy
to start playing with it!

Couple of question about Manual:
You refer to glibc [1] should you replace that glibc with musl libc or
glibc(musl) our simply libc?

For the musl installation [2], the make install have an error that
seem to be fix with the next command you propose:

./tools/install.sh -D -m 644 lib/crt1.o
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/crt1.o
./tools/install.sh -D -m 644 lib/Scrt1.o
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/Scrt1.o
./tools/install.sh -D -m 644 lib/crti.o
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/crti.o
./tools/install.sh -D -m 644 lib/crtn.o
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/crtn.o
./tools/install.sh -D -m 644 lib/libc.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libc.a
./tools/install.sh -D -m 755 lib/libc.so
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libc.so
./tools/install.sh -D -m 644 lib/libm.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libm.a
./tools/install.sh -D -m 644 lib/librt.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/librt.a
./tools/install.sh -D -m 644 lib/libpthread.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libpthread.a
./tools/install.sh -D -m 644 lib/libcrypt.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libcrypt.a
./tools/install.sh -D -m 644 lib/libutil.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libutil.a
./tools/install.sh -D -m 644 lib/libxnet.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libxnet.a
./tools/install.sh -D -m 644 lib/libresolv.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libresolv.a
./tools/install.sh -D -m 644 lib/libdl.a
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libdl.a
./tools/install.sh -D -l
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/lib/libc.so
/lib/ld-musl-arm.so.1 || true
ln: failed to create symbolic link `/lib/ld-musl-arm.so.1.tmp.47054':
Permission denied
./tools/install.sh -D -m 644 arch/arm/bits/alltypes.h
/mnt/clfs/cross-tools/armv7a-unknown-linux-musleabi/include/bits/alltypes.h

So when you describe symlink is it releated to this error:

ln -s libc.so ${CLFS}/cross-tools/${CLFS_TARGET}/ld-musl-arm.so.1

Should this be replace by this and be put in the lib folder?:

ln -s ${CLFS}/cross-tools/${CLFS_TARGET}/lib/libc.so
${CLFS}/cross-tools/${CLFS_TARGET}/lib/ld-musl-arm.so.1

Should we not simply create patch for Makefile as something like that?:
diff -Naur Makefile Makefile.new
--- Makefile 2013-09-23 17:01:11.000000000 -0400
+++ Makefile.new 2013-10-22 14:51:10.216785876 -0400
@@ -14,7 +14,6 @@
 prefix = /usr/local/musl
 includedir = $(prefix)/include
 libdir = $(prefix)/lib
-syslibdir = /lib

 SRCS = $(sort $(wildcard src/*/*.c arch/$(ARCH)/src/*.c))
 OBJS = $(SRCS:.c=.o)
@@ -50,7 +49,7 @@
 ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS)
 ALL_TOOLS = tools/musl-gcc

-LDSO_PATHNAME = $(syslibdir)/ld-musl-$(ARCH)$(SUBARCH).so.1
+LDSO_PATHNAME = ld-musl-$(ARCH)$(SUBARCH).so.1

 -include config.mak

@@ -157,7 +156,7 @@
  $(INSTALL) -D -m 644 $< $@

 $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
- $(INSTALL) -D -l $(libdir)/libc.so $@ || true
+ $(INSTALL) -D -l $(libdir)/libc.so $(libdir)/$@ || true

 install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if
$(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)


I'm currently cross compiling busybox if I see something else I will
keep you updated!

Best Regards,

-KA


[1]: http://cross-lfs.org/view/clfs-embedded/arm/introduction/how.html
[2]: http://cross-lfs.org/view/clfs-embedded/arm/cross-tools/libc.html

On Wed, Oct 16, 2013 at 3:59 PM, Andrew Bradford
<andrew@bradfordembedded.com> wrote:
> As an FYI: the Cross Linux From Scratch embedded book has switched from
> uClibc to musl as of today.
>
> http://cross-lfs.org/view/clfs-embedded/
>
> I've done some build testing for arm but welcome more people who are
> interested in testing or submitting patches to fix errors.  It's still
> early-days for musl in CLFS so there's bound to be plenty of issues to fix.
>
> Many thanks to all of the musl developers!
>
> I also found patches from Gregor Richards's musl-cross and Thomas
> Petazzoni's buildroot work very helpful.
>
> Thanks!
> Andrew
> _______________________________________________
> Clfs-dev mailing list
> Clfs-dev@lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org

  parent reply	other threads:[~2013-10-22 18:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 19:59 Andrew Bradford
2013-10-16 20:38 ` John Spencer
2013-10-16 20:46   ` Andrew Bradford
2013-10-16 21:22     ` John Spencer
2013-10-17 12:50       ` Andrew Bradford
2013-10-22 18:58 ` Kevyn-Alexandre Paré [this message]
2013-10-22 21:08   ` Re: [Clfs-dev] " Rich Felker
2013-10-23 11:07     ` [musl] " Andrew Bradford
2013-10-23 14:13       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACgAsMdTDBH2cejyPG7p2PL7bqtf7rSCfzskJjcCKG72L8rO8A@mail.gmail.com \
    --to=kapare@rogue-research.com \
    --cc=clfs-dev@lists.cross-lfs.org \
    --cc=clfs-support@lists.cross-lfs.org \
    --cc=gr@purdue.edu \
    --cc=musl@lists.openwall.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).