First, if this is the wrong list for this, I appologize and please point me at the correct list.
I have been trying to port Wine, WineX, or ReWind to OpenBSD 3.4-beta for the past week. I've made the most progress with ReWind, so that is what this post will focus on.
Where I'm stumbling right now, I believe, is in the dll loader:
odin@sleipnir:p6[~/.wine/c]$ wine windows/Sol.exe err:module:BUILTIN32_LoadLibraryExA loaded .so but dll ntdll.dll still not found - library environment problem or version conflict, check your setup. err:module:PE_fixup_imports Module (file) ntdll.dll (which is needed by wine) not found
Now, it _is_ actually loading libntdll.so, I can see this with ktrace:
181 wine NAMI "/usr/local/lib/libntdll.so" 181 wine RET open 3 181 wine CALL read(0x3,0xcfbefdbc,0x1000) 181 wine GIO fd 3 read 4088 bytes "^?ELF^A^A^A\0\0\0\0\0\0 ......
I see that message is in relay32/builtin32.c, printed if MODULE_FindModule returns nothing.
In MODULE_FindModule in this loop: for ( wm = MODULE_modref_list; wm; wm = wm->next ) { ..... }
I added a printf("MOD: %s\n", wm->modname); which prints out "MOD: wine" four times before the error message above.
I'm curious how MODULE_modref_list is seeded. That's where I think I'll find a clue to my problem. Could anyone give me some pointers?
Thanks in advance.
-Dan
søn, 24.08.2003 kl. 04.13 skrev Dan Brosemer:
I see that message is in relay32/builtin32.c, printed if MODULE_FindModule returns nothing.
In MODULE_FindModule in this loop: for ( wm = MODULE_modref_list; wm; wm = wm->next ) { ..... }
I added a printf("MOD: %s\n", wm->modname); which prints out "MOD: wine" four times before the error message above.
I'm curious how MODULE_modref_list is seeded. That's where I think I'll find a clue to my problem. Could anyone give me some pointers?
ntdll.spec.c (generated by winebuild) contains a global constructor to automatically call __wine_spec_ntdll_init as soon as the .so is loaded, this init routine calls __wine_dll_register which eventually adds the DLL to that list. Perhaps you need to adapt the ".section .init" thing in there.
On Sun, Aug 24, 2003 at 05:53:35AM +0200, Ove Kaaven wrote:
ntdll.spec.c (generated by winebuild) contains a global constructor to automatically call __wine_spec_ntdll_init as soon as the .so is loaded, this init routine calls __wine_dll_register which eventually adds the DLL to that list. Perhaps you need to adapt the ".section .init" thing in there.
Thank you. It seems the .init section of that dll is never called after the dlopen (I added some debugging printfs that never output). It _is_ run for normal ELF binaries, though, so it looks like I have my work cut out for me figuring out what's so different with dlopen.
Thanks again.
-Dan
--- Dan Brosemer odin@cleannorth.org wrote:
First, if this is the wrong list for this, I appologize and please point me at the correct list.
I have been trying to port Wine, WineX, or ReWind to OpenBSD 3.4-beta for the past week. I've made the most progress with ReWind, so that is what this post will focus on.
Where I'm stumbling right now, I believe, is in the dll loader:
odin@sleipnir:p6[~/.wine/c]$ wine windows/Sol.exe err:module:BUILTIN32_LoadLibraryExA loaded .so but dll ntdll.dll still not found - library environment problem or version conflict, check your setup. err:module:PE_fixup_imports Module (file) ntdll.dll (which is needed by wine) not found
Now, it _is_ actually loading libntdll.so, I can see this with ktrace:
181 wine NAMI "/usr/local/lib/libntdll.so" 181 wine RET open 3 181 wine CALL read(0x3,0xcfbefdbc,0x1000) 181 wine GIO fd 3 read 4088 bytes "^?ELF^A^A^A\0\0\0\0\0\0 ......
I see that message is in relay32/builtin32.c, printed if MODULE_FindModule returns nothing.
In MODULE_FindModule in this loop: for ( wm = MODULE_modref_list; wm; wm = wm->next ) { ..... }
I added a printf("MOD: %s\n", wm->modname); which prints out "MOD: wine" four times before the error message above.
I'm curious how MODULE_modref_list is seeded. That's where I think I'll find a clue to my problem. Could anyone give me some pointers?
Correct me if I am wrong, but didnt we change the build process so that the dll's are built as (i.e.) libntdll.DLL.so? If that is true, I'm not sure, but could that have anything to do with it?
===== -- Dustin Navea
Minor Contributor, http://www.winehq.com Bugzilla Janitor, http://bugs.winehq.com Network Admin, irc://irc.blynk.net (down)
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
On Sun, Aug 24, 2003 at 04:00:08PM -0700, Dustin Navea wrote:
--- Dan Brosemer odin@cleannorth.org wrote:
I have been trying to port Wine, WineX, or ReWind to OpenBSD 3.4-beta for the past week. I've made the most progress with ReWind, so that is what this post will focus on.
Correct me if I am wrong, but didnt we change the build process so that the dll's are built as (i.e.) libntdll.DLL.so? If that is true, I'm not sure, but could that have anything to do with it?
I think that's the case with both the main-tree Wine and WineX, but not ReWind. I'm quite sure I've found my problem and it lies with OpenBSD's ld.so, not with anything I've done compiling Wine. Quite simply, the .init and .fini sections don't appear to be executed when a shared library is loaded with dlopen.
I've posted on tech@openbsd.org about it and received a few private replies confirming that observation and saying Wine isn't the only software that misbehaves because of this, so I think I'm on the right track.
Of course, that may not be the only issue (it certainly wasn't the first) so we'll see if I get bit by anything else once I get my ld.so working the way I need it to.
Thanks. -Dan