Porting/Compiling assistance

Brent Burkholder bburk at extremeprotocol.com
Wed Oct 27 11:56:27 CDT 2021


I'm not sure if this mailing list is the correct place to ask for porting help, as it seems to be solely dedicated to improving WINE, but the forums on the web site seem mostly for using WINE to run programs directly, not using it for porting.   If there is a better place for this query, please let me know.


So... the wine wrapper seems to run our application GUI just fine, however we need to marry the Win32 GUI code to system-level accesses so that we can port the application to Linux.  I was having some luck using version 5.0, but had to do some weird linking shenanigans and using pipes to channel data from the linux side to the windows side and vice versa... it was too cumbersome and slow for our purposes, so we walked away.  Hearing of version 6, we thought this new architecture might solve our problems so threw together an exploratory project simply to show that it could work.   Unfortunately, I've been having some issues and having a hard time determining where they are.


If I leave out the resources and compile with the -v option, this is the build/linking step (the .onlx is a gcc direct-compiled .o file... I've also tried it as an actual .o file in case that is confusing winebuild... same result.)


winegcc  -o Debug/winetest.exe -v -mwindows  Debug/WINETEST.o  Debug/SERVICE.o  Debug/USERCODE.o  Debug/CLIENT.o   Debug/linux.olnx

/opt/wine-devel/bin/winebuild -v -fno-asynchronous-unwind-tables "--cc-cmd=/usr/bin/gcc -m64" --ld-cmd=/usr/bin/ld -fPIC --exe -o winetest.exe-61799713.spec.o -F winetest.exe --subsystem windows -L/opt/wine-devel/bin/../lib64/wine/x86_64-unix -L/opt/wine-devel/bin/../lib64 -- Debug/WINETEST.o Debug/SERVICE.o Debug/USERCODE.o Debug/CLIENT.o /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libshell32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libcomdlg32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libgdi32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libadvapi32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libuser32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libwinecrt0.a /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libkernel32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libntdll.def

winebuild: Unable to create output file 'winetest.exe-61799713.spec-61799714.s'
winegcc: /opt/wine-devel/bin/winebuild failed
make: *** [Makefile:90: all] Error 2

So, one of these subprocesses is trying to create  a .s file on the way to creating the .o file, and having issues?  I note a few problems that seem to exist... one, the folder for the EXE doesn't seem to be getting passed to winebuild (-F winetest.exe instead of -F Debug/winetest.exe) and the  -o winetest.exe-61799713.spec.o is similarly not specifying a folder.  However adding a Debug in front of them manually doesn't do anything so I don't think that's the basic problem.

/opt/wine-devel/bin/winebuild -v -fno-asynchronous-unwind-tables "--cc-cmd=/usr/bin/gcc -m64" --ld-cmd=/usr/bin/ld -fPIC --exe -o Debug/winetest.exe-61799713.spec.o -F Debug/winetest.exe --subsystem windows -L/opt/wine-devel/bin/../lib64/wine/x86_64-unix -L/opt/wine-devel/bin/../lib64 -- Debug/WINETEST.o Debug/SERVICE.o Debug/USERCODE.o Debug/CLIENT.o /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libshell32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libcomdlg32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libgdi32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libadvapi32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libuser32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libwinecrt0.a /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libkernel32.def /opt/wine-devel/bin/../lib64/wine/x86_64-unix/libntdll.def

winebuild: Unable to create output file 'winetest.exe-61799713.spec-61799cc7.s'


Any ideas on what I'm doing wrong?  Bad environmental variables or other flags that need to be added?   Attached is a copy of my makefile, designed so that I can pull from multiple source folders, keep track of Win32 vs linux source files, etc.  It has various dummy targets to more easily experiment with different things or dump variable lists.  Attaching the var_o and tar_c outputs as well, just to demonstrate  the input values

I also experimented with trying to do things with gcc and ld, but didn't come across any breakthroughs.



In a similar vein, and probably related, I can't get WRC to work either.  If I comment in RCflags to get debug level 31, I get the output in rc_debug31.txt in the same folder as my Makefile (ie.  Writable folder)

The error output normally seems pretty non-sensical as the .res file should be an output?

wrc     -foDebug/WINETEST.res WINETEST.RC

Error: Could not open Debug/WINETEST.res-61799fb9 for input : Permission denied
make: *** [Makefile:144: Debug/WINETEST.res] Error 2


This is a much simpler test program than our actual program to port, and I can't even seem to get this one to compile... it's frustrating.   I'd love to be able to use WINE to support Linux servers, etc, but I'm stuck.

Any pointers people could offer would be greatly appreciated.


Thank you,
Brent




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211027/225c3351/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 5550 bytes
Desc: Makefile
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211027/225c3351/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rc_debug31.txt
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211027/225c3351/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: var_c.txt
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211027/225c3351/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: var_o.txt
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211027/225c3351/attachment-0005.txt>


More information about the wine-devel mailing list