[MacPorts] #55273: wine: missing path to MinGW's libstdc++

MacPorts noreply at macports.org
Wed Nov 8 08:35:41 UTC 2017


#55273: wine: missing path to MinGW's libstdc++
--------------------+-----------------------------
 Reporter:  mojca   |      Owner:  ryandesign
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  wine wine-devel
--------------------+-----------------------------
 If users try to cross-compile binaries for Windows using MinGW-w64, they
 cannot run those binaries using Wine unless the binaries are compiled
 statically. On some IRC channel developers suggested:

 > Wine requires that the path be set in its own conf file (not `PATH`
 envvar) that points to wherever the c++ standard library is. At least on
 Linux.

 and

 > you need something like `wine reg add HKCU\\Environment /v PATH /d
 "z:\\usr\\$PRE\\bin;z:\\usr\\local\\$PRE\\bin" /f`
 > with `PRE=i686-w64-mingw32` or similar

 The relevant files are at:
 {{{
   /opt/local/i686-w64-mingw32/lib/libatomic-1.dll
   /opt/local/i686-w64-mingw32/lib/libgcc_s_sjlj-1.dll
   /opt/local/i686-w64-mingw32/lib/libgfortran-4.dll
   /opt/local/i686-w64-mingw32/lib/libobjc-4.dll
   /opt/local/i686-w64-mingw32/lib/libquadmath-0.dll
   /opt/local/i686-w64-mingw32/lib/libssp-0.dll
   /opt/local/i686-w64-mingw32/lib/libstdc++-6.dll
 }}}
 as well as under `x86_64-w64-mingw32`, but I could not make 64-bit
 binaries work with our Wine anyway, so probably only the 32-bit is
 relevant.

 Steps to reproduce:
 {{{
 $ cat hello.cpp
 #include <iostream>
 int main()
 {
         std::cout << "Hello world\n";
         return 0;
 }

 $ sudo port install i686-w64-mingw32-gcc

 $ i686-w64-mingw32-g++ hello.cpp -o hello.exe

 $ wine hello.exe
 err:module:import_dll Library libstdc++-6.dll (which is needed by
 L"Z:\\tmpj\\hello.exe") not found
 err:module:LdrInitializeThunk Main exe initialization for
 L"Z:\\tmp\\hello.exe" failed, status c0000135
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55273>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list