DerKoun / bsnes-hd

bsnes fork that adds HD video features
GNU General Public License v3.0
626 stars 35 forks source link

crash with "Illegal instruction" #13

Closed Saroumane closed 4 years ago

Saroumane commented 4 years ago

Hello,

first : thanks for all the hard work, which looks very promising. All beta binaries available for linux crash on my system (Linux fractal 5.0.0-31-generic Ubuntu 19.04 - Graphics driver Nvidia418) with "Illegal Instruction" Is there something obvious I'm missing ?

Is there somewhere a list of all dependencies needed to compile source code on linux ?

(I came here because I'm looking for widescreen + HD mode 7 on Super Soccer !)

DerKoun commented 4 years ago

I use the same build scripts as bsnes. I have to, as I lack the knowledge to make my own. Do you have the same issue with bsnes 107.3 and/or the latest bsnes? (I hope the issue will be solved when I update bsnes-hd to the latest bsnes)

Saroumane commented 4 years ago

I downloaded and launched bsnes v110.4 and v111.4 without problem (from here https://cirrus-ci.com/github/byuu/bsnes/master ) Can't reach v107.3 in the nightlies, it's too old.

DerKoun commented 4 years ago

Thanks. I'm afraid I'll have to ask you to wait for the next version.

Screwtapello commented 4 years ago

By default, bsnes builds with -march=native, so it runs as fast as possible when byuu is developing it on his own computer. However, when you build bsnes on a CI system like Cirrus CI or Appveyor, that means the binary is built for whatever CPU the build system runs - if it's running on high-end Xeon chips that support AVX512 (or whatever), the resulting binary might use those instructions, and hence produce "Illegal instruction" errors on older or cheaper hardware.

The fix is to add local=false to the make command line, which backs off on the fancy instructions, producing a binary that's more widely compatible.

Saroumane commented 4 years ago

Thanks for the explanation, I have indeed an old i5 2500K. So i need to compile on my own system (Ubuntu 19.04), fine. Do you know where I can find all dependencies needed ?

Screwtapello commented 4 years ago

This bsnes-hd repository includes an appveyor.yml build script that mentions "Ubuntu1804" and has a bunch of - sh: lines that tell AppVeyor how to build the code. If you can follow those instructions, you won't go far wrong.

Note that if you're building it yourself, you don't need to set local=false even on an older machine, because you're building a binary that will be used locally. It's only when you're going to distribute the binary to other people (Linux distros, nightly builds, etc.) where you need to set local=false.

DerKoun commented 4 years ago

Thanks for helping out. The depths of C++, including compiler parameters, are still mostly mysteries to me.

Saroumane commented 4 years ago

So here is a "DerKoun" bsnes HD v107.3 linux build that works on my old i5 2500. bsnes_v107.3.zip