protonscr

winelib build fails with meson 0.50

dxvkclosed build
doitsujin/dxvk#970 · opened 2019-03-15 by gasinvein · updated 2019-04-18 · 16 comments · github
Ggasinvein 2019-03-15 github

With meson 0.50, winelib check fails.
Corresponding meson-log.txt part:

Native C++ compiler: c++ (gcc 8.3.1 "c++ (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2)")
Cross C++ compiler: wineg++ (gcc 8.3.1)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Running compile:
Working directory:  /tmp/tmphnxfqgtd
Command line:  c++ /tmp/tmphnxfqgtd/testfile.cpp -pipe -D_FILE_OFFSET_BITS=64 -c -o /tmp/tmphnxfqgtd/output.obj -m64 --no-gnu-unique -O0 -fpermissive 

Code:
 #ifndef __WINE__
#error 1
#endif
Compiler stdout:
 
Compiler stderr:
 /tmp/tmphnxfqgtd/testfile.cpp:2:2: error: #error 1
 #error 1
  ^~~~~

Checking if "winelib check" compiles: NO

With meson 0.48 dxvk builds fine. I guess the problem is that meson uses native compiler instead of cross-compiler to run the compiler test (dxvk_compiler.compiles(code, name: 'winelib check')).

Ddoitsujin maintainer 2019-03-15 github

Hm, do you have any idea how to fix this?

Ggasinvein 2019-03-15 github

No, I'm not a developer. Not sure if it is expected behavior in meson, however.

Mmisyltoad 2019-03-15 github

I'm not at home right now, but can you try

CC=winegcc CXX=wineg++ [your meson command]

and see if that fixes it?

Ddoitsujin maintainer 2019-03-15 github

This is weird though, since dxvk_compiler should be the compiler that is used to compile the entire project, and that is wineg++ as defined in the crossfile. Anyway, looks like this might need some digging.

Ggasinvein 2019-03-15 github

@Joshua-Ashton Yes, it helps. Would it break something?

Mmisyltoad 2019-03-15 github

@Joshua-Ashton Yes, it helps. Would it break something?

By saying it helps, do you mean it fixed the issue? or..

Ggasinvein 2019-03-15 github

I mean it compiles. Didn't try to run it.

VValmar33 2019-03-15 github

I get these these warnings, although it still compiles:

WARNING: Env var CC seems to point to the cross compiler.
This is probably wrong, it should always point to the native compiler.

WARNING: Env var CXX seems to point to the cross compiler.
This is probably wrong, it should always point to the native compiler.

Mmisyltoad 2019-03-25 github

For some reason meson decided to run these tests with the native compiler for some for you it seems?

If this is an intended change in Meson, and not something else, it is rather misguided and doesn't really make much sense as its running with dxvk_compiler :/

Ddhewg 2019-03-26 github
Ddoitsujin maintainer 2019-03-29 github

@dhewg Thanks for digging into this, I'm still on 0.49 and frankly have better things to do than worry about build issues, so this is really appreciated.

Ddhewg 2019-03-29 github

Hehe, same here. I just ran into the same issue on https://github.com/iXit/wine-nine-standalone and downgraded too ;)

VValmar33 2019-04-13 github
Ddhewg 2019-04-18 github

0.50.1 is out, which should fix this issue

Ggasinvein 2019-04-18 github

I can confirm that 0.50.1 fixes the issue.

Ddoitsujin maintainer 2019-04-18 github

Nice, closing then.

Nothing extracted yet.