From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13361 Path: news.gmane.org!.POSTED!not-for-mail From: K Jelesnianski Newsgroups: gmane.linux.lib.musl.general Subject: compiling SPECCPU2006 against Musl Date: Sat, 13 Oct 2018 17:47:50 -0400 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000078c52e0578232854" X-Trace: blaine.gmane.org 1539468605 11102 195.159.176.226 (13 Oct 2018 22:10:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 Oct 2018 22:10:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13377-gllmg-musl=m.gmane.org@lists.openwall.com Sun Oct 14 00:10:01 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gBS6h-0002mU-P3 for gllmg-musl@m.gmane.org; Sun, 14 Oct 2018 00:09:59 +0200 Original-Received: (qmail 8047 invoked by uid 550); 13 Oct 2018 22:12:08 -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 15760 invoked from network); 13 Oct 2018 21:48:19 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=smNci6DvKV9OWQapcVoiGGYY6D1mJgkeBiM1XMP/Co0=; b=pRTvAWMxTXPHw9IJM9+V5Ne5cR1QUE4R7SVAR4lvt1ZjuTC4nIqqIB/V6rRJ1V+7Cw kjYepUvn+f/IarLG+JeCB3SBVM8UB2EeUlMIQV5xmkfbKq9vDgSGSn2FrebzsLyhcNGa y/6nxYoY0zBbrsDy6RJMzfhS/Wm2jTrzhTg7au2KwcTEOcSEd/LuD9lrWGeuRU9nwEiP MZp0Cg+JtkVztVxBBmDRt93m9ulFBV11QZBO8oOatGaSGPKKghvhpuOMNXeJEbniaYGe BLoHYjM8SB6nNBW7mvSCAthWndGkATNs33Dk1xFId7BpCZdQwTcizJjpw/wffCM1VOfQ RsnA== X-Gm-Message-State: ABuFfojO29HSa0b0yHRFM66qiGRG1JUviAoFE+Wu7vNkUtiuZQjYnOKs qj4l59U9mG3uCiXQ7kCRn2HwybJCmeHLOBKtVkso8cn0SJAaDKta1/lDb81vsGRKD/9g33+8L+t YJS5Lwh3Yuj0rdEXfooU60LpFcbBCHevJoo+kmgPrzP3M X-Received: by 2002:a1f:453:: with SMTP id 80-v6mr4569788vke.57.1539467282214; Sat, 13 Oct 2018 14:48:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV631SlbpWZKbgJbBHAdcjlifQSCdogWmYXPXIYO2qHU4HCc0QSgKaI50FXLwGjPpxWgY/Ev2+YutI/6RqghEFak= X-Received: by 2002:a1f:453:: with SMTP id 80-v6mr4569783vke.57.1539467281738; Sat, 13 Oct 2018 14:48:01 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:13361 Archived-At: --00000000000078c52e0578232854 Content-Type: text/plain; charset="UTF-8" Dear mailing list, I am curious if anyone has any insight on how to link the SPECCPU2006 benchmarks against Lusl Libc. Reading FAQ I saw that Musl does *not* have C++ support out of the box but can still "hopefully" work in some cases against glibstdc++ I havent found any resources or guides on-line of people doing this. Anyways I am only focusing on the C implementation SPEC benchmarks and out of this subset I was still only able to compile a few. The following do not compile against MUSL: 400.perlbench 403.gcc 462.libquantum I tried to use both clang 6.0.0 and gcc and got the following error below (Dump at end of email). Any thoughts? for perlbench - at first was "undefined reference to __isnan" but then after adding -I/path/to/musl/install/include I got even more errors. I am using the -std=gnu89 flag since this was how SPEC documented its fix for a multiple definition error. The other 2 benchmarks show similar errors. Sincerely, K Jelesnianski Error Dump for perlbench: clang -c -o perlio.o -DSPEC_CPU -DNDEBUG -DPERL_CORE -O2 -fno-strict-aliasing -g -fPIC -fomit-frame-pointer -I/home/c/workspace/research/mardu/bin/include -DSPEC_CPU_LP64 -DSPEC_CPU_LINUX_X64 -std=gnu89 perlio.c In file included from perlio.c:50: In file included from ./perl.h:384: In file included from /home/c/workspace/research/mardu/bin/include/sys/types.h:70: /home/c/workspace/research/mardu/bin/include/endian.h:32:25: warning: '&' within '|' [-Wbitwise-op-parentheses] return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ~ ~~~~~~^~~~~~~ /home/c/workspace/research/mardu/bin/include/endian.h:32:25: note: place parentheses around the '&' expression to silence this warning return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ^ ( ) /home/c/workspace/research/mardu/bin/include/endian.h:32:41: warning: '&' within '|' [-Wbitwise-op-parentheses] return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ~ ~~~~~~^~~~~~~~~ /home/c/workspace/research/mardu/bin/include/endian.h:32:41: note: place parentheses around the '&' expression to silence this warning return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ^ ( ) /home/c/workspace/research/mardu/bin/include/endian.h:37:23: warning: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses] return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32); ~~~~~~~~~~~~~~^~~~~~~ /home/c/workspace/research/mardu/bin/include/endian.h:37:23: note: place parentheses around the '+' expression to silence this warning return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32); ^ ( ) perlio.c:2308:21: error: use of undeclared identifier 'O_TRUNC'; did you mean 'OP_TRANS'? oflags = O_CREAT | O_TRUNC; ^~~~~~~ OP_TRANS ./opnames.h:51:2: note: 'OP_TRANS' declared here OP_TRANS, /* 35 */ ^ perlio.c:2318:21: error: use of undeclared identifier 'O_APPEND' oflags = O_CREAT | O_APPEND; ^ perlio.c:3046:28: error: incomplete definition of type 'struct _IO_FILE' STDCHAR *eptr = (STDCHAR*)PerlSIO_get_ptr(s); ^~~~~~~~~~~~~~~~~~ ./iperlsys.h:305:29: note: expanded from macro 'PerlSIO_get_ptr' #define PerlSIO_get_ptr(f) FILE_ptr(f) ^~~~~~~~~~~ ./spec_config.h:814:30: note: expanded from macro 'FILE_ptr' # define FILE_ptr(fp) ((fp)->_IO_read_ptr) ~~~~^ /home/c/workspace/research/mardu/bin/include/bits/alltypes.h:356:16: note: forward declaration of 'struct _IO_FILE' typedef struct _IO_FILE FILE; ^ perlio.c:3054:20: error: incomplete definition of type 'struct _IO_FILE' if ((STDCHAR*)PerlSIO_get_ptr(s) != --eptr || ((*eptr & 0xFF) != ch)) { ^~~~~~~~~~~~~~~~~~ ./iperlsys.h:305:29: note: expanded from macro 'PerlSIO_get_ptr' #define PerlSIO_get_ptr(f) FILE_ptr(f) ^~~~~~~~~~~ --00000000000078c52e0578232854 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear mailing list,

