[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: err
From: |
slyich at gmail dot com |
Subject: |
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’ |
Date: |
Thu, 18 Aug 2022 20:44:32 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29477
--- Comment #2 from Sergei Trofimovich <slyich at gmail dot com> ---
(In reply to Vladimir Mezentsev from comment #1)
> SIGEV_THREAD_ID is defined in /usr/include/bits/sigevent-consts.h on my OL8:
> % grep -ns SIGEV_THREAD_ID /usr/include/*/*
> /usr/include/asm-generic/siginfo.h:409:#define SIGEV_THREAD_ID 4 /*
> deliver
> to thread */
> /usr/include/bits/sigevent-consts.h:36: SIGEV_THREAD_ID = 4 /* Send
> signal
> to specific thread.
> /usr/include/bits/sigevent-consts.h:38:#define SIGEV_THREAD_ID
> SIGEV_THREAD_ID
>
>
> What is an output of `grep -ns SIGEV_THREAD_ID /usr/include/*/*` on your
> build machine ?
musl is an alternative implementation of libc for linux. It does not try to be
fully compatible to GNU libc, but mostly targets POSIX. Thus a few
glibc-specific things are missing and some things are in different locations.
SIGEV_THREAD_ID is defined in
http://git.musl-libc.org/cgit/musl/tree/include/signal.h#n205:
include/signal.h:#define SIGEV_THREAD_ID 4
> Also what is an output of `grep -ns pwrite /usr/include/*` on your build
> machine ?
'pwrite' is defined in unistd.h
http://git.musl-libc.org/cgit/musl/tree/include/unistd.h#n204
But there is a catch: pwrite and pwrite64 are not different symbols and are
macro aliases:
ssize_t pwrite(int, const void *, size_t, off_t);
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
#define pwrite64 pwrite
#endif
Also, `dlvsym()` does not exist on musl, and GLIBC-specific symbol versions are
not available, thus things like the below don't work:
ptr = dlvsym (dlflag, "pthread_mutex_unlock", "GLIBC_2.0");
--
You are receiving this mail because:
You are on the CC list for the bug.