From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9735 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?S=C3=A9rgio_Marques?= Newsgroups: gmane.linux.lib.musl.general Subject: Why there's no __MUSL__ macro question Date: Wed, 23 Mar 2016 13:08:16 +0000 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3a865cebd01f052eb70503 X-Trace: ger.gmane.org 1458739132 8229 80.91.229.3 (23 Mar 2016 13:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 13:18:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9748-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 23 14:18:51 2016 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 1aiigS-0005Ks-6g for gllmg-musl@m.gmane.org; Wed, 23 Mar 2016 14:18:48 +0100 Original-Received: (qmail 10171 invoked by uid 550); 23 Mar 2016 13:18:45 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3508 invoked from network); 23 Mar 2016 13:08:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=UpGVhkMa3UXeiFr6AanbHfri2S6JbDEPqefIMiDcKGc=; b=ubU7UsfhfENxfywdlh3H7dZwdHuNpzh8vgqn4mx4PFLmD4IEvktiw6ml94a2qYdHvr qGdX0F//AO2BeaCXgYWYsxDXQXYlPCtwrrMM/iaHoq9N+7Ll4m91QB1vXeDj2/zbIS5K 71FF9I6wBkIP26ceiVdli6dDzKITJBVG6enBfSBe9PQ0Z/Cuzv8pQoWhCt6TY3ZdfPgM G4R7RKw/aEanVka1mKSLYFJT4cDHxepGsBB61YKo++vcuAe8oOz31zttsyQTURYdQ/fP hQUse6Kdj6YNDYOfVTFZep7UR0xfqbFMmmlHRyek3p2OFjeRvDgX/PVfC27DhmVO8MVS UDsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=UpGVhkMa3UXeiFr6AanbHfri2S6JbDEPqefIMiDcKGc=; b=jP6/95qzrEW8vT8IWqcl0+oOt0IqAii37/zDsnhAzlvrb/3uS1gz7O/t1bkgmGw/6E 75Y7+mwaECDEdJpp9HS01PfOaY7WBVABFw8Du96DOQ+nn066Q+YWSgwIZigHXCWmfQED TMQSoxFIXawUqRqI496jDQhEkSAbMG7PQs0j879JZ4CAv8AdZBlVreZzh6ulOaqJz1CY +rEE2lG2PVJTgjFEPO75CORHDv/u9AxBOhnwXEA7wwVUj8BpPXZ9HpOIAwpbar+w4n6a UfPLHHwbco6+s7EWBnCgoUc0keeG+F7uKd0OLnOIcm0lOGUdxmYXD9PRPz7TB01rSv7J lkAQ== X-Gm-Message-State: AD7BkJKkSuEAJwf+uKXOxqI+GJE6sb+7VBz5Shfu+oHfpgj+iD51jkf9TBjdCLKQj7aNhwQe2Aa3KIZbExcgwQ== X-Received: by 10.112.128.225 with SMTP id nr1mr1169742lbb.101.1458738496784; Wed, 23 Mar 2016 06:08:16 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:9735 Archived-At: --047d7b3a865cebd01f052eb70503 Content-Type: text/plain; charset=UTF-8 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. --047d7b3a865cebd01f052eb70503 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

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


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 pac= kage needed to be compiled using musl

"C= ommand failed (1)

Failed to run system command:

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

The command failed with output:
* install= ing *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 =C2=A0 =C2=A0-fpic =C2=A0-Os -fomit-frame-pointer = =C2=A0-c Date.cpp -o Date.o
x86_64-alpine-linux-musl-g++ -I/usr/l= ib/R/include -DNDEBUG -I../inst/include/ -Os -fomit-frame-pointer =C2=A0 = =C2=A0-fpic =C2=A0-Os -fomit-frame-pointer =C2=A0-c Module.cpp -o Module.o<= /div>
x86_64-alpine-linux-musl-g++ -I/usr/lib/R/include -DNDEBUG -I../i= nst/include/ -Os -fomit-frame-pointer =C2=A0 =C2=A0-fpic =C2=A0-Os -fomit-f= rame-pointer =C2=A0-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 =C2=A0 =C2=A0-fpic =C2=A0-Os -fomit-frame-pointer =C2=A0-c ap= i.cpp -o api.o
api.cpp:40:30: fatal error: execinfo.h: No such fi= le 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&#= 39;
* removing '/app/packrat/lib/x87_64-alpine-linux-musl/3.2= .3/Rcpp'"

It happens that the failu= re is todo with the fact that is no macro in api.cpp which uniquely identif= ies 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.
=

--047d7b3a865cebd01f052eb70503--