I am curi= ous if anyone has any insight on how to link the SPECCPU2006 benchmarks aga= inst Lusl Libc. Reading FAQ I saw that Musl does *not* have C++ support out= of the box but can still "hopefully" work in some cases against = glibstdc++
I havent found any resources or guides on-line of peop= le doing this.

Anyways I am only focusing on t= he C implementation SPEC benchmarks and out of this subset I was still only= able to compile a few. The following do not compile against MUSL:
400.perlbench
403.gcc
4= 62.libquantum

I tried to use both c= lang 6.0.0 and gcc and got the following error below (Dump at end of email)= . Any thoughts?
= for perlbench= - at first was &= quot;undefined reference to __isnan" but then after adding -I/path/t= o/musl/install/include I got even more errors. I am using the -std=3Dgnu89 = flag since this was how SPEC documented its fix for a multiple definition e= rror. The other 2 benchmarks show similar errors.

Sincerely,
K Jelesniansk= i

Error Dump for perlbench= :
clang -c -o perlio.o -DSPEC_CPU -DNDE=
BUG -DPERL_CORE   -O2 -fno-strict-aliasing -g -fPIC -fomit-frame-pointer -I=
/home/c/workspace/research/mardu/bin/include       -DSPEC_CPU_LP64 -DSPEC_C=
PU_LINUX_X64 -std=3Dgnu89        perlio.c
In file included from perlio.c:50:                            =20
In file included from ./perl.h:384:                                        =
                           =20
