mailing list of musl libc
 help / color / mirror / code / Atom feed
From: orc <orc@sibserver.ru>
To: musl@lists.openwall.com
Subject: Re: Hello
Date: Sat, 7 Jul 2012 16:07:40 +0800	[thread overview]
Message-ID: <20120707160740.49a91c85@sibserver.ru> (raw)
In-Reply-To: <35058.132.241.65.68.1341616457.squirrel@lavabit.com>

On Fri, 6 Jul 2012 16:14:17 -0700 (PDT)
idunham@lavabit.com wrote:

> >> > gtk2 will not work that way, I checked. One library in chain
> >> > requires libstdc++, libstdc++ defines 'unique' symbols (see
> >> > manual page of binutils nm) which musl linker cannot handle.
> >> > Additionally, there is much more missing symbols including
> >> > missing functions. But plain X11 apps worked (I checked xfontsel
> >> > and xlogo).
> >>
> >> Have you looked into building the apps/libs natively against musl
> >> except for the nvidia binary blob, to see if the blob works under
> >> that usage? I think that's a usage case that's a lot more
> >> applicable to real-world usage of musl, and in fact it's probably
> >> the first real reason anybody would be interested in having musl
> >> work with code that was built against glibc...
> The first step would probably be dropping a musl-compatible (generic,
> not gnu-linux) libstdc++ into the test environment.

Bootstrapping libstdc++ I think even more nightmarish than dealing with
pkg-config or autohell, since this library is part of gcc. So I went in
another way: I've taken my package cache and relinked gtk2 and pango,
now they do not depend on libstdc++ (since they do not import things
from that library. Why they were linked to it - is another open
question.)
After some dancing around undefined symbols I've got not-so-big list:

__res_init(), __res_iclose(), inet_nsap_ntoa(), __res_maybe_init(),
initstate_r(), random_r() and stuff related to pthread scheduling:
pthread_setschedparam(), pthread_getschedparam().

Since that gtk2 and it's stuff do not require libstdc++ to work I'll
try to build them against musl.

> > I mostly do building in KVM now to test how applications are
> > portable and collect the patches that will be needed when
> > transiting to musl-enabled system. I was busy with patching old gcc
> > and binutils these days, since I found that musl systems by default
> > are built with executable stack (GNU_STACK thing) enabled (binutils
> > issue). I will try that on host of course, but I generally dislike
> > cross-compiling even to same arch because of autotools and
> > pkg-config (will be required by gtk2 stuff
> I presume you know to use PKG_CONFIG_LIBDIR ? With that set,
> cross-compiling seemed fairly easy to me.

Did know about PKG_CONFIG_PATH, so looks like replacing default
directory will solve that problems when looked into, not found stuff
and tried to link with host libs.

> Also, I often set up a chroot with musl and build under that.  If
> you'd rather not build the whole chroot yourself, you can prepare a
> chroot and follow the installation notes for converting a glibc-based
> system, using the chroot environment instead of a full install (this
> works well with Debian).
> If you do this, make sure not to do a plain cp of the system
> libraries; this would mess up the sonames, since lib*.so must be
> symlinks to lib*.so.<version>.  It also really messes with ldconfig.

Converting existing system maybe possible, but I will prefer to rebuild
all the stuff from scratch with musl and (possibly in future) with
different compiler(s) (I really tired from gcc/binutils, but there
seems no any alternatives written in C and able to build major
software like gtk2 and Linux kernel). Converting will be possible when
musl will be binary compatible with glibc, but this is not primary
goal. As a bonus, maybe. One issue here was that binary nvidia blob
that can be needed even after rebuild on desktop, so missing interfaces
were not big deal with it. Other things can be patched/recompiled.

> 
> 



  parent reply	other threads:[~2012-07-07  8:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 12:01 Hello orc
2012-06-07 13:13 ` Hello John Spencer
2012-06-07 15:18   ` Hello orc
2012-06-07 16:29     ` Hello John Spencer
2012-06-07 16:19       ` Hello Rich Felker
2012-06-07 17:15         ` Hello orc
2012-06-08  3:31           ` Hello Rich Felker
2012-06-08  5:49             ` Hello Isaac Dunham
2012-06-08 12:28             ` Hello aep
2012-06-08 14:14               ` Hello Rich Felker
2012-06-08 16:17                 ` Hello aep
2012-06-08 16:11                   ` Hello Rich Felker
2012-06-09  2:05                   ` Hello Isaac Dunham
2012-07-05 17:24             ` Hello orc
2012-07-05 23:34               ` Hello Rich Felker
2012-07-06  6:06                 ` Hello orc
2012-07-06  6:26                   ` Hello Rich Felker
2012-07-06  8:22                     ` Hello orc
2012-07-06 23:14                       ` Hello idunham
2012-07-07  0:57                         ` Hello Rich Felker
2012-07-07  8:07                         ` orc [this message]
2012-07-07 15:54                           ` Hello idunham
2012-07-08  9:09                             ` Hello orc
2012-06-07 17:45         ` Hello Christian Neukirchen
2012-06-07 18:03       ` Hello Jens Staal
2012-06-07 19:10         ` Hello John Spencer
2012-06-07 17:33     ` Hello Jens Staal
2012-06-07 17:59       ` Hello orc
2012-06-20  7:29     ` Hello orc
2012-06-23  1:43       ` Hello idunham
2012-06-23  1:51         ` Hello Rich Felker
2012-06-25 12:09           ` Hello orc
2012-06-25 11:59         ` Hello orc
2012-06-25 13:53           ` Hello idunham
2012-07-22 23:09 Hello idunham
2012-07-23  2:01 ` Hello Rich Felker
2012-07-23  3:49   ` Hello idunham
2012-07-23 21:01     ` Hello 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=20120707160740.49a91c85@sibserver.ru \
    --to=orc@sibserver.ru \
    --cc=musl@lists.openwall.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).