Bug 1056436

Summary: err:module:import_dll Library libgcc_s_sjlj-1.dll not found needed by mono-2.0
Product: [Fedora] Fedora Reporter: Asif Ali Rizvan <fast.rizwaan>
Component: wine-monoAssignee: Michael Cronenworth <mike>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: aliakc, andreas.bierfert, bcotton, jeff, lam, madewokherd, meissner, mike, mykel.alvis, pgn674, sgraf, t_arceri, zer-0
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: wine-mono-4.5.2-4.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-04 00:28:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Asif Ali Rizvan 2014-01-22 08:38:02 UTC
Description of problem:
wine is unable to locate wine-mono's library libgcc_s_sjlj-1.dll

This happened after update to wine 1.7.8 ; wine 1.7.5 was ok with wine-mono-0.0.8

http://bugs.winehq.org/show_bug.cgi?id=35413

I reported the bug at wine bugzilla, thinking that it was wine bug, but it is fedora's wine bug.

thanks.

Comment 1 Michael Cronenworth 2014-01-22 14:39:59 UTC
This sounds like the same issue that wine-gecko had in bug 977039. Can you try the workaround I suggested in comment 2 there?

Comment 2 Asif Ali Rizvan 2014-01-22 14:53:17 UTC
(In reply to Michael Cronenworth from comment #1)
> This sounds like the same issue that wine-gecko had in bug 977039. Can you
> try the workaround I suggested in comment 2 there?

there's no ~/.wine/drive_c/windows/syswow64 in the .wine directory

i did, 
WINEARCH=win32 winecfg

mkdir -p ~/.wine/drive_c/windows/syswow64/gecko/2.21/wine_gecko/

#installed the game, then copied the file from ming32-gcc

$ rpm -ql mingw32-gcc|grep sjlj
/usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll

cp /usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll ~/.wine/drive_c/windows/syswow64/gecko/2.21/wine_gecko/

started game, again same error:
wine Brothers
err:module:import_dll Library libgcc_s_sjlj-1.dll (which is needed by L"C:\\windows\\mono\\mono-2.0\\bin\\libmono-2.0-x86.dll") not found
err:mscoree:load_mono Could not load Mono into this process

Comment 3 Asif Ali Rizvan 2014-01-22 14:55:27 UTC
copying the dll file to the game's binary folder, launches it but, the game hangs. with wine 1.7.5 it did not hang.

Comment 4 Michael Cronenworth 2014-01-22 14:56:00 UTC
Asif, my comment in that bug was for wine-gecko. You will need to copy the DLL to the wine-mono directory, which in this case would be ~/.wine/drive_c/windows/mono/mono-2.0/bin/.

Comment 5 Asif Ali Rizvan 2014-01-22 14:59:21 UTC
Yes, copying dll to  ~/.wine/drive_c/windows/mono/mono-2.0/bin/ launches, the game, but hangs (that's a different issue, I guess)

Comment 6 Vincent Povirk 2014-01-22 18:40:00 UTC
IMO, this is may still be a bug in wine-mono (or possibly upstream mono), in that we should prevent mingw from linking libgcc dynamically if possible, though for some reason the mingw I used to build the binary package didn't do this while the mingw in Fedora did. I'd appreciate your help in finding and testing a fix.

But in any case, resolving it for Fedora users will require rebuilding the package, so I think reporting it here was appropriate.

Comment 7 Michael Cronenworth 2014-01-22 20:19:23 UTC
Vincent, I agree it is a Fedora packaging bug. The gcc in Fedora is probably much newer than what you are using. In Fedora 19, gcc 4.8 was shipped and this introduced a dependency on libgcc for a few symbols. We can compile wine-mono, like wine-gecko, by adding -static-libgcc and that will resolve this.

I'll let Andreas handle this or reply first before taking any action.

Comment 8 Leszek Matok 2014-01-23 00:02:35 UTC
And I confirm "yum downgrade wine wine-*" and recreating the wine prefix fixes this.

Leaving this here for people who are freshly installing F20 and hitting this bug.

Comment 9 P. José 2014-03-02 21:48:31 UTC
Fedora 20 x64, wine 1.7.13 , wine-mono 4.5.2

The same problem.

Comment 10 P. José 2014-03-12 22:11:11 UTC
I skirted or fixed the problem with a "radical" solution with these steps:

1- Unistall every app from wine less Wine Gecko

2-Go to terminal and type:
sudo rm -r ~/.wine  
WINEARCH=win32 WINEPREFIX=~/.wine winecfg 

3- Install dotnet40 with: 
winetricks dotnet40

4- Probably the Framework folder will not have the mscoree.dll , you will need to get him from another computer with Windows at C:/windows/Microsoft.NET/Framework/v4.0.30319/  , try to copy it in a pendrive. If you can't acess another computer or does't have the file, try this site: http://www.dll-files.com/dllindex/dll-files.shtml?mscoree  

5- Place the mscoree.dll at                                                                              /home/<YourUserFolderNameHere>/.wine/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/

6- Go to terminal again an type:
wine reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework" /v InstallRoot /t REG_SZ /d 'C:\windows\Microsoft.NET\Framework\' /f

7- Keep the mscoree safe! You will need to put him in your application folder to finish the work! eg.: If I want to start Terraria (a game based in .NET Framework), I must place the mscoree.dll at your main folder. If you don't, the application probably will not work

Done! After ~ 2 mounths, I can start the application with no errors. It worked fine for me.

Sorry for any grammar errors, I'm not a native speaker. Hope this helps ;-)

PS.: may I post this as a proposed patch?

Comment 11 P. José 2014-03-13 00:44:48 UTC
I forgot to say a very important thing in my last comment:
my solution MAY NOT work for your problem and MAY BE wrong

Please, don't follow my steps. I was only describing how I and a 'possible' way to skirt the problem. I really don't know if will work for you.

Thanks, P.

Comment 12 Mykel Alvis 2014-04-06 02:18:17 UTC
Problem still seems to exist for F19 as of today (wine-1.7.8-1.fc19.x86_64)

None of the proposed solutions work (although copying the dll to the mono bin directory did give a new error)


$ Missing method .ctor in assembly C:\Program Files (x86)\GOG.com\GOG.com Downloader.exe, type System.Windows.ThemeInfoAttribute
Can't find custom attr constructor image: C:\Program Files (x86)\GOG.com\GOG.com Downloader.exe mtoken: 0x0a00000e
* Assertion at ../../../mono/mono/metadata/class.c:5600, condition `!mono_loader_get_last_error ()' not met


abnormal program termination
err:mscoree:expect_no_runtimes Process exited with a Mono runtime loaded.

I will try to help debug this (on F19) if anyone wants to give me directions

Comment 13 Ali Akcaagac 2014-05-17 09:27:37 UTC
Fedora 20, Wine 1.7.18, x86

Same Problem.

Comment 14 Ali Akcaagac 2014-06-16 09:31:43 UTC
(In reply to Michael Cronenworth from comment #7)
> We can compile wine-mono, like wine-gecko, by adding -static-libgcc and
> that will resolve this.
> 
> I'll let Andreas handle this or reply first before taking any action.

Any progress with this ? We keep getting Wine updates. Unfortunately this problem still not being addressed.

Comment 15 Fedora Update System 2014-06-25 06:22:18 UTC
wine-mono-4.5.2-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/wine-mono-4.5.2-4.fc20

Comment 16 Fedora Update System 2014-06-25 06:23:47 UTC
wine-mono-4.5.2-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/wine-mono-4.5.2-4.fc19

Comment 17 Fedora Update System 2014-06-26 01:52:21 UTC
Package wine-mono-4.5.2-4.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing wine-mono-4.5.2-4.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7728/wine-mono-4.5.2-4.fc19
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2014-07-04 00:28:53 UTC
wine-mono-4.5.2-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2014-07-04 00:29:43 UTC
wine-mono-4.5.2-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Timothy Arceri 2014-08-07 13:41:25 UTC
I'm still having the same issue with wine-mono-4.5.2-4.fc20. 

Has this update fixed the issue for others?

Comment 21 Michael Cronenworth 2014-08-07 14:01:21 UTC
You need to regenerate your wine prefix to get the new mono binaries. The wine-mono package contains an MSI package that is installed by Wine when your wine prefix is initially created. Wine does not update these files automatically.

An alternative to a new prefix is to uninstall/install Wine mono:
$ WINEPREFIX=$FOO wine msiexec /x /usr/share/wine/mono/wine-mono-4.5.2.msi
$ WINEPREFIX=$FOO wine msiexec /i /usr/share/wine/mono/wine-mono-4.5.2.msi

Comment 22 Timothy Arceri 2014-08-07 22:06:27 UTC
Thanks. Regenerated my wine prefix now its working fine. Sorry for the noise.