[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1001352: marked as done (libc6-dev: pthread.h, setjmp.h: Include order matters (__sigsetjmp compilation error))



Your message dated Sun, 12 Dec 2021 12:51:37 +0100
with message-id <YbXiSdfT8EZz1lgB@aurel32.net>
and subject line Re: Bug#1001352: libc6-dev: pthread.h, setjmp.h: Include order matters (__sigsetjmp compilation error)
has caused the Debian Bug report #1001352,
regarding libc6-dev: pthread.h, setjmp.h: Include order matters (__sigsetjmp compilation error)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1001352: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001352
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6-dev
Version: 2.32-5
Severity: normal
Tags: upstream
X-Debbugs-Cc: alx.manpages@gmail.com, libc-alpha@sourceware.org, unit@nginx.org

Dear Maintainer,

Building Nginx Unit from source results in a compilation error.
I tried both Debian 11 and Debian Sid (12),
and the bug is reproducible in Sid only.

To reproduce the problem, install the following packages:

  git, build-essential, libpcre2-dev

Then execute the following commands:

  git clone https://github.com/nginx/unit.git
  cd unit/
  ./configure
  make

You will see the following error:


---

cc -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g -I src -I build   \
                      \
                     \
-o build/src/nxt_thread.o \
-MMD -MF build/src/nxt_thread.dep -MT build/src/nxt_thread.o \
src/nxt_thread.c
In file included from src/nxt_unix.h:187,
                 from src/nxt_main.h:31,
                 from src/nxt_thread.c:7:
src/nxt_thread.c: In function ‘nxt_thread_trampoline’:
src/nxt_thread.c:114:5: error: ‘__sigsetjmp’ accessing 200 bytes in a region of size 72 [-Werror=stringop-overflow=]
  114 |     pthread_cleanup_push(nxt_thread_time_cleanup, thr);
      |     ^~~~~~~~~~~~~~~~~~~~
src/nxt_thread.c:114:5: note: referencing argument 1 of type ‘struct __jmp_buf_tag *’
/usr/include/pthread.h:734:12: note: in a call to function ‘__sigsetjmp’
  734 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
      |            ^~~~~~~~~~~
cc1: all warnings being treated as errors 

---


If you reverse the order of the includes <pthread.h> and <setjmp.h>,
which are included in <src/nxt_unix.h> (in the nginx unit source code),
the error disappears:


On 12/8/21 22:37, Valentin V. Bartenev wrote:
> diff --git a/src/nxt_unix.h b/src/nxt_unix.h
> --- a/src/nxt_unix.h
> +++ b/src/nxt_unix.h
> @@ -153,6 +153,7 @@
>   #include <poll.h>
>   #include <pwd.h>
>   #include <semaphore.h>
> +#include <pthread.h>
>   #include <setjmp.h>
>   #include <sched.h>
>   #include <signal.h>
> @@ -184,7 +185,6 @@
>   #include <sys/wait.h>
>   #include <time.h>
>   #include <unistd.h>
> -#include <pthread.h>
>   
>   #if (NXT_HAVE_EPOLL)
>   #include <sys/epoll.h>

The above workaround silences the error.


Regards,
Alex


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.15.0-2-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libc6-dev depends on:
ii  libc-dev-bin    2.32-5
ii  libc6           2.32-5
ii  libcrypt-dev    1:4.4.26-1
ii  libnsl-dev      1.3.0-2
ii  linux-libc-dev  5.15.5-1
ii  rpcsvc-proto    1.4.2-4

libc6-dev recommends no packages.

Versions of packages libc6-dev suggests:
pn  glibc-doc     <none>
ii  manpages-dev  5.10-1

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 2.33-0experimental0

On 2021-12-10 21:22, Aurelien Jarno wrote:
> On 2021-12-08 23:46, Alejandro Colomar wrote:
> > Package: libc6-dev
> > Version: 2.32-5
> > Severity: normal
> > Tags: upstream
> > X-Debbugs-Cc: alx.manpages@gmail.com, libc-alpha@sourceware.org, unit@nginx.org
> > 
> > Dear Maintainer,
> > 
> > Building Nginx Unit from source results in a compilation error.
> > I tried both Debian 11 and Debian Sid (12),
> > and the bug is reproducible in Sid only.
> > 
> > To reproduce the problem, install the following packages:
> > 
> >   git, build-essential, libpcre2-dev
> > 
> > Then execute the following commands:
> > 
> >   git clone https://github.com/nginx/unit.git
> >   cd unit/
> >   ./configure
> >   make
> > 
> > You will see the following error:
> > 
> > 
> > ---
> > 
> > cc -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g -I src -I build   \
> >                       \
> >                      \
> > -o build/src/nxt_thread.o \
> > -MMD -MF build/src/nxt_thread.dep -MT build/src/nxt_thread.o \
> > src/nxt_thread.c
> > In file included from src/nxt_unix.h:187,
> >                  from src/nxt_main.h:31,
> >                  from src/nxt_thread.c:7:
> > src/nxt_thread.c: In function ‘nxt_thread_trampoline’:
> > src/nxt_thread.c:114:5: error: ‘__sigsetjmp’ accessing 200 bytes in a region of size 72 [-Werror=stringop-overflow=]
> >   114 |     pthread_cleanup_push(nxt_thread_time_cleanup, thr);
> >       |     ^~~~~~~~~~~~~~~~~~~~
> > src/nxt_thread.c:114:5: note: referencing argument 1 of type ‘struct __jmp_buf_tag *’
> > /usr/include/pthread.h:734:12: note: in a call to function ‘__sigsetjmp’
> >   734 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
> >       |            ^~~~~~~~~~~
> > cc1: all warnings being treated as errors 
> 
> The problem you encounter is due to the use of GCC 11. glibc headers
> need to be adapted for that. This has been done upstream in glibc 2.33,
> which is already available in experimental. It should arrive soon in
> sid. Using GCC 10 is another alternative.

glibc 2.33 is now in sid. Closing the bug.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

--- End Message ---

Reply to: