From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12494 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?B?TWF0w7rFoSBPbGVrxaHDoWs=?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: shmctl not found when compiling compiler-rt Date: Tue, 13 Feb 2018 15:30:45 +0100 Message-ID: References: <220501518528874@web47o.yandex.ru> <20180213141524.GZ4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="94eb2c1c1be6133d6e056518d7ed" X-Trace: blaine.gmane.org 1518532158 20195 195.159.176.226 (13 Feb 2018 14:29:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Feb 2018 14:29:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12510-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 13 15:29:14 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 1elbZn-0003t2-VY for gllmg-musl@m.gmane.org; Tue, 13 Feb 2018 15:28:56 +0100 Original-Received: (qmail 7497 invoked by uid 550); 13 Feb 2018 14:30:59 -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 7465 invoked from network); 13 Feb 2018 14:30:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=riMe2g5VMd3qAPtKR2QThZ86ZSxskIFUQuv8ypRBv3w=; b=pNjh6VcVlAeoZVxsNS6I/Gh5PyvWxnbiUnV1rdKg0x77LkX6Bu9V9YV1vTxg1cY4JY pq6XSN645RciXubCsjYI7brnb8nv/DcfWziwgjGjfFvphZvkDhW5EyA8iMSZWjRadbAe AnTIlDLWRO/xa8T/hkYNG8hE26IJFOu3nwQ2iVlOhJFppDaRCowMP1d2T3M2h+floHC5 ARXGVAFa2mbAl2+9OZFM2P+Dy97JgPoU/6zMxgZJSBcFvcfRyyOjZB0lExd078HqHV54 VmbsJ3rW9GoUXblJCmJlJ974NO9g7RrvpwlDaqTJLA6S8odFMHTL7owW+EcGH9ckfzWH JJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=riMe2g5VMd3qAPtKR2QThZ86ZSxskIFUQuv8ypRBv3w=; b=EZbeLhewSorqe+rm5Bv4I2IuH56aPUq8PTAy9W4UQCgjimGwfz5F/eWPgf1kIqWp4V 4uTXrrqBX2yieF1joTHyJLZO0vTiZyX9tIDdVU/bDc869UdGubGnw8FRXVTq0EX0bQHO U6OLTwdkgtQSPKEzLrckGJWNwYyXKrNIteTszzCr4R01B9r8LLjUgleg+RxWkwaZPiIa pmO+of67qMka3gk8HDMLWvXY4r9KZ3uSEHC4StewR7OXhmCmHU6QiQ3gj+RfFmmzfifV Gfs7GOb7vkiMZBQeSBwalnKmOmIOGm8jdFsjW0hSte3jHMWJ6n9dHAnB+mq4Ip1B6oxi SMRg== X-Gm-Message-State: APf1xPBOsn62Iqhdau5CEtfdJnKSBTqbdAiwfIh23e9UtCPRKLEgbsTt xHBjrME93HgqHAAFXIQjWvbCPrUCOSsBFKGhY+Q= X-Google-Smtp-Source: AH8x225FJ/BBHgSKyGTIhMLB/3r0u3p8WHJilHWEbilnkAX9o2s0rMONU1g+uOSzK9/ZccL48oEor6RPKFPqPRt5WSM= X-Received: by 10.157.67.69 with SMTP id y5mr1064185oti.174.1518532245525; Tue, 13 Feb 2018 06:30:45 -0800 (PST) In-Reply-To: <20180213141524.GZ4418@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:12494 Archived-At: --94eb2c1c1be6133d6e056518d7ed Content-Type: multipart/alternative; boundary="94eb2c1c1be6133d69056518d7eb" --94eb2c1c1be6133d69056518d7eb Content-Type: text/plain; charset="UTF-8" Try this patch to correctly link compiler-rt. 2018-02-13 15:15 GMT+01:00 Szabolcs Nagy : > * Dmitry Golovin [2018-02-13 15:34:34 +0200]: > > I'm trying to compile compiler-rt with musl and it used to be fine, but > I can't succeed with recent versions of compiler-rt. > > > > The compilation fails because of the lack of real_shmctl while musl > clearly has shmctl: http://git.musl-libc.org/cgit/ > musl/tree/src/ipc/shmctl.c > > > > Here is the complete output: > > > > llvm/projects/compiler-rt/lib/msan/msan_interceptors.cc:1446:15: > error: no member named 'real_shmctl' in namespace '__interception'; did you > mean 'real_ioctl'? > > int res = REAL(shmctl)(shmid, shmctl_ipc_stat, &ds); > > ^~~~~~~~~~~~ > > there should be a > > DECLARE_REAL(int, shmctl, int shmid, int cmd, void *buf) > > in that file which defines __interception::real_shmctl. > > > To compile without glibc on linux using this patch: > > https://github.com/tpimh/ngtc/blob/alpine/patch/compiler-rt- > 01-sanitizer-nongnu.patch > > > > Regards, > > Dmitry > --94eb2c1c1be6133d69056518d7eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Try this patch to correctly link compiler-rt.

2018-02-13 15:15 GMT+01:= 00 Szabolcs Nagy <nsz@port70.net>:
* Dmitry Golovin <dima@golovin.= in> [2018-02-13 15:34:34 +0200]:
> I'm trying to compile compiler-rt with musl and i= t used to be fine, but I can't succeed with recent versions of compiler= -rt.
>
> The compilation fails because of the lack of real_shmctl while musl cl= early has shmctl: http://git.musl-libc.org/c= git/musl/tree/src/ipc/shmctl.c
>
> Here is the complete output:
>
>=C2=A0 =C2=A0 =C2=A0llvm/projects/compiler-rt/lib/msan/msan_interc= eptors.cc:1446:15: error: no member named 'real_shmctl' in nam= espace '__interception'; did you mean 'real_ioctl'?
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int res =3D REAL(shmctl)(shmid, shmct= l_ipc_stat, &ds);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^~= ~~~~~~~~~~

there should be a

DECLARE_REAL(int, shmctl, int shmid, int cmd, void *buf)

in that file which defines __interception::real_shmctl.

> To compile without glibc on linux using this patch:
> https://gi= thub.com/tpimh/ngtc/blob/alpine/patch/compiler-rt-01-sanitizer-no= ngnu.patch
>
> Regards,
> Dmitry

--94eb2c1c1be6133d69056518d7eb-- --94eb2c1c1be6133d6e056518d7ed Content-Type: application/octet-stream; name="compiler-rt.patch" Content-Disposition: attachment; filename="compiler-rt.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jdlqvx6c0 LS0tIGEvY29uZmlndXJlCisrKyBiL2NvbmZpZ3VyZQpAQCAtNTk3LDcgKzU5Nyw4IEBACiAKICMg RmluZCBjb21waWxlciBydW50aW1lIGxpYnJhcnkKIHRlc3QgLXogIiRMSUJDQyIgJiYgdHJ5bGRm bGFnIExJQkNDIC1sZ2NjICYmIHRyeWxkZmxhZyBMSUJDQyAtbGdjY19laAotdGVzdCAteiAiJExJ QkNDIiAmJiB0cnlsZGZsYWcgTElCQ0MgLWxjb21waWxlcl9ydAordGVzdCAteiAiJExJQkNDIiAm JiB0cnlfbGliY2M9YCRDQyAtcHJpbnQtbGliZ2NjLWZpbGUtbmFtZSAyPi9kZXYvbnVsbGAgXAor ICAgICAgICAgICAgICAgICAmJiB0cnlsZGZsYWcgTElCQ0MgIiR0cnlfbGliY2MiCiB0ZXN0IC16 ICIkTElCQ0MiICYmIHRyeV9saWJjYz1gJENDIC1wcmludC1maWxlLW5hbWU9bGlicGNjLmEgMj4v ZGV2L251bGxgIFwKICAgICAgICAgICAgICAgICAgJiYgdHJ5bGRmbGFnIExJQkNDICIkdHJ5X2xp YmNjIgogcHJpbnRmICJ1c2luZyBjb21waWxlciBydW50aW1lIGxpYnJhcmllczogJXNcbiIgIiRM SUJDQyIK --94eb2c1c1be6133d6e056518d7ed--