Hi guys,
I'm back from my vacation! :)
Before I left I had problems running visual-mingw when built as a Winelib app. This is a C++ app and needs the wrapper idea to work. In other words the main app is in a dll names 'visual-mingw-wrap.dll.so' (I've added the 'wrap' in the name to avoid potential confusion, and to make it easier to search for it).
The wrapper simply does a LoadLibrary for this DLL, and this LoadLibrary call fails. Here is the relevant part of a --debugmsg +module,+server
Any ideas?
.... trace:module:MODULE_InitDLL (0x40980000,PROCESS_ATTACH,0x1) - RETURN 1 trace:module:MODULE_DllProcessAttach (user32.dll,0x1) - END trace:module:MODULE_DllProcessAttach (visual-mingw.exe,0x1) - END trace:module:GetModuleFileNameW L"F:\dev\wine\visual-mingw\bin\visual-mingw.exe" trace:module:MODULE_GetLoadOrder looking for F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so trace:module:GetModuleFileNameW L"F:\dev\wine\visual-mingw\bin\visual-mingw.exe" trace:module:open_app_key searching 'F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so' in AppDefaults\visual-mingw.exe\DllOverrides 0009: open_key( parent=(nil), access=000f003f, name=L"Machine\Software\Wine\Wine\Config\AppDefaults" ) Open key ERROR 0009: open_key() = OBJECT_NAME_NOT_FOUND { hkey=(nil) } 0009: get_key_value( hkey=0x14, name=L"F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so" ) 0009: get_key_value() = OBJECT_NAME_NOT_FOUND { type=-1, total=0, data={} } 0009: get_key_value( hkey=0x14, name=L"*visual-mingw-wrap.dll.so" ) 0009: get_key_value() = OBJECT_NAME_NOT_FOUND { type=-1, total=0, data={} } trace:module:MODULE_GetLoadOrder got hardcoded path default "n,b" for "F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so" trace:module:load_dll Trying native dll 'F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so' 0009: create_file( access=80000000, inherit=0, sharing=00000001, create=3, attrs=00000000, drive_type=3, filename="/home/dimi/dev/wine/visual-mingw/bin/visual-mingw-wrap.dll.so" ) 0009: create_file() = 0 { handle=0x34 } trace:module:PE_LoadImage loading F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is correct, Wine finds the file correctly.
trace:module:PE_LoadImage Trying to create section...
Here, we're executing this (which fails):
TRACE( "Trying to create section...\n" ); if (NtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ, &attr, &lg_int, 0, SEC_IMAGE, hFile ) != STATUS_SUCCESS) return 0;
0009: create_mapping( size_high=0, size_low=0, protect=192, access=000f0005, inherit=0, file_handle=0x34, name=L"" ) 0009: create_mapping() = INVALID_FILE_FOR_SECTION { handle=(nil) } 0009: close_handle( handle=0x34 ) 0009: close_handle() = 0 { fd=-1 } warn:module:load_dll Loading of native DLL F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so failed (status -1073741595). warn:module:load_dll Failed to load module 'F:\dev\wine\visual-mingw\bin\visual-mingw-wrap.dll.so'; status=-1073741595 trace:module:LdrGetDllHandle 0 0 L"user32.dll" -> 0x40980000 trace:module:GetModuleHandle16 (USER) ....
"Dimitrie O. Paun" dimi@intelliware.ca writes:
I'm back from my vacation! :)
Welcome back!
The wrapper simply does a LoadLibrary for this DLL, and this LoadLibrary call fails. Here is the relevant part of a --debugmsg +module,+server
Any ideas?
LoadLibrary doesn't support loading a .so directly at this point. You need to pass it the .dll name and make sure the corresponding .so can be found somewhere in WINEDLLPATH. Or you need to add .so support to LoadLibrary...
On July 11, 2003 07:47 pm, Alexandre Julliard wrote:
LoadLibrary doesn't support loading a .so directly at this point. You need to pass it the .dll name and make sure the corresponding .so can be found somewhere in WINEDLLPATH. Or you need to add .so support to LoadLibrary...
Indeed, that was a left-over from some experiments I was doing before I left for vacation. Now, the LoadLibrary call is actually for "visual-mingw-wrap.dll". It still doesn't work, I get for bin/visual-mingw --debugmsg +module,+server the following trace:
... trace:module:MODULE_GetLoadOrder looking for C:\WINDOWS\SYSTEM\visual-mingw-wrap.dll trace:module:GetModuleFileNameW L"F:\dev\wine\visual-mingw\bin\visual-mingw.exe" trace:module:open_app_key searching 'visual-mingw-wrap' in AppDefaults\visual-mingw.exe\DllOverrides 0009: open_key( parent=(nil), access=000f003f, name=L"Machine\Software\Wine\Wine\Config\AppDefaults" ) Open key ERROR 0009: open_key() = OBJECT_NAME_NOT_FOUND { hkey=(nil) } 0009: get_key_value( hkey=0x14, name=L"visual-mingw-wrap" ) 0009: get_key_value() = OBJECT_NAME_NOT_FOUND { type=-1, total=0, data={} } 0009: get_key_value( hkey=0x14, name=L"*visual-mingw-wrap" ) 0009: get_key_value() = OBJECT_NAME_NOT_FOUND { type=-1, total=0, data={} } 0009: get_key_value( hkey=0x14, name=L"*" ) Get key \Machine\Software\Wine\Wine\Config\DllOverrides value "*"="builtin, native" 0009: get_key_value() = 0 { type=1, total=32, data={62,00,75,00,69,00,6c,00,74,00,69,00,6e,00,2c,00,20,00,6e,00,61,00,74,00,69,00,76,00,65,00,00,00} } trace:module:MODULE_GetLoadOrder got standard wildcard "b,n" for "visual-mingw-wrap.dll" trace:module:load_dll Trying built-in 'C:\WINDOWS\SYSTEM\visual-mingw-wrap.dll' trace:module:load_dll Trying native dll 'C:\WINDOWS\SYSTEM\visual-mingw-wrap.dll' warn:module:load_dll Failed to load module 'C:\WINDOWS\SYSTEM\visual-mingw-wrap.dll'; status=-1073741809 ...
And yes, WINEDLLPATH points to the right dir. Look:
[dimi@dimi visual-mingw]$ bash -x bin/visual-mingw + '[' -f /etc/bashrc ']' + . /etc/bashrc +++ id -gn +++ id -un +++ id -u ++ '[' dimi = dimi -a 500 -gt 99 ']' ++ umask 002 ++ '[' '' ']' + export EDITOR=/usr/bin/vim + EDITOR=/usr/bin/vim + export 'PATH=.:~/bin:.:~/bin:.:~/bin:.:~/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/opt/ant/bin:/usr/java/jdk1.3/bin:/home/dimi/bin:/opt/ant/bin:/usr/java/jdk1.3/bin' + PATH=.:~/bin:.:~/bin:.:~/bin:.:~/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/opt/ant/bin:/usr/java/jdk1.3/bin:/home/dimi/bin:/opt/ant/bin:/usr/java/jdk1.3/bin + export CVSROOT=:pserver:dimi@cvs.dssd.ca:/var/cvs + CVSROOT=:pserver:dimi@cvs.dssd.ca:/var/cvs + export CVS_RSH=ssh + CVS_RSH=ssh + appname=visual-mingw + appdir= ++ dirname bin/visual-mingw + appdir=bin + true + break + '[' -n bin ']' + apppath=bin/visual-mingw.exe.so + WINEDLLPATH=bin: + export WINEDLLPATH + '[' '!' -x '' ']' + WINELOADER=wine + exec wine -- bin/visual-mingw.exe.so