Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACgAsMdTDBH2cejyPG7p2PL7bqtf7rSCfzskJjcCKG72L8rO8A@mail.gmail.com>
Date: Tue, 22 Oct 2013 14:58:24 -0400
From: Kevyn-Alexandre Paré <kapare@...ue-research.com>
To: CLFS development discussion <clfs-dev@...ts.cross-lfs.org>
Cc: musl@...ts.openwall.com, CLFS Support <clfs-support@...ts.cross-lfs.org>, 
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>, Gregor Richards <gr@...due.edu>
Subject: Re: [Clfs-dev] CLFS embedded book switches to musl-libc

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@...dfordembedded.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@...ts.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org

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.