[Wine] Winelibs question.....
wineforum-user at winehq.org
Tue Apr 15 17:21:52 CDT 2008
Forgive my newbness. I'm pretty fresh to Linux, but trying to port some reasonably sizable windows apps that I have written. Certainly my gui apps appear to work directly with wine. I also have stuff that makes more sense to use with winelibs.
I've had no significant difficulties setting up and compiling bits an pieces, basically just to get my orientation sorted. One of my apps is an internet client/server jobbie, Currently it's targetted to IIS on Windows 2003/2008, using ISAPI.
I'm looking to move it to linux so that I can host it on a remote dedicated server, along with other stuff which is likely to work better with Linux. I have the ISAPI angle covered because I have an internet services library with a common base which can either be ISAPI or CGI. Clearly I'm going to be using Apache on linux.
There are three components the server, the "net stub", and a remote client app. The net stub uses windows pipes, to communicate data from the server to the web browser through the webserver. The client app communicates directly with the server via sockets. The server is currently a windows service.
My first question is fairly general, and goes to anyone with some experience of porting apps using Wine. Is it likely that the "net stub" and server components will work as reliably (or at all) on Wine(libs) as they do on Win32. Requires support would be things like interprocess communication using named pipes, interthread communication using windows message queues, mutexes, file io and sockets.
I suspect that wine will make a reasonable stab at that, and I appreciate that this is a bit of a difficult deal to answer, but perhaps pragmatic feedback on similar successes/failures would be appreciated.
O.K. In the mean time, a more detailed query;
In the interest of keeping things simple I decided to create a simple app in windowsland, all it does is create a file, and store a number in it. Each time you run the app, it reads the file, increments the number and stores it back out to disk. The aim was to get this to run using winelibs. Obviously the calls are all Win32 API or standard C.
It's working fine on windows, so to the port.
Things went well to the point of linkage. Winemaker seems a dream, but I was surprised to receive a ".so" from the build. More reading revealed that a "spec file" would be required, primarily to resolve the entrypoint, but also to deal with LoadLibrary, and exports if I were attempting to produce a "runtime linked" library. O.K. so I'm not trying to do the latter.
I assume, athough it's not *that* clear to me that the product of the excersise is a straight elf binary that I can run from a prompt.
I'm not sure what I'm supposed to be doing. [Shocked]
Perhaps I am supposed to be linking directly with the ".so" (created from the original winemaker parse/make process) at run time, in a new elf binary that I have yet to create.
Perhaps I am supposed to be linking again statically with the previously produced "coff" (I assume they're coff) objects and ignore the produced ".so".
Perhaps I have a choice? I'd prefer he latter, I go to a great deal of effort usually, to avoid big binaries, and DLL's.
Either way I'm a bit confused because "winebuild" does not seem to accept a "spec" file, as stated in the documentation. I can piece together what I need to do with "winebuild" from the man pages, and it seems to produce a c source file that, on inspection, seems to make sense.
Unfortunately if I try to compile it, the compiler reports;
winegcc -c -mno-cygwin -I. -o WineLibTestSpec.o WineLibTestSpec.c
winegcc: gcc-3.4 failed
make: *** [WineLibTestSpec.o] Error 2
as a result of;
$(WINEBUILD) -fPIC -o WineLibTestSpec.c --exe --entry=main
$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o WineLibTestSpec.o WineLibTestSpec.c
in the make file.
There isnt too much information coming back from the compiler, and I'm not sure where to go next. Does anyone have any suggestions?
Sorry for the long post.
More information about the wine-users