misyltoad/d9vk

[2019.12.15] Fail compilation. (0f35b84)

Closed this issue · 12 comments

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

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"

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?

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?

What is in your CFLAGS in makepkg.conf?

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

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.

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.

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?

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

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.

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.

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.