Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919355 - sci-mathematics/singular-4.3.2_p1 - [clang] scanner.l: error: ISO C++17 does not allow register storage class
Summary: sci-mathematics/singular-4.3.2_p1 - [clang] scanner.l: error: ISO C++17 does ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Orlitzky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-06 17:01 UTC by Toralf Förster
Modified: 2023-12-07 02:32 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,19.48 KB, text/plain)
2023-12-06 17:01 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,74.62 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
environment (environment,44.98 KB, text/plain)
2023-12-06 17:01 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.14 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,38.47 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,29.84 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,80.65 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
sci-mathematics:singular-4.3.2_p1:20231206-060103.log.xz (sci-mathematics:singular-4.3.2_p1:20231206-060103.log.xz,22.14 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,308.44 KB, application/x-xz)
2023-12-06 17:01 UTC, Toralf Förster
Details
var.tmp.clang.tar.xz (var.tmp.clang.tar.xz,2.89 KB, application/x-xz)
2023-12-06 17:01 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-06 17:01:21 UTC
too long lines were shrinked:

/bin/sh ../libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H -I. -I..  -I.. -I.. -I../kernel -I../kernel -I../libpolys -I../libpolys -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2 -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2/factory -I/
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../kernel -I../kernel -I../libpolys -I../libpolys -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2 -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2/factory -I/var/tmp/portage/sci-mathemati
/bin/sh ../libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H -I. -I..  -I.. -I.. -I../kernel -I../kernel -I../libpolys -I../libpolys -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2 -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2/factory -I/
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../kernel -I../kernel -I../libpolys -I../libpolys -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2 -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2/factory -I/var/tmp/portage/sci-mathemati
1 warning generated.
/bin/sh ../libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H -I. -I..  -I.. -I.. -I../kernel -I../kernel -I../libpolys -I../libpolys -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2 -I/var/tmp/portage/sci-mathematics/singular-4.3.2_p1/work/singular-4.3.2/factory -I/
scanner.l:244:2: error: ISO C++17 does not allow 'register' storage class
      specifier [-Wregister]
  244 |         register yy_state_type yy_current_state;

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

  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-10
 [2] 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.7
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.73.0 *
The following VMs are available for generation-2:
1)	IcedTea JDK 3.16.0 [icedtea-bin-8]
2)	Eclipse Temurin JDK 11.0.20.1_p1 [openjdk-bin-11]
3)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
5)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8 
  [2]   openjdk-bin-8 
  [3]   openjdk-bin-11 
  [4]   openjdk-bin-17 
  [5]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
  [1]   php8.1 *
  [2]   php8.2
  [3]   php8.3
go version go1.21.4 linux/amd64

  HEAD of ::gentoo
commit f53db635fb8750f15b21b5003cbad9c678dc628b
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Dec 6 04:47:48 2023 +0000

    2023-12-06 04:47:47 UTC

emerge -qpvO sci-mathematics/singular
[ebuild  N    ] sci-mathematics/singular-4.3.2_p1  USE="readline -emacs -examples (-polymake) -static-libs"
Comment 1 Toralf Förster gentoo-dev 2023-12-06 17:01:22 UTC
Created attachment 877778 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-06 17:01:23 UTC
Created attachment 877779 [details]
emerge-history.txt.xz
Comment 3 Toralf Förster gentoo-dev 2023-12-06 17:01:24 UTC
Created attachment 877780 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-12-06 17:01:25 UTC
Created attachment 877781 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-12-06 17:01:26 UTC
Created attachment 877782 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-06 17:01:27 UTC
Created attachment 877783 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-06 17:01:28 UTC
Created attachment 877784 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2023-12-06 17:01:29 UTC
Created attachment 877785 [details]
sci-mathematics:singular-4.3.2_p1:20231206-060103.log.xz
Comment 9 Toralf Förster gentoo-dev 2023-12-06 17:01:31 UTC
Created attachment 877786 [details]
temp.tar.xz
Comment 10 Toralf Förster gentoo-dev 2023-12-06 17:01:32 UTC
Created attachment 877787 [details]
var.tmp.clang.tar.xz
Comment 11 Michael Orlitzky gentoo-dev 2023-12-06 19:37:58 UTC
Strange, there's already a guard against this in omalloc/omalloc.h:

#ifdef __cplusplus
extern "C" {
  #if __cplusplus >= 201402L
  /* clang 3.7, gcc 5.1 sets 201402L */
  #define REGISTER
  #elif defined(__clang__)
  #define REGISTER
  #else
  #define REGISTER register
  #endif
#else
  #define REGISTER register
#endif


Could you check in a test program to see if you have either __cplusplus or __clang__ defined?
Comment 12 François Bissey 2023-12-06 19:56:00 UTC
Getting clang-17 to see if things go better with singular-4.3.2_p10 that I plan to submit in the next few days (needed to compile against flint-3 also coming eventually).
Comment 13 François Bissey 2023-12-06 21:06:08 UTC
The issue is not in omalloc.h but in Singular/scanner.cc. I did not hit the issue with singular-4.3.2_p10.
Comment 14 François Bissey 2023-12-06 21:07:29 UTC
And I was not hit on the newer singular because it was fixed https://github.com/Singular/Singular/commit/ea17839d9e90762aee63762e0df2b1c4ed0dbee6
Comment 15 Michael Orlitzky gentoo-dev 2023-12-06 22:37:58 UTC
(In reply to François Bissey from comment #14)
> And I was not hit on the newer singular because it was fixed

Thanks, I did some half-assed debugging again:

  * Checked scanner.cc in HEAD
  * Checked omalloc.h in HEAD
  * Checked omalloc.h 4.3.2_p1, saw that it was the same
  * Didn't check scanner.cc in 4.3.2_p1

I think it can wait for p10 if you're already working on it.
Comment 16 François Bissey 2023-12-07 01:35:47 UTC
https://github.com/gentoo/gentoo/pull/34158
The main motivation was compatibility with flint 3 which will be another PR later on. The thing that I have not checked is whether or not it works with flint 2.9.
Comment 17 Michael Orlitzky gentoo-dev 2023-12-07 01:51:23 UTC
(In reply to François Bissey from comment #16)
> The thing that I have not checked is whether or not it works with flint 2.9.

I've still got flint-2.9 installed so we'll know in a second.
Comment 18 Larry the Git Cow gentoo-dev 2023-12-07 02:32:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=480020dcc968b77cf387df1c7ef9c58309a3903a

commit 480020dcc968b77cf387df1c7ef9c58309a3903a
Author:     François Bissey <frp.bissey@gmail.com>
AuthorDate: 2023-12-07 01:27:50 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2023-12-07 01:41:46 +0000

    sci-mathematics/singular: add 4.3.2_p10
    
    Closes: https://bugs.gentoo.org/919355
    Closes: https://github.com/gentoo/gentoo/pull/34158
    Signed-off-by: François Bissey <frp.bissey@gmail.com>
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 sci-mathematics/singular/Manifest                  |   1 +
 sci-mathematics/singular/singular-4.3.2_p10.ebuild | 108 +++++++++++++++++++++
 2 files changed, 109 insertions(+)