Re: error: 'all_threads_mask' undeclared (first use in this function)
Hi Igor, On Mon, Jun 04, 2018 at 03:18:02PM +0300, Igor Batkanov wrote: > Hello! > I've tried to create haproxy 1.8.9 RPM package using rpmbuild and got the > folowing error: error: 'all_threads_mask' undeclared (first use in this > function) > This is a problem when building haproxy without threads support, that has been fixed, but only after 1.8.9 was released, so it should be part of the next release. In the mean while, you can apply the attached patch, it should do the trick. Regards, Olivier >From fbf09c441a4e72c4a690bc7ef25d3374767fe5c5 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 23 May 2018 19:54:43 +0200 Subject: [PATCH] BUG/BUILD: threads: unbreak build without threads A few users reported that building without threads was accidently broken after commit 6b96f72 ("BUG/MEDIUM: pollers: Use a global list for fd shared between threads.") due to all_threads_mask not being defined. It's OK to set it to zero as other code parts do when threads are enabled but only one thread is used. This needs to be backported to 1.8. (cherry picked from commit 0cd82e883ef034508ebeef04fd25ffc946e80cfc) Signed-off-by: Willy Tarreau --- include/common/hathreads.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/common/hathreads.h b/include/common/hathreads.h index 86db4d5c..f5827e0f 100644 --- a/include/common/hathreads.h +++ b/include/common/hathreads.h @@ -31,6 +31,7 @@ extern THREAD_LOCAL unsigned long tid_bit; /* The bit corresponding to the threa #ifndef USE_THREAD #define MAX_THREADS 1 +#define all_threads_mask 0UL #define __decl_hathreads(decl) -- 2.14.3
Re: error: 'all_threads_mask' undeclared (first use in this function)
On Mon, Jun 04, 2018 at 03:18:02PM +0300, Igor Batkanov wrote: > Hello! > I've tried to create haproxy 1.8.9 RPM package using rpmbuild and got the > folowing error: error: 'all_threads_mask' undeclared (first use in this > function) > Hello Igor, This error was fixed in the git, it will be available in the next 1.8 version. https://git.haproxy.org/?p=haproxy-1.8.git;a=commit;h=fbf09c441a4e72c4a690bc7ef25d3374767fe5c5 However be careful, the spec file provided in the git is an example, it does not build with the latest features of haproxy. You should at least build with TARGET=linux2628 for the latest default features. Cheers, -- William Lallemand
error: 'all_threads_mask' undeclared (first use in this function)
Hello! I've tried to create haproxy 1.8.9 RPM package using rpmbuild and got the folowing error: error: 'all_threads_mask' undeclared (first use in this function) Could you please help me to resolve it? rpmbuild -ba ~/rpmbuild/SPECS/haproxy.spec warning: bogus date in %changelog: Tue May 09 2007 Willy Tarreau warning: bogus date in %changelog: Wed Jan 26 2007 Willy Tarreau warning: bogus date in %changelog: Wed Jan 22 2007 Willy Tarreau warning: bogus date in %changelog: Wed Jan 07 2007 Willy Tarreau warning: bogus date in %changelog: Wed Jan 02 2007 Willy Tarreau warning: bogus date in %changelog: Wed Oct 15 2006 Willy Tarreau warning: bogus date in %changelog: Wed Sep 03 2006 Willy Tarreau warning: bogus date in %changelog: Wed Jul 09 2006 Willy Tarreau warning: bogus date in %changelog: Wed May 21 2006 Willy Tarreau < wi...@w.ods.org> warning: bogus date in %changelog: Wed May 01 2006 Willy Tarreau < wi...@w.ods.org> warning: bogus date in %changelog: Wed Apr 15 2006 Willy Tarreau < wi...@w.ods.org> warning: bogus date in %changelog: Wed Mar 30 2006 Willy Tarreau < wi...@w.ods.org> warning: bogus date in %changelog: Wed Mar 19 2006 Willy Tarreau < wi...@w.ods.org> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.VuZi8C + umask 022 + cd /root/rpmbuild/BUILD + cd /root/rpmbuild/BUILD + rm -rf haproxy-1.8.9 + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/haproxy-1.8.9.tar.gz + /usr/bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd haproxy-1.8.9 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.59b50E + umask 022 + cd /root/rpmbuild/BUILD + cd haproxy-1.8.9 + /usr/bin/make USE_PCRE=1 USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_OPENSSL=1 DEBUG= ARCH=x86_64 TARGET=linux26 gcc -Iinclude -Iebtree -Wall -m64 -march=x86-64 -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -fno-strict-overflow -Wno-unused-label -DTPROXY -DCONFIG_HAP_LINUX_TPROXY -DCONFIG_HAP_CRYPT -DUSE_ZLIB -DENABLE_POLL -DENABLE_EPOLL -DNETFILTER -DCONFIG_REGPARM=3 -DUSE_OPENSSL -DUSE_SYSCALL_FUTEX -DUSE_PCRE -I/usr/include -DCONFIG_HAPROXY_VERSION=\"1.8.9-83616ec\" -DCONFIG_HAPROXY_DATE=\"2018/05/18\" -c -o src/ev_poll.o src/ev_poll.c In file included from src/ev_poll.c:27:0: include/proto/fd.h: In function 'done_update_polling': include/proto/fd.h:154:31: error: 'all_threads_mask' undeclared (first use in this function) if ((fdtab[fd].update_mask & all_threads_mask) == 0) { ^ include/proto/fd.h:154:31: note: each undeclared identifier is reported only once for each function it appears in src/ev_poll.c: In function '_do_poll': src/ev_poll.c:115:30: error: 'all_threads_mask' undeclared (first use in this function) fdtab[fd].update_mask &= ~all_threads_mask; ^ make: *** [src/ev_poll.o] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.59b50E (%build) RPM build errors: bogus date in %changelog: Tue May 09 2007 Willy Tarreau bogus date in %changelog: Wed Jan 26 2007 Willy Tarreau bogus date in %changelog: Wed Jan 22 2007 Willy Tarreau bogus date in %changelog: Wed Jan 07 2007 Willy Tarreau bogus date in %changelog: Wed Jan 02 2007 Willy Tarreau bogus date in %changelog: Wed Oct 15 2006 Willy Tarreau bogus date in %changelog: Wed Sep 03 2006 Willy Tarreau bogus date in %changelog: Wed Jul 09 2006 Willy Tarreau bogus date in %changelog: Wed May 21 2006 Willy Tarreau bogus date in %changelog: Wed May 01 2006 Willy Tarreau bogus date in %changelog: Wed Apr 15 2006 Willy Tarreau bogus date in %changelog: Wed Mar 30 2006 Willy Tarreau bogus date in %changelog: Wed Mar 19 2006 Willy Tarreau Bad exit status from /var/tmp/rpm-tmp.59b50E (%build)