mailing list of musl libc
 help / color / mirror / code / Atom feed
* using musl with a c++ library.
@ 2016-03-29  9:02 Rashad Kanavath
  2016-03-29 10:26 ` Shiz
  0 siblings, 1 reply; 3+ messages in thread
From: Rashad Kanavath @ 2016-03-29  9:02 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

How do I use musl with a c++ library.?  Does anybody tried  to use g++
using musl?

From musl FAQ,

Be aware that, "out of the box", the wrapper only supports C applications,
not C++. This is because the C++ libraries and headers are missing from the
musl include/library path. The existing libstdc++ is actually compatible
with musl in most cases and could be used by copying it into the musl
library path, but the C++ header files are usually not compatible. One
option may be rebuilding just libstdc++ against musl; however, if C++
support is needed, it's recommended just to build a native toolchain
targetting musl.

should I rebuild just libstdc++ using musl-gcc wrapper script and use that
libstdc++ ?.


Also Is it possible to distribute musl with an application package.
Currently I have a self-extracting archive which uses an older version of
glibc. so it will run on any platform that has a glibc version higher that
it was build (2.4). If I use musl and is able to distribute it along with
my application package, Then I don't have to rely on anything other than
linux kernel version on the target platform.


-- 
Regards,
   Rashad

[-- Attachment #2: Type: text/html, Size: 1488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using musl with a c++ library.
  2016-03-29  9:02 using musl with a c++ library Rashad Kanavath
@ 2016-03-29 10:26 ` Shiz
  2016-03-29 11:41   ` Rashad Kanavath
  0 siblings, 1 reply; 3+ messages in thread
From: Shiz @ 2016-03-29 10:26 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]


> On 29 Mar 2016, at 11:02, Rashad Kanavath <mohammedrashadkm@gmail.com> wrote:
> 
> should I rebuild just libstdc++ using musl-gcc wrapper script and use that libstdc++ ?.

I believe the current recommendation is to not use musl-gcc at all for C++ stuff,
but just build a proper musl-native toolchain. Recipes for such can be found at [1] and [2].
musl-gcc is just a wrapper for convenience, but definitely not a replacement for a proper
native toolchain.

> Also Is it possible to distribute musl with an application package. Currently I have a self-extracting archive which uses an older version of glibc. so it will run on any platform that has a glibc version higher that it was build (2.4). If I use musl and is able to distribute it along with my application package, Then I don't have to rely on anything other than linux kernel version on the target platform.

Yes, as musl is licensed under the MIT license, this is allowed.
You could even statically link against it to be able to ship just a single binary file.

- Shiz

[1]: https://bitbucket.org/GregorR/musl-cross
[2]: https://github.com/richfelker/musl-cross-make

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using musl with a c++ library.
  2016-03-29 10:26 ` Shiz
@ 2016-03-29 11:41   ` Rashad Kanavath
  0 siblings, 0 replies; 3+ messages in thread
From: Rashad Kanavath @ 2016-03-29 11:41 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

Hello Shiz,

Thanks for your reply. I will try links you said and let you know how it
goes..

On Tue, Mar 29, 2016 at 12:26 PM, Shiz <hi@shiz.me> wrote:

>
> > On 29 Mar 2016, at 11:02, Rashad Kanavath <mohammedrashadkm@gmail.com>
> wrote:
> >
> > should I rebuild just libstdc++ using musl-gcc wrapper script and use
> that libstdc++ ?.
>
> I believe the current recommendation is to not use musl-gcc at all for C++
> stuff,
> but just build a proper musl-native toolchain. Recipes for such can be
> found at [1] and [2].
> musl-gcc is just a wrapper for convenience, but definitely not a
> replacement for a proper
> native toolchain.
>
> > Also Is it possible to distribute musl with an application package.
> Currently I have a self-extracting archive which uses an older version of
> glibc. so it will run on any platform that has a glibc version higher that
> it was build (2.4). If I use musl and is able to distribute it along with
> my application package, Then I don't have to rely on anything other than
> linux kernel version on the target platform.
>
> Yes, as musl is licensed under the MIT license, this is allowed.
> You could even statically link against it to be able to ship just a single
> binary file.
>
> - Shiz
>
> [1]: https://bitbucket.org/GregorR/musl-cross
> [2]: https://github.com/richfelker/musl-cross-make
>



-- 
Regards,
   Rashad

[-- Attachment #2: Type: text/html, Size: 2126 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-29 11:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29  9:02 using musl with a c++ library Rashad Kanavath
2016-03-29 10:26 ` Shiz
2016-03-29 11:41   ` Rashad Kanavath

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).