From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] nauty: disable native code (illegal instructions)
Date: Thu, 03 Feb 2022 01:29:22 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-35367@inbox.vuxu.org> (raw)
[-- 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"
next reply other threads:[~2022-02-03 0:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 0:29 tornaria [this message]
2022-02-03 12:56 ` [PR PATCH] [Merged]: " leahneukirchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-35367@inbox.vuxu.org \
--to=tornaria@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).