WineHQ

World Wine News

All the news that fits, we print.

09/12/2003
by Brian Vincent
Issue: 187

XML source
More Issues...

This is the 187th issue of the Wine Weekly News publication. Its main goal is to watch the snow fly. It also serves to inform you of what's going on around Wine. Wine is an open source implementation of the Windows API on top of X and Unix. Think of it as a Windows compatibility layer. Wine does not require Microsoft Windows, as it is a completely alternative implementation consisting of 100% Microsoft-free code, but it can optionally use native system DLLs if they are available. You can find more info at www.winehq.org


This week, 375 posts consumed 1108 K. There were 73 different contributors. 51 (69%) posted more than once. 26 (35%) posted last week too.

The top 5 posters of the week were:

  1. 59 posts in 156K by Dimitrie O. Paun
  2. 23 posts in 52K by Alexandre Julliard
  3. 22 posts in 78K by Shachar Shemesh
  4. 16 posts in 59K by Francois Gouget
  5. 15 posts in 39K by Mike Hearn

News: Wine-20030911, TransGaming Update 09/06/2003 Archive
News

Barely in time for this week's news section, Alexandre released Wine-20030911:

WHAT'S NEW with Wine-20030911: (see ChangeLog for details)

  • Many improvements to the winecfg configuration tool.
  • Massive header files cleanup for better source compatibility.
  • Some more progress on the kernel/ntdll separation.
  • Lots of bug fixes.

This release has more changes than usual. Alexandre has been hard at work committing lots of changes and reorganizing stuff. As noted above, there's been a lot of changes with the configuration tool. If you're interested in Win32 programming and Wine you might want to check it. There's a good opportunity to get involved with Wine development and help build that tool. As always, you can download the latest source and binaries from SourceForge.

Download. Be happy.

Also this week, TransGaming issued August and September's development status and voting report :

TransGaming's Toronto and Ottawa offices were both hit by the massive power outage that affected about 50 million people in portions of the US and Canada. As late afternoon rolled around, our computers abruptly turned off leaving us increasingly wondering "would the bar down the street have power"? Unfortunately cold beer was not to be found as bars were shut, public transport was crippled, and people and cars filled the streets. We hope that those similarly affected managed to enjoy the forced extra long weekend and did not suffer any major disruptions.

Here are August's top-ranked technology poll items:

  • DirectX 8 Support: Direct3D
  • Improve overall sound support
  • Support new features in XFree86 4.3
  • Support Older Games
  • Improve 3D performance

Check out the link above for complete details. They also announced their beta testing program available to subscribers.


Explorer Clone 09/06/2003 Archive
Utilities

Wine has never had a good replacement for Windows' Explorer. Steven Edwards announced some work by Martin Fuchs:

I doubt this will ever make it in to WINE as Martin has been using C++ to implement our explorer clone but you might want to have a look at it if you want an explorer clone for WINE.

You will want to get the current source from ReactOS CVS. Martin has made a lot of changes to support both WINE and ReactOS and been working on improving WINEs shell32.

The enhancements to shell32 are needed about as much as Explorer. Hopefully they'll find their way into Wine.


Glibc Breakage 09/10/2003 Archive
Build Process

Shachar Shemesh ran into a glibc problem, the type that are really hard to diagnose:

I have just performed an upgrade to my Debian Sid Linux. During the upgrade, libc was replaced. I can now not get Wine to work on the new install.

Previously, I would use Wine without --with-nptl. This no longer works. Wine sigsegv on startup (whether there are parameters or not).

compiling with --with-nptl gets me slightly further. Running wine without parameters produces the help printout. However, when I try to actually run something, this does not work. It doesn't matter what I try to run (whether winelib or Windows). I get a series of "unhandled expection". This happens even for the regedit that is supposed to install my default registry via tools/wineinstall

Any ideas? Anyone?

He added, It appears that some black magic is destroying the content of a variable between calls. Rein Klazes seemed to run into the same problem and found an item in Debian's glibc-2.3.2-6 changelog that seemed to be a smoking gun. He downgraded and everything worked again. Shachar wanted to know how he was able to fall back on an older copy without trashing the system. Rein sent some instructions:

If they are not still on your system ( /var/cache/apt/archives/ ) you can download them from a local Debian mirror in pool/main/g/glibc.

Then I did

    | dpkg -i libc6-dev_2.3.2-5_i386.deb libc6_2.3.2-5_i386.deb locales_2.3.2-5_all.deb

