Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 918934 - dev-python/cysignals-1.11.4 - [clang] build/.../implementation.c: error: cysignals must be compiled without _FORTIFY_SOURCE
Summary: dev-python/cysignals-1.11.4 - [clang] build/.../implementation.c: error: cysi...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Orlitzky
URL: https://github.com/sagemath/cysignals...
Whiteboard:
Keywords:
Depends on:
Blocks: 847148
  Show dependency tree
 
Reported: 2023-12-01 09:21 UTC by Toralf Förster
Modified: 2023-12-02 21:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.44 KB, text/plain)
2023-12-01 09:21 UTC, Toralf Förster
Details
dev-python:cysignals-1.11.4:20231130-214950.log (dev-python:cysignals-1.11.4:20231130-214950.log,17.36 KB, text/plain)
2023-12-01 09:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,56.38 KB, text/plain)
2023-12-01 09:21 UTC, Toralf Förster
Details
environment (environment,165.00 KB, text/plain)
2023-12-01 09:21 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.13 KB, application/x-xz)
2023-12-01 09:21 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,20.55 KB, application/x-xz)
2023-12-01 09:21 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,4.34 KB, application/x-xz)
2023-12-01 09:21 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,131.50 KB, text/plain)
2023-12-01 09:21 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,37.93 KB, application/x-xz)
2023-12-01 09:21 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-12-01 09:21:46 UTC
too long lines were shrinked:

2023-11-30 21:50:03,044 root INFO clang -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DNDEBUG -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -U_FORTIFY_SOURCE -Isrc -Isrc/cysignals -I/usr/include/python3.11 -c build/src/cysign
2023-11-30 21:50:03,044 root INFO creating /var/tmp/portage/dev-python/cysignals-1.11.4/work/cysignals-1.11.4-python3_11/build/temp.linux-x86_64-cpython-311/build
2023-11-30 21:50:03,043 root INFO creating /var/tmp/portage/dev-python/cysignals-1.11.4/work/cysignals-1.11.4-python3_11/build/temp.linux-x86_64-cpython-311
2023-11-30 21:50:03,059 root INFO clang -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DNDEBUG -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -U_FORTIFY_SOURCE -Isrc/cysignals -Isrc -I/usr/include/python3.11 -c build/src/cysign
2023-11-30 21:50:03,061 root INFO clang -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DNDEBUG -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -U_FORTIFY_SOURCE -Isrc -Isrc/cysignals -I/usr/include/python3.11 -c build/src/cysign
In file included from build/src/cysignals/signals.c:2380:
build/src/cysignals/implementation.c:27:2: error: "cysignals must be compiled without _FORTIFY_SOURCE"
   27 | #error "cysignals must be compiled without _FORTIFY_SOURCE"
      |  ^

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_systemd_merged_usr-20231128-203237

  -------------------------------------------------------------------

CC=clang
CXX=clang++
gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.6
Python 3.11.6
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-17 
  [2]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
go version go1.21.4 linux/amd64

  HEAD of ::gentoo
commit ac6f927fcb8bc4ff2280f6cf9dd9e7f2fc11dfe1
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Nov 30 20:31:58 2023 +0000

    2023-11-30 20:31:57 UTC

emerge -qpvO dev-python/cysignals
[ebuild  N    ] dev-python/cysignals-1.11.4  USE="-debug" PYTHON_TARGETS="python3_11 -python3_10 -python3_12"
Comment 1 Toralf Förster gentoo-dev 2023-12-01 09:21:47 UTC
Created attachment 876039 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-01 09:21:48 UTC
Created attachment 876040 [details]
dev-python:cysignals-1.11.4:20231130-214950.log
Comment 3 Toralf Förster gentoo-dev 2023-12-01 09:21:49 UTC
Created attachment 876041 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-12-01 09:21:50 UTC
Created attachment 876042 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-12-01 09:21:51 UTC
Created attachment 876043 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-01 09:21:52 UTC
Created attachment 876044 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-01 09:21:53 UTC
Created attachment 876045 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2023-12-01 09:21:54 UTC
Created attachment 876046 [details]
qlist-info.txt
Comment 9 Toralf Förster gentoo-dev 2023-12-01 09:21:55 UTC
Created attachment 876047 [details]
temp.tar.xz
Comment 10 Michael Orlitzky gentoo-dev 2023-12-01 21:01:14 UTC
Reported upstream. We will probably have to pile on a third hack to disable FORTIFY_SOURCE unless someone understands the sketchy code well-enough to replace it.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-01 21:03:45 UTC
do I even want to look at why they're doing this..
Comment 12 Michael Orlitzky gentoo-dev 2023-12-01 23:00:20 UTC
(In reply to Sam James from comment #11)
> do I even want to look at why they're doing this..

Naturally my first instinct is to blame overly-clever code, but in this case cysignals has its roots in the dark ages of cython. Basically we needed a way to handle Ctrl-C in the SageMath CLI if you were stuck in a long-running computation. In pure python, everything's great, but within a cdef function not so much.

Cysignals lets you wrap those (presumably tight) loops in some signal handling magic. It was later split out into this independent package, but considering its original purpose, saving a few ops here and there with clever code could easily be justified.