Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 13 Feb 2018 15:34:34 +0200
From: Dmitry Golovin <dima@...ovin.in>
To: musl <musl@...ts.openwall.com>
Subject: shmctl not found when compiling compiler-rt

Hi!

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);
                  ^~~~~~~~~~~~
    llvm/projects/compiler-rt/lib/msan/../interception/interception.h:162:34: note: expanded from macro 'REAL'
    # define REAL(x) __interception::PTR_TO_REAL(x)
                     ~~~~~~~~~~~~~~~~^
    llvm/projects/compiler-rt/lib/msan/../interception/interception.h:161:25: note: expanded from macro 'PTR_TO_REAL'
    # define PTR_TO_REAL(x) real_##x
                            ^
    <scratch space>:70:1: note: expanded from here
    real_shmctl
    ^
    llvm/projects/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:1706:1: note: 'real_ioctl' declared here
    INTERCEPTOR(int, ioctl, int d, unsigned long request, ...) {
    ^
    llvm/projects/compiler-rt/lib/msan/../interception/interception.h:213:3: note: expanded from macro 'INTERCEPTOR'
      DEFINE_REAL(ret_type, func, __VA_ARGS__) \
      ^
    llvm/projects/compiler-rt/lib/msan/../interception/interception.h:194:23: note: expanded from macro 'DEFINE_REAL'
          FUNC_TYPE(func) PTR_TO_REAL(func); \
                          ^
    llvm/projects/compiler-rt/lib/msan/../interception/interception.h:161:25: note: expanded from macro 'PTR_TO_REAL'
    # define PTR_TO_REAL(x) real_##x
                            ^
    <scratch space>:108:1: note: expanded from here
    real_ioctl
    ^

Can you please help me to understand why is it not compiling and how to make it compile again?

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.