That worked for Shachar, but didn't solve the real problem. Marcus Meissner got a little closer to the issue, The newest glibc snapshot causes problems somewhere in pthread_cond_wait or similar.

Ove Kåven discovered the real cause based on what Rein and Marcus reported:

I've just got a bug report on it (#210300) so I've taken a look. So, this pthread_cond_timedwait.dpatch contains:

    --- libc/linuxthreads/sysdeps/pthread/pthread-functions.h.jjÂÂ 2003-04-20 03:37:06.000000000 -0400
    +++ libc/linuxthreads/sysdeps/pthread/pthread-functions.hÂÂÂÂÂ 2003-09-01 05:35:34.000000000 -0400
    @@ -54,6 +54,8 @@ struct pthread_functions
      ÂÂ int (*ptr___pthread_cond_signal) (pthread_cond_t *);
      ÂÂ int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
      + int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
      + ÂÂÂÂÂÂÂÂÂÂÂÂconst struct timespec *);
      ÂÂ int (*ptr_pthread_equal) (pthread_t, pthread_t);
      ÂÂ void (*ptr___pthread_exit) (void *);
      ÂÂ int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);

Compare with Wine's scheduler/pthread.c:

    struct pthread_functions
    {
    ...
      int (*ptr___pthread_cond_init) (pthread_cond_t *, const pthread_condattr_t *);
      int (*ptr___pthread_cond_signal) (pthread_cond_t *);
      int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
      int (*ptr_pthread_equal) (pthread_t, pthread_t);
      void (*ptr___pthread_exit) (void *);
      int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
    ...
    };

See the problem?

Hmm, now should I complain to Debian's glibc maintainers, or is this Wine's problem?

Notice how new declarations were added right in the middle of the structure? That's not good when you expect them to be in a defined order. Alexandre felt there wasn't much that could be done on the Wine side, In a sense it's a Wine problem, since this is an internal structure we are not really supposed to be using. However, I don't think there's any way we can fix the problem on our side, so we are going to need a change in glibc (moving the new function to the end of the structure should work).

Ove put in a bug report against glibc and within hours it was fixed. Alexandre reported, The glibc guys have been kind enough to make the change, so this is fixed in the current glibc CVS (and I put in the corresponding change on the Wine side).


Optimization Required 09/10/2003 Archive
Build Process

Shachar Shemesh ran into a problem compiling Wine:

When trying to compile Wine without optimizations, the compilation fails. I'm trying clean sources, with the "--with-nptl" flag.

