Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandoc: Illegal instruction on Xen machine #10211

Closed
JorgeFrias11 opened this issue Sep 24, 2024 · 4 comments
Closed

Pandoc: Illegal instruction on Xen machine #10211

JorgeFrias11 opened this issue Sep 24, 2024 · 4 comments
Labels

Comments

@JorgeFrias11
Copy link

JorgeFrias11 commented Sep 24, 2024

I have been facing this issue for a couple of weeks now and I am unable to solve it. I'm using pandoc on a Xen server and when I run:

pandoc -o output.html
pandoc -v
pandoc --version

The command works sometimes, but sometimes I get the error Illegal instruction. Nothing more. I tried using --verbose but I still get the same output. I tried with different versions and the most recent version that works is pandoc 2.17.1.1

OS: Debian 12 (bookworm)
Pandoc version: 2.18 onwards.

I faced the same problem with quarto. It was unable to find the pandoc:

$ quarto check
error: Uncaught (in promise) Error: Unable to determine Pandoc version
            throw new Error(`Unable to determine ${name} version`);
                  ^
    at checkVersion (file:///opt/quarto-1.5.57/bin/quarto.js:101084:19)
    at checkVersions (file:///opt/quarto-1.5.57/bin/quarto.js:101108:5)
    at eventLoopTick (ext:core/01_core.js:153:7)
    at async check (file:///opt/quarto-1.5.57/bin/quarto.js:101066:13)
    at async Command.actionHandler (file:///opt/quarto-1.5.57/bin/quarto.js:101389:5)
    at async Command.execute (file:///opt/quarto-1.5.57/bin/quarto.js:8017:13)
    at async Command.parseCommand (file:///opt/quarto-1.5.57/bin/quarto.js:7907:20)
    at async quarto (file:///opt/quarto-1.5.57/bin/quarto.js:118224:9)
    at async file:///opt/quarto-1.5.57/bin/quarto.js:118244:9
    at async mainRunner (file:///opt/quarto-1.5.57/bin/quarto.js:118128:9)

And running the pandoc binary in quarto

$ /opt/quarto-1.5.57/bin/tools/x86_64/pandoc -v
Illegal instruction
@jgm
Copy link
Owner

jgm commented Sep 24, 2024

How did you install pandoc?
What is the architecture of the machine? (What does uname -a say?)

@JorgeFrias11
Copy link
Author

JorgeFrias11 commented Sep 25, 2024

I tried installing the DEB and the tarball, but I got the same error in both pandoc (and with previous versions too). The pandoc installation with apt-get install pandoc works, but it is the outdated 2.17.1.1 version.

Architecture:
Linux xmrflin-testing 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux

I found a similar issue in the forum #8947.

I am not sure if it is related, but the Xen machine does not show the flag AVX in cat /proc/cpuinfo, although it is shown in the Xen (host) server. Is this flag required for recent pandoc versions, but not for older ones like 2.17.1.1?

@jgm
Copy link
Owner

jgm commented Sep 25, 2024

You're right that #8947 seems relevant. Perhaps there will be a clue in that discussion. I believe the avx flag is required by more recent versions of the bytestring library, which we depend on. So there may not be much that I can do at this point.

@JorgeFrias11
Copy link
Author

JorgeFrias11 commented Oct 10, 2024

I installed the pandoc 3.1.6 version and it solved the problem! As mentioned #8947, it seems the AVX instructions were not supported in my system, causing this "Illegal instruction" error. Then I just had to create a link from quarto (/opt/quarto-1.5.57/bin/tools/x86_64/pandoc) to this pandoc 3.1.6 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants