Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] nauty: disable native code (illegal instructions)
@ 2022-02-03  0:29 tornaria
  2022-02-03 12:56 ` [PR PATCH] [Merged]: " leahneukirchen
  0 siblings, 1 reply; 2+ messages in thread
From: tornaria @ 2022-02-03  0:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages nauty
https://github.com/void-linux/void-packages/pull/35367

nauty: disable native code (illegal instructions)
The package currently shipped in void gives me illegal instructions in a
nehalem cpu.

This commit fixes the issue by disabling native compilation unless a build
option is given; also disable popcnt which, although available on nehalem, is
not available in baseline x86_64.

An easy way to spot the issue is to run something like:
```
$ geng 2
>A geng -d0D1 n=2 e=0-1
Illegal instruction
```

#### Testing the changes
- I tested the changes in this PR: **YES**

I compiled with `./xbps-src build nauty` on a cascade lake cpu, then run `./xbps-src check nauty` on a nehalem cpu. This breaks before the present PR, and works ok after.

I also tested sagemath: previously I was getting a lot of doctest failures which are now fixed.

Cc: @leahneukirchen please merge this before sagemath.

A patch file from https://github.com/void-linux/void-packages/pull/35367.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nauty-35367.patch --]
[-- Type: text/x-diff, Size: 1444 bytes --]

From 723c1247b98f5c2afe78ae3f57d1e5af812c8d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 2 Feb 2022 21:18:02 -0300
Subject: [PATCH] nauty: disable native code (illegal instructions)

The package currently shipped in void gives me illegal instructions in a
nehalem cpu.

This commit fixes the issue by disabling native compilation unless a build
option is given; also disable popcnt which, although available on nehalem, is
not available in baseline x86_64.
---
 srcpkgs/nauty/template | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/nauty/template b/srcpkgs/nauty/template
index 57025e400999..11ef99f656fa 100644
--- a/srcpkgs/nauty/template
+++ b/srcpkgs/nauty/template
@@ -1,7 +1,7 @@
 # Template file for 'nauty'
 pkgname=nauty
 version=2.7r3
-revision=1
+revision=2
 wrksrc=${pkgname}${version/./}
 build_style=gnu-configure
 make_install_args="includedir=/usr/include/nauty
@@ -13,6 +13,12 @@ homepage="https://pallini.di.uniroma1.it/"
 distfiles="https://pallini.di.uniroma1.it/nauty${version/./}.tar.gz"
 checksum=4f0665b716a53f7a14ea2ae30059f23d064ce3fe4c12c013404ef6e1ee0b88c2
 
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+	configure_args="--enable-generic --disable-popcnt"
+fi
+
 nauty-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
 	short_desc+=" - development files"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: nauty: disable native code (illegal instructions)
  2022-02-03  0:29 [PR PATCH] nauty: disable native code (illegal instructions) tornaria
@ 2022-02-03 12:56 ` leahneukirchen
  0 siblings, 0 replies; 2+ messages in thread
From: leahneukirchen @ 2022-02-03 12:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

There's a merged pull request on the void-packages repository

nauty: disable native code (illegal instructions)
https://github.com/void-linux/void-packages/pull/35367

Description:
The package currently shipped in void gives me illegal instructions in a
nehalem cpu.

This commit fixes the issue by disabling native compilation unless a build
option is given; also disable popcnt which, although available on nehalem, is
not available in baseline x86_64.

An easy way to spot the issue is to run something like:
```
$ geng 2
>A geng -d0D1 n=2 e=0-1
Illegal instruction
```

#### Testing the changes
- I tested the changes in this PR: **YES**

I compiled with `./xbps-src build nauty` on a cascade lake cpu, then run `./xbps-src check nauty` on a nehalem cpu. This breaks before the present PR, and works ok after.

I also tested sagemath: previously I was getting a lot of doctest failures which are now fixed.

Cc: @leahneukirchen please merge this before sagemath.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-03 12:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  0:29 [PR PATCH] nauty: disable native code (illegal instructions) tornaria
2022-02-03 12:56 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).