Bug#1014296: polymake: FTBFS with Perl 5.36: HVhek_UNSHARED’ was not declared in this scope

2022-07-03 Thread Benjamin Lorenz

Hi,

the attached patch should fix the build with perl 5.36:
- adapt to renamed HVhek_UNSHARED
- adjust for changes in the complement operation

Best,
Benjamin Lorenz

On 03/07/2022 16.33, Niko Tyni wrote:

Source: polymake
Version: 4.6-3
Tags: ftbfs
User: debian-p...@lists.debian.org
Usertags: perl-5.36-transition

This package fails to build from source with Perl 5.36 (currently in
experimental.)

Build log at

   
http://perl.debian.net/rebuild-logs/perl-5.36-throwaway/polymake_4.6-3/polymake_4.6-3_amd64-2022-06-09T09:42:58Z.build

Excerpt:

   FAILED: 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o
 g++ -c -o /<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o -MMD -MT 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o -MF 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o.d -fPIC -pipe -g -O2 -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow 
-Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized 
-Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 -I/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv 
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DPerlVersion=5360 -Wno-nonnull  
-I/<>/include/core-wrappers -I/<>/include/core 
/<>/build/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.cc && : 'COMPILER_USED=11.3.0'
   /<>/lib/core/src/perl/RefHash.xxs: In member function ‘SV* 
pm::perl::glue::{anonymous}::tmp_keysv::set(SV*)’:
   /<>/lib/core/src/perl/RefHash.xxs:74:22: error: 
‘HVhek_UNSHARED’ was not declared in this scope; did you mean ‘HVhek_NOTSHARED’?
  74 |HEK_FLAGS(hekp) = HVhek_UNSHARED;
 |  ^~
 |  HVhek_NOTSHARED
   [954/965]   g++ -c -o /<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.o -MMD -MT 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.o -MF 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.o.d -fPIC -pipe -g -O2 -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow 
-Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized 
-Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 -I/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv 
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DPerlVersion=5360 -Wno-nonnull  
-I/<>/include/core-wrappers -I/<>/include/core 
/<>/build/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.cc && : 'COMPILER_USED=11.3.0'
   [955/965]   g++ -c -o /<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.o -MMD -MT 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.o -MF 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.o.d -fPIC -pipe -g -O2 -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow 
-Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized 
-Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 -I/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv 
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DPerlVersion=5360 -Wno-nonnull  
-I/<>/include/core-wrappers -I/<>/include/core 
/<>/build/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.cc && : 'COMPILER_USED=11.3.0'
   ninja: build stopped: subcommand failed.
   make[1]: *** [debian/rules:56: override_dh_auto_build] Error 1
   make[1]: Leaving directory '/<>'
   make: *** [debian/rules:35: build] Error 2
  
diff --git a/lib/core/src/perl/RefHash.xxs b/lib/core/src/perl/RefHash.xxs
index f6087a10aa..fbf7309a50 100644
--- a/lib/core/src/perl/RefHash.xxs
+++ b/lib/core/src/perl/RefHash.xxs
@@ -71,7 +71,11 @@ SV* tmp_keysv::set(SV* keysv)
Copy(obj.keyp, HEK_KEY(hekp), sizeof(SV*), char);
HEK_LEN(hekp) = sizeof(SV*);
HEK_HASH(hekp) = U32(obj.keyl >> 4);  // hash value
+#if defined(HVhek_NOTSHARED)
+   HEK_FLAGS(hekp) = HVhek_NOTSHARED;
+#else
HEK_FLAGS(hekp) = HVhek_UNSHARED;
+#endif
sv.sv_any = &xpv;
sv.sv_refcnt = 1;
sv.sv_flags = SVt_PVIV | SVf_IVisUV | SVf_POK | 

Bug#1014296: polymake: FTBFS with Perl 5.36: HVhek_UNSHARED’ was not declared in this scope

2022-07-03 Thread Niko Tyni
Source: polymake
Version: 4.6-3
Tags: ftbfs
User: debian-p...@lists.debian.org
Usertags: perl-5.36-transition

This package fails to build from source with Perl 5.36 (currently in
experimental.)

Build log at

  
http://perl.debian.net/rebuild-logs/perl-5.36-throwaway/polymake_4.6-3/polymake_4.6-3_amd64-2022-06-09T09:42:58Z.build

Excerpt:

  FAILED: 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o
 
g++ -c -o 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o
 -MMD -MT 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o
 -MF 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.o.d
 -fPIC -pipe -g -O2 -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing 
-fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant 
-Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow 
-Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object 
-DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 
-I/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -DPerlVersion=5360 -Wno-nonnull  
-I/<>/include/core-wrappers -I/<>/include/core 
/<>/build/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RefHash.cc && 
: 'COMPILER_USED=11.3.0'
  /<>/lib/core/src/perl/RefHash.xxs: In member function ‘SV* 
pm::perl::glue::{anonymous}::tmp_keysv::set(SV*)’:
  /<>/lib/core/src/perl/RefHash.xxs:74:22: error: ‘HVhek_UNSHARED’ 
was not declared in this scope; did you mean ‘HVhek_NOTSHARED’?
 74 |HEK_FLAGS(hekp) = HVhek_UNSHARED;
|  ^~
|  HVhek_NOTSHARED
  [954/965]   g++ -c -o 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.o
 -MMD -MT 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.o
 -MF 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.o.d
 -fPIC -pipe -g -O2 -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing 
-fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant 
-Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow 
-Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object 
-DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 
-I/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -DPerlVersion=5360 -Wno-nonnull  
-I/<>/include/core-wrappers -I/<>/include/core 
/<>/build/perlx/5.36.0/x86_64-linux-gnu-thread-multi/Poly.cc && : 
'COMPILER_USED=11.3.0'
  [955/965]   g++ -c -o 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.o
 -MMD -MT 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.o
 -MF 
/<>/build/Opt/lib/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.o.d
 -fPIC -pipe -g -O2 -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing 
-fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant 
-Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow 
-Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object 
-DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 
-I/usr/lib/x86_64-linux-gnu/perl/5.36/CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64  -DPerlVersion=5360 -Wno-nonnull  
-I/<>/include/core-wrappers -I/<>/include/core 
/<>/build/perlx/5.36.0/x86_64-linux-gnu-thread-multi/RuleGraph.cc 
&& : 'COMPILER_USED=11.3.0'
  ninja: build stopped: subcommand failed.
  make[1]: *** [debian/rules:56: override_dh_auto_build] Error 1
  make[1]: Leaving directory '/<>'
  make: *** [debian/rules:35: build] Error 2
 
-- 
Niko Tyni   nt...@debian.org