[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 Vladimir Mezentsev changed: What|Removed |Added Status|WAITING |SUSPENDED --- Comment #10 from Vladimir Mezentsev --- Need to port gprofng on musl. See bug 30779. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #9 from Sourceware Commits --- The master branch has been updated by Vladimir Mezentsev : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=abb27dd124fd8d8a879ff667776bbf22422f464e commit abb27dd124fd8d8a879ff667776bbf22422f464e Author: Vladimir Mezentsev Date: Fri Aug 23 13:43:18 2024 -0700 Disable gprofng build for *musl* I disable gprofng until gprofng is ported to musl. gprofng/ChangeLog 2024-08-22 Vladimir Mezentsev . PR gprofng/30779 PR gprofng/29593 PR gprofng/29477 * configure.ac: Disable gprofng build for *musl*. * configure: Rebuild. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 Kurt Goebel changed: What|Removed |Added Severity|normal |enhancement -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 Vladimir Mezentsev changed: What|Removed |Added See Also||https://sourceware.org/bugz ||illa/show_bug.cgi?id=30779 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #8 from Sergei Trofimovich --- Good question. Looking around it looks like musl elected not to implement it: https://www.openwall.com/lists/musl/2018/01/29/2 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #7 from Vladimir Mezentsev --- I fixed build issues. But the run time problem is not fixed. getcontext() is absent in libc on musl. Why ? -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Vladimir Mezentsev : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fe39ffdc202f04397f31557f17170b40bc42b77a commit fe39ffdc202f04397f31557f17170b40bc42b77a Author: Vladimir Mezentsev Date: Wed Sep 14 01:11:45 2022 -0700 gprofng: fix build issues on musl gprofng/ChangeLog 2022-09-14 Vladimir Mezentsev PR gprofng/29477 * configure.ac: Set __MUSL_LIBC. * configure: Rebuild. * common/config.h.in: Rebuild. * src/collector_module.h: Fix compiler errors because mmap64, open64, pwrite64 are macros and getcontext() is absent on musl. * libcollector/collector.c: Likewise. * libcollector/hwprofile.c: Likewise. * libcollector/iolib.c: Likewise. * libcollector/libcol_util.c: Likewise. * libcollector/linetrace.c: Likewise. * libcollector/memmgr.c: Likewise. * libcollector/profile.c: Likewise. * libcollector/unwind.c: Likewise. * libcollector/dispatcher.c: Likewise. * src/Experiment.cc: Likewise. * libcollector/collector.h: Use dlsym() because dlvsym() is not defined on musl. * libcollector/iotrace.c: Remove interposition of versioned functions. * libcollector/mmaptrace.c: Likewise. * libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings. * libcollector/jprofile.c: Likewise. * libcollector/synctrace.c: Include "collector.h". * src/Print.cc: Use get_basename() because basename() is not defined on musl. * common/hwcdrv.c: Fix -Wformat= warnings. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 Kurt Goebel changed: What|Removed |Added Priority|P2 |P3 CC||kurt.goebel at oracle dot com -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #5 from Sam James --- You can also try, per #musl on IRC's recommendations, http://musl.cc/ which is designed for this sort of thing. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #4 from Sergei Trofimovich --- Yeah, getting musl toolchain is trickier than glibc's. I suggest using a chroot (or equivalent) of linux distribution that already supports it. I'm personally using nixpkgs. More conventional FHS-style distribution using musl would be adelie. Full session to reproduce the failure there: # Get smallest rootfs from https://www.adelielinux.org/download/ (10MB), # unpack and and enter the chroot: $ mkdir /tmp/repro && cd /tmp/repro $ wget https://distfiles.adelielinux.org/adelie/1.0/iso/rc2/adelie-rootfs-mini-x86_64-1.0-rc2.txz $ sudo tar xf adelie-rootfs-mini-x86_64-1.0-rc2.txz $ sudo systemd-nspawn --directory=. # Install bash (default shell is a bit clunky), # and build tools, fetch binutils and build it: $$ /sbin/apk add bash && bash $$ /sbin/apk add build-tools m4 bison flex gmp-dev texinfo $$ git clone --depth 1 https://sourceware.org/git/binutils-gdb.git $$ cd binutils-gdb/ $$ ./configure && make ... In file included from dispatcher.c:35: /usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] #warning redirecting incorrect #include to ^~~ In file included from dispatcher.c:30: ./../src/collector_module.h:78:13: error: duplicate member ‘pwrite’ ssize_t (*pwrite64)(); ^~~~ It's a fully working basic c++ development environment: $$ printf "#include \nint main() { std::cout << \"yay\" << std::endl; }" | g++ -x c++ - -o a && ./a yay Hope that helps. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #3 from Vladimir Mezentsev --- I cloned git://git.musl-libc.org/musl, built and installed. I fixed the build problems in gprofng/libcollector. But I see that only musl-gcc is installed. How can I install the musl c++ compiler ? musl-gcc can build the *.cc files but cannot find the header files like: #include #include #include #include #include -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 tt_1 changed: What|Removed |Added CC||herrtimson at yahoo dot de -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 --- Comment #2 from Sergei Trofimovich --- (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.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 Vladimir Mezentsev changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2022-08-18 Status|UNCONFIRMED |WAITING --- Comment #1 from Vladimir Mezentsev --- 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 ? Also what is an output of `grep -ns pwrite /usr/include/*` on your build machine ? Thank you, -Vladimir -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 John changed: What|Removed |Added CC||bugs.sourceware@johnthomson ||.fastmail.com.au -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gprofng/29477] Build failure on musl: collector_module.h:78:13: error: duplicate member ‘pwrite’
https://sourceware.org/bugzilla/show_bug.cgi?id=29477 Sam James changed: What|Removed |Added CC||sam at gentoo dot org -- You are receiving this mail because: You are on the CC list for the bug.