bees
bees copied to clipboard
I can't build bees on glibc 2.30。
Even if I use gcc8.3.0. There seems to be a change in the rules for using gettid(). http://man7.org/linux/man-pages/man2/gettid.2.html
make PREFIX=/usr LIBEXEC_PREFIX=/usr/lib/bees ETC_PREFIX=/etc TAG="v0.6-75-g7117cb4" -C lib
make[1]: Entering directory '/home/daiaji/bees-git/src/bees-git/lib'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/home/daiaji/bees-git/src/bees-git/lib'
make PREFIX=/usr LIBEXEC_PREFIX=/usr/lib/bees ETC_PREFIX=/etc BEES_VERSION="v0.6-75-g7117cb4" -C src
make[1]: Entering directory '/home/daiaji/bees-git/src/bees-git/src'
g++ -Wall -Wextra -Werror -O3 -I../include -D_FILE_OFFSET_BITS=64 -std=c++11 -Wold-style-cast -o bees.o -c bees.cc
bees.cc: In destructor ‘BeesNote::~BeesNote()’:
bees.cc:145:19: error: call of overloaded ‘gettid()’ is ambiguous
s_status[gettid()] = tl_next;
^
In file included from /usr/include/unistd.h:1170,
from ../include/crucible/error.h:13,
from ../include/crucible/lockset.h:4,
from ../include/crucible/cache.h:4,
from bees.h:4,
from bees.cc:1:
/usr/include/bits/unistd_ext.h:34:16: note: candidate: ‘__pid_t gettid()’
extern __pid_t gettid (void) __THROW;
^~~~~~
In file included from ../include/crucible/lockset.h:5,
from ../include/crucible/cache.h:4,
from bees.h:4,
from bees.cc:1:
../include/crucible/process.h:76:8: note: candidate: ‘pid_t crucible::gettid()’
pid_t gettid();
^~~~~~
bees.cc:147:25: error: call of overloaded ‘gettid()’ is ambiguous
s_status.erase(gettid());
^
In file included from /usr/include/unistd.h:1170,
from ../include/crucible/error.h:13,
from ../include/crucible/lockset.h:4,
from ../include/crucible/cache.h:4,
from bees.h:4,
from bees.cc:1:
/usr/include/bits/unistd_ext.h:34:16: note: candidate: ‘__pid_t gettid()’
extern __pid_t gettid (void) __THROW;
^~~~~~
In file included from ../include/crucible/lockset.h:5,
from ../include/crucible/cache.h:4,
from bees.h:4,
from bees.cc:1:
../include/crucible/process.h:76:8: note: candidate: ‘pid_t crucible::gettid()’
pid_t gettid();
^~~~~~
bees.cc: In constructor ‘BeesNote::BeesNote(std::function<void(std::basic_ostream<char>&)>)’:
bees.cc:158:18: error: call of overloaded ‘gettid()’ is ambiguous
s_status[gettid()] = tl_next;
^
In file included from /usr/include/unistd.h:1170,
from ../include/crucible/error.h:13,
from ../include/crucible/lockset.h:4,
from ../include/crucible/cache.h:4,
from bees.h:4,
from bees.cc:1:
/usr/include/bits/unistd_ext.h:34:16: note: candidate: ‘__pid_t gettid()’
extern __pid_t gettid (void) __THROW;
^~~~~~
In file included from ../include/crucible/lockset.h:5,
from ../include/crucible/cache.h:4,
from bees.h:4,
from bees.cc:1:
../include/crucible/process.h:76:8: note: candidate: ‘pid_t crucible::gettid()’
pid_t gettid();
^~~~~~
make[1]: *** [Makefile:39: bees.o] Error 1
make[1]: Leaving directory '/home/daiaji/bees-git/src/bees-git/src'
make: *** [Makefile:38: src] Error 2
I have the same issue on Linux 5.3.1, building from master with gcc 9.2.0
Is this really a kernel issue? Or just a kernel header issue? Did you use the new header-install feature from kernel 5.3?
It works here with gcc-8.3.0:
# env LANG=C gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-8.3.0-r1/work/gcc-8.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/8.3.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.3.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.3.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.3.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/8.3.0/python --enable-languages=c,c++,go,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 8.3.0-r1 p1.1' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libmpx --disable-systemtap --enable-vtable-verify --enable-lto --with-isl --disable-isl-version-check --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.3.0 (Gentoo 8.3.0-r1 p1.1)
@kakra what is your glibc version? It seems that in 2.30 glibc introduced it's own gettid wrapper which is now clashing with the crucible::gettid implementation
@Kriskras99 You may be right, I use the 2.30-1 version of glibc, and I can't uninstall him. glibc is a dependency of hundreds of packages.
I have a fix in my fork kriskras99/bees which you can use until my pull request is accepted.
@Kriskras99 I'm using the fork you created. It's great.
@Zygo Are there any plans on a 0.7 tag soon? Otherwise it may make sense to create another 0.6.x release with the fixes included for different compiler/glibc versions. I have one or another bug report open in Gentoo. And it's going to switch to gcc 9.2 soon.
@kakra could you also test my fix? Because you seem to have an older glibc version
@Kriskras99 Not having tested it yet (but will do) I'm even planning to suggest it for inclusion as a 0.6.x hotfix and into the master branch. I'm pretty sure Gentoo will switch to glibc 2.30 soon, and then we're going to need this.
EDIT: I've cherry-picked your https://github.com/Zygo/bees/pull/128 into my v0.6.y branch and successfully compiled against glibc 2.29 :+1:
@daiaji Could you update the issue subject to reflect the fact it doesn't work with glibc 2.30? Thanks.
@kakra OK, but it seems a bit strange.
This is fixed in master.