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

When I run " make geth-windows " this error is happened , why? #20093

Closed
YongilChoi opened this issue Sep 19, 2019 · 12 comments
Closed

When I run " make geth-windows " this error is happened , why? #20093

YongilChoi opened this issue Sep 19, 2019 · 12 comments
Assignees

Comments

@YongilChoi
Copy link

Hi there,

please note that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use the gitter channel or the Ethereum stack exchange at https://ethereum.stackexchange.com.

System information

Geth version: 1.9.1-stable
OS & Version: Ubuntu 19.04
Commit hash : (if develop)

Expected behaviour

if I run " make geth-windows" ,
builder should make geth.exe on linux ,, /build/bin/

Actual behaviour

compile error.

Steps to reproduce the behaviour

Backtrace

[backtrace]

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) {

@karalabe
Copy link
Member

If you want to run on Windows, please build on Windows for now. I can try to take a peek into the cross compiler, but it's really low priority.

@bobcodz
Copy link

bobcodz commented Sep 24, 2019

Have got the same issue when I try go run a simple project on windows..

Used to work before.

vendor/github.com/ethereum/go-ethereum/vendor/github.com/karalabe/usb
In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/objbase.h:14:0,
from C:/TDM-GCC-64/x86_64-w64-mingw32/include/ole2.h:17,
from C:/TDM-GCC-64/x86_64-w64-mingw32/include/wtypes.h:12,
from C:/TDM-GCC-64/x86_64-w64-mingw32/include/winscard.h:10,
from C:/TDM-GCC-64/x86_64-w64-mingw32/include/windows.h:97,
from ..\vendor\github.com\ethereum\go-ethereum\vendor\github.com\karalabe\usb\libusb\libusb/libusb.h:76,
from ..\vendor\github.com\ethereum\go-ethereum\vendor\github.com\karalabe\usb\libusb\libusb/libusbi.h:39,
from ..\vendor\github.com\ethereum\go-ethereum\vendor\github.com\karalabe\usb\libusb\libusb/os/poll_windows.c:43,
from ..\vendor\github.com\ethereum\go-ethereum\vendor\github.com\karalabe\usb\libs.go:41:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/oledlg.h:428:3: error: unknown type name 'interface'
DECLARE_INTERFACE_(IOleUILinkContainerW,IUnknown) {

@hunjixin
Copy link

same error

@gpersoon
Copy link

I just figured out how to compile on windows: #20121 (comment)

@evantandersen
Copy link

This is fixed when using a mingw version 6+. Versions of Ubuntu earlier than 19.04 have mingw ver. 5 in the package manager. I ran into this problem, found a comment on another issue (vipnode/vipnode#82 (comment)) and tried installing a version 6 backport: https://launchpad.net/~mati865/+archive/ubuntu/mingw-w64

As soon as I installed mingw 6, everything compiled nicely.

@vkuznecovas
Copy link

Can confirm that gcc 8+ and mingw 6+ seems to solve this, thanks @charliehorse55

@ligi
Copy link
Member

ligi commented Dec 17, 2020

@YongilChoi do you still have this issue? Or did the solution from @charliehorse55 work for you?

@MariusVanDerWijden
Copy link
Member

I have a similar issue when running with gcc 10.2 mingw-w64-gcc-10.2

# 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 /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20190919080040-51dc0efba356/libusb/libusb/libusb.h:76,
                 from /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20190919080040-51dc0efba356/libusb/libusb/libusbi.h:39,
                 from /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20190919080040-51dc0efba356/libusb/libusb/os/poll_windows.c:43,
                 from /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20190919080040-51dc0efba356/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 /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20190919080040-51dc0efba356/libusb/libusb/os/windows_winusb.c:29,
                 from /go/pkg/mod/github.com/karalabe/usb@v0.0.0-20190919080040-51dc0efba356/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;

@evantandersen
Copy link

What version of mingw is that?

@MariusVanDerWijden
Copy link
Member

@charliehorse55 I think it is 8, it's this one https://www.archlinux.org/packages/community/x86_64/mingw-w64-gcc/

@YongilChoi
Copy link
Author

YongilChoi commented Dec 21, 2020 via email

@holiman
Copy link
Contributor

holiman commented Feb 21, 2023

Whatever build problem we have on windows now, I don't think they have any relation to build issues in 2019. Closing.

@holiman holiman closed this as completed Feb 21, 2023
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