mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Sérgio Marques" <sergio.rtmarques@gmail.com>
To: musl@lists.openwall.com
Subject: Why there's no __MUSL__ macro question
Date: Wed, 23 Mar 2016 13:08:16 +0000	[thread overview]
Message-ID: <CAHPF5DAFZkatiD=QnfkT6Ky2PLVku0PUP1FD_GuR5B04hj9LWA@mail.gmail.com> (raw)

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

Hi all,

I've seen that there's already a topic on

http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F

but I would like to understand the reasoning for not having it defined.

Maybe by explaining my use case someone can explain why the macro is not
needed:

I has installing an *R* package in an Alpine linux distribution that uses
musl. That R package needed to be compiled using musl

"Command failed (1)

Failed to run system command:

'/usr/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmpDPDGNf/Rcpp'
--library='/app/packrat/lib/x86_64-alpine-linux-musl/3.2.3' --install-tests
--no-docs --no-multiarch --no-demo

The command failed with output:
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** libs
x86_64-alpine-linux-musl-g++ -I/usr/lib/R/include -DNDEBUG
-I../inst/include/ -Os -fomit-frame-pointer    -fpic  -Os
-fomit-frame-pointer  -c Date.cpp -o Date.o
x86_64-alpine-linux-musl-g++ -I/usr/lib/R/include -DNDEBUG
-I../inst/include/ -Os -fomit-frame-pointer    -fpic  -Os
-fomit-frame-pointer  -c Module.cpp -o Module.o
x86_64-alpine-linux-musl-g++ -I/usr/lib/R/include -DNDEBUG
-I../inst/include/ -Os -fomit-frame-pointer    -fpic  -Os
-fomit-frame-pointer  -c Rcpp_init.cpp -o Rcpp_init.o
x86_64-alpine-linux-musl-g++ -I/usr/lib/R/include -DNDEBUG
-I../inst/include/ -Os -fomit-frame-pointer    -fpic  -Os
-fomit-frame-pointer  -c api.cpp -o api.o
api.cpp:40:30: fatal error: execinfo.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:141: recipe for target 'api.o' failed
make: *** [api.o] Error 1
ERROR: compilation failed for package 'Rcpp'
* removing '/app/packrat/lib/x87_64-alpine-linux-musl/3.2.3/Rcpp'"

It happens that the failure is todo with the fact that is no macro in
api.cpp which uniquely identifies we're in a distribution that is using
musl, so the compiler ends up executing some code invalid for that
arquitecture/distribution.

How are we expected to solve this kind of problem if not by using the
__MUSL__ macro?

Thanks in advance.

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

             reply	other threads:[~2016-03-23 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 13:08 Sérgio Marques [this message]
2016-03-23 13:28 ` Kurt H Maier
2016-03-23 14:17   ` Shiz
2016-03-23 15:05     ` 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='CAHPF5DAFZkatiD=QnfkT6Ky2PLVku0PUP1FD_GuR5B04hj9LWA@mail.gmail.com' \
    --to=sergio.rtmarques@gmail.com \
    --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).