In file included from /home/c/workspace/research/mardu/bin/include/sys/type=
s.h:70:                         =20
/home/c/workspace/research/mardu/bin/include/endian.h:32:25: warning: '=
&' within '|' [-Wbitwise-op-parentheses]   =20
        return __x>>24 | __x>>8&0xff00 | __x<<8&0=
xff0000 | __x<<24;  =20
                       ~ ~~~~~~^~~~~~~                      =20
/home/c/workspace/research/mardu/bin/include/endian.h:32:25: note: place pa=
rentheses around the '&' expression to silence this warning
        return __x>>24 | __x>>8&0xff00 | __x<<8&0=
xff0000 | __x<<24;
                               ^
                         (            )
/home/c/workspace/research/mardu/bin/include/endian.h:32:41: warning: '=
&' within '|' [-Wbitwise-op-parentheses]
        return __x>>24 | __x>>8&0xff00 | __x<<8&0=
xff0000 | __x<<24;
                                       ~ ~~~~~~^~~~~~~~~
/home/c/workspace/research/mardu/bin/include/endian.h:32:41: note: place pa=
rentheses around the '&' expression to silence this warning
        return __x>>24 | __x>>8&0xff00 | __x<<8&0=
xff0000 | __x<<24;
                                               ^
                                         (              )
/home/c/workspace/research/mardu/bin/include/endian.h:37:23: warning: opera=
tor '<<' has lower precedence than '+'; '+' w=
ill be evaluated first [-Wshift-op-parentheses]
        return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
               ~~~~~~~~~~~~~~^~~~~~~
/home/c/workspace/research/mardu/bin/include/endian.h:37:23: note: place pa=
rentheses around the '+' expression to silence this warning
        return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
                             ^
               (                  )
perlio.c:2308:21: error: use of undeclared identifier 'O_TRUNC'; di=
d you mean 'OP_TRANS'?
        oflags =3D O_CREAT | O_TRUNC;
                           ^~~~~~~
                           OP_TRANS
./opnames.h:51:2: note: 'OP_TRANS' declared here
        OP_TRANS,       /* 35 */
        ^
perlio.c:2318:21: error: use of undeclared identifier 'O_APPEND'
        oflags =3D O_CREAT | O_APPEND;
                           ^
perlio.c:3046:28: error: incomplete definition of type 'struct _IO_FILE=
'
        STDCHAR *eptr =3D (STDCHAR*)PerlSIO_get_ptr(s);
                                  ^~~~~~~~~~~~~~~~~~
./iperlsys.h:305:29: note: expanded from macro 'PerlSIO_get_ptr'
#define PerlSIO_get_ptr(f)              FILE_ptr(f)
                                        ^~~~~~~~~~~
./spec_config.h:814:30: note: expanded from macro 'FILE_ptr'
#   define FILE_ptr(fp) ((fp)->_IO_read_ptr)
                         ~~~~^
/home/c/workspace/research/mardu/bin/include/bits/alltypes.h:356:16: note: =
forward declaration of 'struct _IO_FILE'
typedef struct _IO_FILE FILE;
               ^
perlio.c:3054:20: error: incomplete definition of type 'struct _IO_FILE=
'
            if ((STDCHAR*)PerlSIO_get_ptr(s) !=3D --eptr || ((*eptr & 0=
xFF) !=3D ch)) {
                          ^~~~~~~~~~~~~~~~~~
./iperlsys.h:305:29: note: expanded from macro 'PerlSIO_get_ptr'
#define PerlSIO_get_ptr(f)              FILE_ptr(f)
                                        ^~~~~~~~~~~
<= span style=3D"font-size:8pt;font-family:Arial;color:rgb(0,0,0);background-c= olor:transparent;font-weight:400;font-style:normal;font-variant:normal;text= -decoration:none;vertical-align:baseline;white-space:pre-wrap" id=3D"gmail-= docs-internal-guid-37a4a504-7fff-adcf-2812-7de0c9925207">
--00000000000078c52e0578232854--