The failure (so far, I'm still trying to figure these things out) are when compiling ntdll and the wine executable itself. Both cases, the problem is that same. The linker complains that "InterlockedCompareExchange" cannot be found. Adding kernel32 to the IMPORTS Makefile at dlls/ntdll and miscemu/wine seem to solve these problems, but I'm somewhat worried, and would like to get a second opinion before I submit a patch about this.

Alexandre jokingly pointed out the obvious solution:

Don't do it then <g>

That's a temporary problem because dll separation is not finished. It will be fixed soon, in the meantime just make sure to compile at least ntdll with optimization.

Eric Pouech told Shachar his solution wasn't right and elaborated on the DLL separation problem, either ensure that the inline version of the Interlocked* are always used, or copy the source (from kernel32) of the non-inlined version of the Interlocked* functions in ntdll. That'll do for the moment.


Input Events and DGA Problems 09/07/2003 Archive
Graphics

There have been problems with Wine using the XFree86 DGA extension. DGA (really DGA2), the Direct Graphics Architecture, is a 2D graphics API that allows the CPU direct access to the framebuffer memory. This topic came up over a year and half ago, but I didn't cover it then. Lionel Ulmer originally diagnosed problems with DGA2 and event handling. Thomas Moore went through a similar process and mailed in a patch:

For a very long time now, enabling DGA causes mouse/keyboard events to be ignored. There have been a few threads on this issue in the past, and it seems nobody is willing to actually fix this problem (even though some have submitted patches to fix it, nothing has ever made it into CVS). Why is this? Overall, the problem seems to be related to the use of separate per-thread X display handles, along with a global (separate) "GDI" display. At first I tried just making the first thread's display the "global" display, but since that didn't work, and I don't have the patience to figure out why this dichotomy exists, here's a simple patch which at least works for a few games I tried (but still has mouse problems with a few other games I've tried - there was a mouse fix on an earlier thread(1) on this subject, but it doesn't work -- perhaps it has something to do with the fact that DGA only returns relative mouse movement, and non-DGA returns absolute movement). On the other hand, you could just at least make your default behavior and sample config not enable DGA.

Ove Kåven explained why it was wrong and what the correct solution should do (and why it's a lot harder):

all those patches are based on having gdi_display receive events. It should not. Consequently, DGA should be initialized using a per-thread display so that events arrive on a per-thread display. Originally I had thought that the DGA driver could create a separate thread and use its thread display, but it may not be strictly necessary, given that DirectDraw needs a cooperative window, and windows are per-thread objects, so the thread that owns the cooperative window could also own the DGA display. If we also assume that this thread calls SetMode, it's probably okay to just use the current thread_display() instead of gdi_display. But I suppose it's probably still safer to let DGA create its own thread, though somewhat more involved (you may have to use XSendEvent or some kind of wineserver stuff to forward keyboard and mouse events to the thread that owns the cooperative window). Besides, a separate thread would allow the DGA code to handle its own events, instead of scattering DGA special cases around the rest of the x11drv event-handling code.


Locating Font Paths 09/07/2003 Archive
Configuration

Mike Hearn has been putting a lot of work into Wine's configuration lately - namely the work on winecfg. He asked a question along those lines:

It'd be nice to use fontconfig in future to locate font installation paths. There is a simple API:

    FcStrList FcConfigGetFontDirs (FcConfig *config);

which should let us use a small part of it, even if we don't use all of it. It means we don't need to make the user manually configure font paths.

Does anybody know how hard this would be?

Huw Davies, Wine's font guru, has already done the work, I've done this for CrossOver 2.1 and hopefully we'll merge it into winehq soon. Rather than a directory by directory approach, I'm walking the entire font list and using any TrueType fonts that I come across.


OpenSSL Support 09/09/2003 Archive
Fixes

Geoff Thorpe stubbed out some functions that let him install and use OpenSSL:

I don't have or use any windows installation or compilers, but as a wine user and openssl developer I was curious anyway about how well win32 versions of openssl programs and libraries would function under wine. It turns out that the PRNG polling touches on some system monitoring functions for additional sources of entropy, and these were generating some exceptions.

So this just adds two stub functions that cause openssl to work (the error values returned from these two stub functions prevent the oodles of other functions from being used). This should help not only openssl programs (and scripts that use them), but also any win32 programs that depend on openssl DLLs.

PS: the types added with NetStatisticsGet are not used, but will be needed if the stub is later implemented. The structure definitions in both patches were taken from msdn's online API reference - so don't commit if this is a violation of any legal fineprint.

PS2: I could have added stubs for the other Heap32<foo> functions too, but after doing the first one (and learning a little about the ntdll/kernel build) everything worked. Should I send stubs for the rest too?

Geoff had a question about adding headers that Dimi fielded. Then he included a little more detail on exactly what his patch fixed:

Now, can you tell me if the code seems ok to you? :-) It's my first submission to wine-patches and I note that it hasn't as yet elicited any response, either as a rejection or a commit. FWIW: I was using the prebuilt openssl installer for version 0.9.7b from:

This installer appears to run well under wine. My changes were sufficient to get "wine /path/to/openssl/bin/openssl.exe -- speed rsa1024 " working, and although the timing mechanisms for benchmarking don't appear to work properly (another problem for another time), it is nonetheless doing crypto operations satisfactorily. As these routines include assembly optimisations and there being a somewhat clunky win32 compilation system behind it (long story), this was a useful test from my point of view.

But anyway, the point was to get the libs and crypto executing, and I suspect those two stub functions would be enough now for any applications using openssl libraries under wine.


Alpha/SGI Development for Wine and ReactOS 09/11/2003 Archive
Ports

Steven Edwards extended a generous offer for developers interested in porting Wine:

HP has recently extended the loan I requested on this alpha pws500 workstation for another year. If anyone is interested in working on porting WINE or ReactOS to the alpha email me privately and I can setup a account for you on the system.

I have another system a friend has let me borrow for at least a few months if anyone is interested in doing some porting work on it. Its a SGI Indigo 2 IMPACT 10000. I still need to load linux on it and get it up on the network though it will be a few weeks before anyone can use it if they are interested in starting a MIPS port


All Kernel Cousin issues and summaries are copyright their original authors, and distributed under the terms of the
GNU General Public License, version 2.0.