From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5938 Path: news.gmane.org!not-for-mail From: "piranna@gmail.com" Newsgroups: gmane.linux.lib.musl.general Subject: Re: static build and dlopen Date: Wed, 27 Aug 2014 19:10:35 +0200 Message-ID: References: <20140827164309.GO12888@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409159477 2519 80.91.229.3 (27 Aug 2014 17:11:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 17:11:17 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5945-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 27 19:11:11 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XMgkV-0006rC-Cu for gllmg-musl@plane.gmane.org; Wed, 27 Aug 2014 19:11:07 +0200 Original-Received: (qmail 22252 invoked by uid 550); 27 Aug 2014 17:11:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 22244 invoked from network); 27 Aug 2014 17:11:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=wk7pMPLc2TgSC2zgRazi4zIzMp1k3b8pyJ9spqw6Lms=; b=vf+7E+iFzKqKgB6nCbhnXZNgyDr9lv6ZFBgNMXh2QTtQrhLvCbiZezbJd7NoSAv7gq N7g505zkU2UWvY0DtAf6KZ0VdjtC5iiLfXo1lzp7HXljUBNX60ifWB+vxJYxeTiDH4Qe QgBUhXfMv/WtOaRw2TC5kUl4AJ6yHY/toOtyDzOfioAYm3i1u2uwQ+nHFHdmQ4MHZ0lf F52TGcWIb671MvehwThvTN0WeDj6XMgl7W0TuRwOks+TtEBEC0277smkDBFzgav7YNFl opIB29qR5ow3STEkEEUPyoqRIZ43QaO6Td6LSzynPAsaVZQsJYirC3JijKBkolPp911E jybA== X-Received: by 10.180.184.99 with SMTP id et3mr30814373wic.31.1409159455213; Wed, 27 Aug 2014 10:10:55 -0700 (PDT) In-Reply-To: <20140827164309.GO12888@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:5938 Archived-At: > As for a possible workaround, you can link your program dynamically > (possibly including most of the libraries that your modules _won't_ > need to reference as static-linked in the main program binary) and > include a wrapper script, or wrapper static-linked-binary, to exec > your program explicitly via the dynamic linker, as in: > > /path/to/ld-musl-i386.so.1 -- /path/to/your/node "$@" > > or similar. This avoids the need to have musl "installed" on the > target system; everything can be in a self-contained directory. I know > some users are already doing something like this for deployments; > maybe at some point we'll think about making some official tools to > make it easier. Yes, I though about this option before, has a dumb statically linked executable to work as PID 1 that just only exec Node.js and wait until it finishes, so I can use a standard dynamically linked one and do whatever I want, but it's more like an ugly hack and since I was already thinking to use a statically linked Node.js to make simpler the filesystem layout, then I followed that path. It's not what I wanted, but seems it would be the easiest path. At least I've learn a lot the last week while fighting with this things... :-) --=20 "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." =E2=80=93 Linus Tordvals, creador del sistema operativo Linux