Joshua-Ashton / d9vk

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]
https://github.com/doitsujin/dxvk
zlib License
833 stars 42 forks source link

[2019.12.15] Fail compilation. (0f35b84) #476

Closed Kerrung closed 4 years ago

Kerrung commented 4 years ago

0f35b84 Screenshot from 2019-12-15 14-00-59

ZachBacon commented 4 years ago

Looks like the libs you're using is compiled with libssp iirc you can fix that with the flag -fno-stack-protector and that should bypass that issue

loathingKernel commented 4 years ago

That's my PKGBUILD, have you read the PKGBUILD to see what it does? I added some changes to pull in CFLAGS from makepkg.conf. This is probably not an issue with d9vk. Post a commend with your CFLAGS in d9vk-mingw-git AUR.

Edit: Compiles fine here with very basic CFLAGS="-march=native -O3 -pipe -fno-plt"

Kerrung commented 4 years ago

Edit: Compiles fine here with very basic CFLAGS="-march=native -O3 -pipe -fno-plt"

@loathingKernel And so, may be you should add this to your PKGBUILD?

loathingKernel commented 4 years ago

No, I shouldn't, CFLAGS are supposed to come from makepkg.conf. What I can do is filter known bad flags and document why they are failing. There is a wall of text in prepare() to document other flags that cause issues. It is up to the user to know what CFLAGS they specify and what issues they might cause. For reference that is how the official wine and wine-staging PKGBUILDs handle failing flags.

What is in your CFLAGS in makepkg.conf?

Kerrung commented 4 years ago

What is in your CFLAGS in makepkg.conf?

flags just from ArchWiki... Screenshot from 2019-12-15 15-09-53

Kerrung commented 4 years ago

That's my PKGBUILD, have you read the PKGBUILD to see what it does? I added some changes to pull in CFLAGS from makepkg.conf. This is probably not an issue with d9vk. Post a commend with your CFLAGS in d9vk-mingw-git AUR.

Edit: Compiles fine here with very basic CFLAGS="-march=native -O3 -pipe -fno-plt"

Now and for me too compiles fine here with this flags in /etc/makepkg.conf: CFLAGS="-march=native -O3 -pipe -fno-plt"

But fails with CFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt"

And this despite the fact that previously I always without any problems compiled D9VK using these flags in makepkg.conf.

UPDATE: too fails with CFLAGS="-march=native -O3 -pipe -fstack-protector-strong -fno-plt"

So it fails when I use "-fstack-protector-strong" flag.

loathingKernel commented 4 years ago

And this despite the fact that previously I always without any problems compiled D9VK using these flags in makepkg.conf.

Previously CFLAGS from makepkg.conf were not honoured. When meson cross-compiles, it ignores CFLAGS coming from the environment, it takes its CFLAGS from the crossfile. That resulted in d9vk/dxvk being optimized for basic x86_64.

By default Arch doesn't have fstack-protector-strong in CFLAGS, and probably that's the one causing the issue. I verified it here too. A quick google search returned a number of issues with MingW and fstack-protector[-strong] but nothing definitive. I think I will filter this flag too and link to this issue.

Edit: winelib versions compile fine with fstack-protector-strong, seems to be MingW specific.

Kerrung commented 4 years ago

And this despite the fact that previously I always without any problems compiled D9VK using these flags in makepkg.conf.

Previously CFLAGS from makepkg.conf were not honoured. When meson cross-compiles, it ignores CFLAGS coming from the environment, it takes its CFLAGS from the crossfile. That resulted in d9vk/dxvk being optimized for basic x86_64.

By default Arch doesn't have -fstack-protector-strong in CFLAGS, and probably that's the one causing the issue. I verified it here too. A quick google search returned a number of issues with MingW and fstack-protector[-strong] but nothing definitive. I thing I will filter this flag too and link to this issue.

Thank you! And a offtopic question: when you update your d9vk-bin and d9vk-mingw PKGBUILD's to 0.40.1?

loathingKernel commented 4 years ago

And a offtopic question: when you update your d9vk-bin and d9vk-mingw PKGBUILD's to 0.40.1?

Give me a moment, I just woke up and wanted to debug this issue first. I will do in a few moments :P

Kerrung commented 4 years ago

Give me a moment, I just woke up and wanted to debug this issue first. I will do in a few moments :P

So I should close #476? After all, it turned out that the reason was that a flag "-fstack-protector-strong" that is recommended to be used by ArchWiki in an article about makepkg causes problems with cross-compilation.

Joshua-Ashton commented 4 years ago

This isn't my bug: I don't know what random CFLAGS and patches you're adding but it's nothing to do with me.

Kerrung commented 4 years ago

This isn't my bug: I don't know what random CFLAGS and patches you're adding but it's nothing to do with me.

We have already figured out what the problem was. Just read the comments here. Thanks.