Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETH 1.9 cross compile for windows error #5

Open
thomasmodeneis opened this issue Aug 5, 2019 · 7 comments
Open

GETH 1.9 cross compile for windows error #5

thomasmodeneis opened this issue Aug 5, 2019 · 7 comments

Comments

@thomasmodeneis
Copy link

thomasmodeneis commented Aug 5, 2019

I am having a hard time to compile geth 1.9.0 for windows, this is the error... any ideas ?
same error happens on linux/osx with go11 or go12.

➜  go-ethereum git:(52f246177) make geth-windows
# github.com/ethereum/go-ethereum/vendor/github.com/karalabe/usb
In file included from /usr/share/mingw-w64/include/objbase.h:14:0,
                 from /usr/share/mingw-w64/include/ole2.h:17,
                 from /usr/share/mingw-w64/include/wtypes.h:12,
                 from /usr/share/mingw-w64/include/winscard.h:10,
                 from /usr/share/mingw-w64/include/windows.h:97,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusb.h:76,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusbi.h:39,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/poll_windows.c:43,
                 from ../../vendor/github.com/karalabe/usb/libs.go:41:
/usr/share/mingw-w64/include/oledlg.h:428:3: error: unknown type name 'interface'
   DECLARE_INTERFACE_(IOleUILinkContainerW,IUnknown) {
   ^
/usr/share/mingw-w64/include/oledlg.h:428:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   DECLARE_INTERFACE_(IOleUILinkContainerW,IUnknown) {
   ^
In file included from /usr/share/mingw-w64/include/setupapi.h:27:0,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/windows_winusb.c:29,
                 from ../../vendor/github.com/karalabe/usb/libs.go:55:
/usr/share/mingw-w64/include/oledlg.h:429:31: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID *ppvObj) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:430:30: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:431:31: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD_(ULONG,Release)(THIS) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:432:35: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD_(DWORD,GetNextLink)(THIS_ DWORD dwLink) PURE;
                                   ^
/usr/share/mingw-w64/include/oledlg.h:433:37: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(SetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD dwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:434:37: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(GetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD *lpdwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:435:30: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(SetLinkSource)(THIS_ DWORD dwLink,LPWSTR lpszDisplayName,ULONG lenFileName,ULONG *pchEaten,WINBOOL fValidateSource) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:436:30: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(GetLinkSource)(THIS_ DWORD dwLink,LPWSTR *lplpszDisplayName,ULONG *lplenFileName,LPWSTR *lplpszFullLinkType,LPWSTR *lplpszShortLinkType,WINBOOL *lpfSourceAvailable,WINBOOL *lpfIsSelected) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:437:31: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(OpenLinkSource)(THIS_ DWORD dwLink) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:438:27: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(UpdateLink)(THIS_ DWORD dwLink,WINBOOL fErrorMessage,WINBOOL fReserved) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:439:27: error: expected declaration specifiers or '...' before 'IOleUILinkContainerW'
     STDMETHOD(CancelLink)(THIS_ DWORD dwLink) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:442:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   typedef IOleUILinkContainerW *LPOLEUILINKCONTAINERW;
                                ^
In file included from /usr/share/mingw-w64/include/objbase.h:14:0,
                 from /usr/share/mingw-w64/include/ole2.h:17,
                 from /usr/share/mingw-w64/include/wtypes.h:12,
                 from /usr/share/mingw-w64/include/winscard.h:10,
                 from /usr/share/mingw-w64/include/windows.h:97,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusb.h:76,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusbi.h:39,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/poll_windows.c:43,
                 from ../../vendor/github.com/karalabe/usb/libs.go:41:
/usr/share/mingw-w64/include/oledlg.h:447:3: error: unknown type name 'interface'
   DECLARE_INTERFACE_(IOleUILinkContainerA,IUnknown) {
   ^
/usr/share/mingw-w64/include/oledlg.h:447:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   DECLARE_INTERFACE_(IOleUILinkContainerA,IUnknown) {
   ^
In file included from /usr/share/mingw-w64/include/setupapi.h:27:0,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/windows_winusb.c:29,
                 from ../../vendor/github.com/karalabe/usb/libs.go:55:
/usr/share/mingw-w64/include/oledlg.h:448:31: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID *ppvObj) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:449:30: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:450:31: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD_(ULONG,Release)(THIS) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:451:35: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD_(DWORD,GetNextLink)(THIS_ DWORD dwLink) PURE;
                                   ^
/usr/share/mingw-w64/include/oledlg.h:452:37: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(SetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD dwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:453:37: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(GetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD *lpdwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:454:30: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(SetLinkSource)(THIS_ DWORD dwLink,LPSTR lpszDisplayName,ULONG lenFileName,ULONG *pchEaten,WINBOOL fValidateSource) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:455:30: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(GetLinkSource)(THIS_ DWORD dwLink,LPSTR *lplpszDisplayName,ULONG *lplenFileName,LPSTR *lplpszFullLinkType,LPSTR *lplpszShortLinkType,WINBOOL *lpfSourceAvailable,WINBOOL *lpfIsSelected) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:456:31: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(OpenLinkSource)(THIS_ DWORD dwLink) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:457:27: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(UpdateLink)(THIS_ DWORD dwLink,WINBOOL fErrorMessage,WINBOOL fReserved) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:458:27: error: expected declaration specifiers or '...' before 'IOleUILinkContainerA'
     STDMETHOD(CancelLink)(THIS_ DWORD dwLink) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:461:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   typedef IOleUILinkContainerA *LPOLEUILINKCONTAINERA;
                                ^
/usr/share/mingw-w64/include/oledlg.h:478:5: error: unknown type name 'LPOLEUILINKCONTAINERW'
     LPOLEUILINKCONTAINERW lpOleUILinkContainer;
     ^
/usr/share/mingw-w64/include/oledlg.h:491:5: error: unknown type name 'LPOLEUILINKCONTAINERA'
     LPOLEUILINKCONTAINERA lpOleUILinkContainer;
     ^
/usr/share/mingw-w64/include/oledlg.h:711:5: error: unknown type name 'LPOLEUILINKCONTAINERW'
     LPOLEUILINKCONTAINERW lpOleUILinkContainer;
     ^
/usr/share/mingw-w64/include/oledlg.h:731:5: error: unknown type name 'LPOLEUILINKCONTAINERA'
     LPOLEUILINKCONTAINERA lpOleUILinkContainer;
     ^
In file included from /usr/share/mingw-w64/include/objbase.h:14:0,
                 from /usr/share/mingw-w64/include/ole2.h:17,
                 from /usr/share/mingw-w64/include/wtypes.h:12,
                 from /usr/share/mingw-w64/include/winscard.h:10,
                 from /usr/share/mingw-w64/include/windows.h:97,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusb.h:76,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusbi.h:39,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/poll_windows.c:43,
                 from ../../vendor/github.com/karalabe/usb/libs.go:41:
/usr/share/mingw-w64/include/oledlg.h:767:3: error: unknown type name 'interface'
   DECLARE_INTERFACE_(IOleUIObjInfoW,IUnknown) {
   ^
/usr/share/mingw-w64/include/oledlg.h:767:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   DECLARE_INTERFACE_(IOleUIObjInfoW,IUnknown) {
   ^
In file included from /usr/share/mingw-w64/include/setupapi.h:27:0,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/windows_winusb.c:29,
                 from ../../vendor/github.com/karalabe/usb/libs.go:55:
/usr/share/mingw-w64/include/oledlg.h:768:31: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID *ppvObj) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:769:30: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:770:31: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD_(ULONG,Release)(THIS) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:771:30: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD(GetObjectInfo)(THIS_ DWORD dwObject,DWORD *lpdwObjSize,LPWSTR *lplpszLabel,LPWSTR *lplpszType,LPWSTR *lplpszShortType,LPWSTR *lplpszLocation) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:772:31: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD(GetConvertInfo)(THIS_ DWORD dwObject,CLSID *lpClassID,WORD *lpwFormat,CLSID *lpConvertDefaultClassID,LPCLSID *lplpClsidExclude,UINT *lpcClsidExclude) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:773:30: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD(ConvertObject)(THIS_ DWORD dwObject,REFCLSID clsidNew) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:774:28: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD(GetViewInfo)(THIS_ DWORD dwObject,HGLOBAL *phMetaPict,DWORD *pdvAspect,int *pnCurrentScale) PURE;
                            ^
/usr/share/mingw-w64/include/oledlg.h:775:28: error: expected declaration specifiers or '...' before 'IOleUIObjInfoW'
     STDMETHOD(SetViewInfo)(THIS_ DWORD dwObject,HGLOBAL hMetaPict,DWORD dvAspect,int nCurrentScale,WINBOOL bRelativeToOrig) PURE;
                            ^
/usr/share/mingw-w64/include/oledlg.h:778:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   typedef IOleUIObjInfoW *LPOLEUIOBJINFOW;
                          ^
In file included from /usr/share/mingw-w64/include/objbase.h:14:0,
                 from /usr/share/mingw-w64/include/ole2.h:17,
                 from /usr/share/mingw-w64/include/wtypes.h:12,
                 from /usr/share/mingw-w64/include/winscard.h:10,
                 from /usr/share/mingw-w64/include/windows.h:97,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusb.h:76,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusbi.h:39,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/poll_windows.c:43,
                 from ../../vendor/github.com/karalabe/usb/libs.go:41:
/usr/share/mingw-w64/include/oledlg.h:783:3: error: unknown type name 'interface'
   DECLARE_INTERFACE_(IOleUIObjInfoA,IUnknown) {
   ^
/usr/share/mingw-w64/include/oledlg.h:783:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   DECLARE_INTERFACE_(IOleUIObjInfoA,IUnknown) {
   ^
In file included from /usr/share/mingw-w64/include/setupapi.h:27:0,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/windows_winusb.c:29,
                 from ../../vendor/github.com/karalabe/usb/libs.go:55:
/usr/share/mingw-w64/include/oledlg.h:784:31: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID *ppvObj) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:785:30: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:786:31: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD_(ULONG,Release)(THIS) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:787:30: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD(GetObjectInfo)(THIS_ DWORD dwObject,DWORD *lpdwObjSize,LPSTR *lplpszLabel,LPSTR *lplpszType,LPSTR *lplpszShortType,LPSTR *lplpszLocation) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:788:31: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD(GetConvertInfo)(THIS_ DWORD dwObject,CLSID *lpClassID,WORD *lpwFormat,CLSID *lpConvertDefaultClassID,LPCLSID *lplpClsidExclude,UINT *lpcClsidExclude) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:789:30: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD(ConvertObject)(THIS_ DWORD dwObject,REFCLSID clsidNew) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:790:28: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD(GetViewInfo)(THIS_ DWORD dwObject,HGLOBAL *phMetaPict,DWORD *pdvAspect,int *pnCurrentScale) PURE;
                            ^
/usr/share/mingw-w64/include/oledlg.h:791:28: error: expected declaration specifiers or '...' before 'IOleUIObjInfoA'
     STDMETHOD(SetViewInfo)(THIS_ DWORD dwObject,HGLOBAL hMetaPict,DWORD dvAspect,int nCurrentScale,WINBOOL bRelativeToOrig) PURE;
                            ^
/usr/share/mingw-w64/include/oledlg.h:794:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   typedef IOleUIObjInfoA *LPOLEUIOBJINFOA;
                          ^
In file included from /usr/share/mingw-w64/include/objbase.h:14:0,
                 from /usr/share/mingw-w64/include/ole2.h:17,
                 from /usr/share/mingw-w64/include/wtypes.h:12,
                 from /usr/share/mingw-w64/include/winscard.h:10,
                 from /usr/share/mingw-w64/include/windows.h:97,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusb.h:76,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusbi.h:39,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/poll_windows.c:43,
                 from ../../vendor/github.com/karalabe/usb/libs.go:41:
/usr/share/mingw-w64/include/oledlg.h:804:3: error: unknown type name 'interface'
   DECLARE_INTERFACE_(IOleUILinkInfoW,IOleUILinkContainerW) {
   ^
/usr/share/mingw-w64/include/oledlg.h:804:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   DECLARE_INTERFACE_(IOleUILinkInfoW,IOleUILinkContainerW) {
   ^
In file included from /usr/share/mingw-w64/include/setupapi.h:27:0,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/windows_winusb.c:29,
                 from ../../vendor/github.com/karalabe/usb/libs.go:55:
/usr/share/mingw-w64/include/oledlg.h:805:31: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID *ppvObj) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:806:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:807:31: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD_(ULONG,Release)(THIS) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:808:35: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD_(DWORD,GetNextLink)(THIS_ DWORD dwLink) PURE;
                                   ^
/usr/share/mingw-w64/include/oledlg.h:809:37: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(SetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD dwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:810:37: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(GetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD *lpdwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:811:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(SetLinkSource)(THIS_ DWORD dwLink,LPWSTR lpszDisplayName,ULONG lenFileName,ULONG *pchEaten,WINBOOL fValidateSource) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:812:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(GetLinkSource)(THIS_ DWORD dwLink,LPWSTR *lplpszDisplayName,ULONG *lplenFileName,LPWSTR *lplpszFullLinkType,LPWSTR *lplpszShortLinkType,WINBOOL *lpfSourceAvailable,WINBOOL *lpfIsSelected) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:813:31: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(OpenLinkSource)(THIS_ DWORD dwLink) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:814:27: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(UpdateLink)(THIS_ DWORD dwLink,WINBOOL fErrorMessage,WINBOOL fReserved) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:815:27: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(CancelLink)(THIS_ DWORD dwLink) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:816:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoW'
     STDMETHOD(GetLastUpdate)(THIS_ DWORD dwLink,FILETIME *lpLastUpdate) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:819:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   typedef IOleUILinkInfoW *LPOLEUILINKINFOW;
                           ^
In file included from /usr/share/mingw-w64/include/objbase.h:14:0,
                 from /usr/share/mingw-w64/include/ole2.h:17,
                 from /usr/share/mingw-w64/include/wtypes.h:12,
                 from /usr/share/mingw-w64/include/winscard.h:10,
                 from /usr/share/mingw-w64/include/windows.h:97,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusb.h:76,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/libusbi.h:39,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/poll_windows.c:43,
                 from ../../vendor/github.com/karalabe/usb/libs.go:41:
/usr/share/mingw-w64/include/oledlg.h:824:3: error: unknown type name 'interface'
   DECLARE_INTERFACE_(IOleUILinkInfoA,IOleUILinkContainerA) {
   ^
/usr/share/mingw-w64/include/oledlg.h:824:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   DECLARE_INTERFACE_(IOleUILinkInfoA,IOleUILinkContainerA) {
   ^
In file included from /usr/share/mingw-w64/include/setupapi.h:27:0,
                 from ../../vendor/github.com/karalabe/usb/libusb/libusb/os/windows_winusb.c:29,
                 from ../../vendor/github.com/karalabe/usb/libs.go:55:
/usr/share/mingw-w64/include/oledlg.h:825:31: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(QueryInterface)(THIS_ REFIID riid,LPVOID *ppvObj) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:826:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:827:31: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD_(ULONG,Release)(THIS) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:828:35: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD_(DWORD,GetNextLink)(THIS_ DWORD dwLink) PURE;
                                   ^
/usr/share/mingw-w64/include/oledlg.h:829:37: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(SetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD dwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:830:37: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(GetLinkUpdateOptions)(THIS_ DWORD dwLink,DWORD *lpdwUpdateOpt) PURE;
                                     ^
/usr/share/mingw-w64/include/oledlg.h:831:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(SetLinkSource)(THIS_ DWORD dwLink,LPSTR lpszDisplayName,ULONG lenFileName,ULONG *pchEaten,WINBOOL fValidateSource) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:832:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(GetLinkSource)(THIS_ DWORD dwLink,LPSTR *lplpszDisplayName,ULONG *lplenFileName,LPSTR *lplpszFullLinkType,LPSTR *lplpszShortLinkType,WINBOOL *lpfSourceAvailable,WINBOOL *lpfIsSelected) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:833:31: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(OpenLinkSource)(THIS_ DWORD dwLink) PURE;
                               ^
/usr/share/mingw-w64/include/oledlg.h:834:27: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(UpdateLink)(THIS_ DWORD dwLink,WINBOOL fErrorMessage,WINBOOL fReserved) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:835:27: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(CancelLink)(THIS_ DWORD dwLink) PURE;
                           ^
/usr/share/mingw-w64/include/oledlg.h:836:30: error: expected declaration specifiers or '...' before 'IOleUILinkInfoA'
     STDMETHOD(GetLastUpdate)(THIS_ DWORD dwLink,FILETIME *lpLastUpdate) PURE;
                              ^
/usr/share/mingw-w64/include/oledlg.h:839:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   typedef IOleUILinkInfoA *LPOLEUILINKINFOA;
                           ^
/usr/share/mingw-w64/include/oledlg.h:952:5: error: unknown type name 'LPOLEUIOBJINFOW'
     LPOLEUIOBJINFOW lpObjInfo;
     ^
/usr/share/mingw-w64/include/oledlg.h:954:5: error: unknown type name 'LPOLEUILINKINFOW'
     LPOLEUILINKINFOW lpLinkInfo;
     ^
/usr/share/mingw-w64/include/oledlg.h:965:5: error: unknown type name 'LPOLEUIOBJINFOA'
     LPOLEUIOBJINFOA lpObjInfo;
     ^
/usr/share/mingw-w64/include/oledlg.h:967:5: error: unknown type name 'LPOLEUILINKINFOA'
     LPOLEUILINKINFOA lpLinkInfo;
     ^
/usr/share/mingw-w64/include/oledlg.h:1023:38: error: unknown type name 'LPOLEUILINKCONTAINERW'
   STDAPI_(WINBOOL) OleUIUpdateLinksW(LPOLEUILINKCONTAINERW lpOleUILinkCntr,HWND hwndParent,LPWSTR lpszTitle,int cLinks);
                                      ^
/usr/share/mingw-w64/include/oledlg.h:1024:38: error: unknown type name 'LPOLEUILINKCONTAINERA'
   STDAPI_(WINBOOL) OleUIUpdateLinksA(LPOLEUILINKCONTAINERA lpOleUILinkCntr,HWND hwndParent,LPSTR lpszTitle,int cLinks);
                                      ^
@fllaca
Copy link

fllaca commented Aug 5, 2019

@thomasmodeneis I have spent the whole day struggling with this and finally it was an issue with my g++ and mingw version. I compiled for windows inside a ubuntu:19.04 container with g++ and mingw and it worked for me.

@thomasmodeneis
Copy link
Author

thomasmodeneis commented Aug 5, 2019

Hi, many thanks for looking into this. I tried updating all the libs, would you mind sharing the versions you are using that allowed you to compile it with success ?

mingw:

$ sudo apt-get upgrade gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 

(...)
g++-mingw-w64-x86-64 is already the newest version (7.3.0-11ubuntu1+20.2build1).
gcc-mingw-w64-x86-64 is already the newest version (7.3.0-11ubuntu1+20.2build1)

g++:

$ g++ -v  
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.5.0-2ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-as=/usr/bin/x86_64-linux-gnu-as --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.5.0 20181026 (Ubuntu 6.5.0-2ubuntu1~18.04) 

@fllaca
Copy link

fllaca commented Aug 5, 2019

@thomasmodeneis No :( , those versions you show didn't work for me. Those are the versions that I have in my ubuntu:18.04 machine and they didn't work.

You need either to upgrade to ubuntu 19.04 or to run all this inside a container (example: docker run -it --rm --entrypoint bash ubuntu:19.04). These are the versions that worked for me:

root@3a47ccadb391:/# apt-cache policy g++-mingw-w64-x86-64
g++-mingw-w64-x86-64:
  Installed: 8.3.0-6ubuntu1+21.1build2
  Candidate: 8.3.0-6ubuntu1+21.1build2
  Version table:
 *** 8.3.0-6ubuntu1+21.1build2 500
        500 http://archive.ubuntu.com/ubuntu disco/universe amd64 Packages
        100 /var/lib/dpkg/status
root@3a47ccadb391:/# g++ --version
g++ (Ubuntu 8.3.0-6ubuntu1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@thomasmodeneis
Copy link
Author

I did just like you said, upgraded to Ubuntu 19 and upgraded g++ and mingw, but still the error persists:

# apt-cache policy g++-mingw-w64-x86-64
g++-mingw-w64-x86-64:
  Installed: 8.3.0-6ubuntu1+21.1build2
  Candidate: 8.3.0-6ubuntu1+21.1build2
  Version table:
 *** 8.3.0-6ubuntu1+21.1build2 500
        500 http://mirrors.digitalocean.com/ubuntu disco/universe amd64 Packages
        100 /var/lib/dpkg/status

# g++ --version
g++ (Ubuntu 8.3.0-6ubuntu1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm not what is wrong, but something still wrong :(

@thomasmodeneis
Copy link
Author

thomasmodeneis commented Aug 13, 2019

I also did it with a VM using Ubuntu 19, and ran into the same error.
@fllaca are you running make geth-windows as well ? did you installed anything else besides mingw ? I installed it with: sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine64

@karalabe do you have any ideas what maybe wrong or what shall I do to make it right ?

Edit: I even tried with GCC9 and got the same error.

Thanks.

@thomasmodeneis
Copy link
Author

I found that the go-ethereum is currently not building the windows versions on linux, the windows versions is being build via appveyor job, is this the case ?

@gpersoon
Copy link

See ethereum/go-ethereum#20093

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants