From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7916 Path: news.gmane.org!not-for-mail From: John Mudd Newsgroups: gmane.linux.lib.musl.general Subject: Re: C++ questions Date: Tue, 9 Jun 2015 16:17:11 -0400 Message-ID: References: <20150605215616.GF10927@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ee2fabdfdce05181b72da X-Trace: ger.gmane.org 1433881068 5789 80.91.229.3 (9 Jun 2015 20:17:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Jun 2015 20:17:48 +0000 (UTC) To: musl , John Mudd Original-X-From: musl-return-7929-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jun 09 22:17:47 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Z2Pxx-00019e-Ld for gllmg-musl@m.gmane.org; Tue, 09 Jun 2015 22:17:45 +0200 Original-Received: (qmail 18058 invoked by uid 550); 9 Jun 2015 20:17:44 -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 18037 invoked from network); 9 Jun 2015 20:17:43 -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; bh=PemeibfvvpzIEhb/X++NMEwAU7XiDQVJ3lKM1v7AM5Q=; b=jAkrQgv1BUOC/cMRZrJs9YcH6GoH6f8zSHLiuhwSHBhsvPGOq4adlxwxSEGfohP7Yq 04JuVf0jCzQW26nn6TxrZYlID7y9D+EJC6Cdi5/5cxK4n3ggKA1yuNkzvDpLNu7jkbxn NQcSIKoXLuolwM0nuFmRV38fX5CO4vHjgslxQyiviD9uDSTZTZD3pglShuzdbG1QxcCg g1r9VE3O/PtSaUu40wvJlpq1cuoVi7Hf9oUnGIGtxURFKeU5Kb7BmfjWxBFJunZsdm9+ jnYbh8GqCVtkrhMGOVhhvdETbFUaLXnDT5D7xgKA0/Brdo8qkofqJVktMdiPt0AxCDWQ 6oxw== X-Received: by 10.107.11.156 with SMTP id 28mr29255537iol.18.1433881051788; Tue, 09 Jun 2015 13:17:31 -0700 (PDT) In-Reply-To: <20150605215616.GF10927@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:7916 Archived-At: --001a113ee2fabdfdce05181b72da Content-Type: text/plain; charset=UTF-8 On Fri, Jun 5, 2015 at 5:56 PM, Szabolcs Nagy wrote: > * John Mudd [2015-06-05 17:34:52 -0400]: > > Error loading shared library ld-linux.so.2: No such file or directory > > (needed by /usr/lib/i386-linux-gnu/libstdc++.so.6) > > > > create an empty ld-linux.so.2 > > gcc -o ld-linux.so.2 -xc -shared - > (nowadays toolchains sometimes add the dynamic linker to > elf DT_NEEDED, i dont know why, it's not really needed) > > > I looked at the notes about C++ in the musl faqs. For that I decided it > > might help if I built gcc in musl. Then everything will be musl-ized? I > > built gmp, mpfr and mpc. Started building gcc but got the following > error. > > > > /home/mudd/musl/gcc-4.9.2.obj/gcc/../../gcc-4.9.2/gcc/plugin.c:579: > > undefined reference to `dlopen' > > > > you have to patch gcc and use certain options to make it work > > musl-cross build scripts take care of if > (there are prebuilt toolchains too) > > > Before I go further, any opinions if I'm even headed in the right > direction? > > > > you may get away without building > Thanks again. Adding the empty ld-linux.so.2 helped. I also had to add libgcc_s.so.1 and the following _chk stubs. http://pastebin.com/TeieBKCE John --001a113ee2fabdfdce05181b72da Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On F= ri, Jun 5, 2015 at 5:56 PM, Szabolcs Nagy <nsz@port70.net> wrot= e:
* John Mudd <johnbmudd@gmail.com> [2015-06-05 17:34:52 -0400]:
> Error loading shared library ld-linux.so.2: No such f= ile or directory
> (needed by /usr/lib/i386-linux-gnu/libstdc++.so.6)
>

create an empty ld-linux.so.2

=C2=A0gcc -o ld-linux.so.2 -xc -shared - </dev/null

(nowadays toolchains sometimes add the dynamic linker to
elf DT_NEEDED, i dont know why, it's not really needed)

> I looked at the notes about C++ in the musl faqs. For that I decided i= t
> might help if I built gcc in musl. Then everything will be musl-ized? = I
> built gmp, mpfr and mpc. Started building gcc but got the following er= ror.
>
> /home/mudd/musl/gcc-4.9.2.obj/gcc/../../gcc-4.9.2/gcc/plugin.c:579: > undefined reference to `dlopen'
>

you have to patch gcc and use certain options to make it work

musl-cross build scripts take care of if
(there are prebuilt toolchains too)

> Before I go further, any opinions if I'm even headed in the right = direction?
>

you may get away without building


Thanks again. Adding the=C2=A0empty ld-linux.so.2 helped.= I also had to add=C2=A0libgcc_s.so.1 and the following _chk stubs.=C2=A0

--001a113ee2fabdfdce05181b72da--