therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.38k stars 735 forks source link

Failed to run qtsetup install in go1.14 with go module vendor mode #1093

Open jxltom opened 4 years ago

jxltom commented 4 years ago

The qtsetup generate succeeds but qtsetup install failes with following error. It occurs with default setup or setting GOFLAGS=-mod=vendor explicitly.

It only happen in go1.14, go1.13 doesn't have this issue.

I made it work with GOFLAGS=-mod=mod but it will install library to mod cache instead of project's vendor directory.

git:(master) ✗ qtsetup install
INFO[0000] running: 'qtsetup install linux' [docker=false] [vagrant=false] 
INFO[0000] installing full qt/core                      
INFO[0000] installing full qt/androidextras             
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/androidextras outside GOPATH
        For more details see: 'go help gopath'

INFO[0000] installing full qt/gui                       
github.com/therecipe/qt/internal/binding/runtime
# github.com/therecipe/qt/internal/binding/runtime
vendor/github.com/therecipe/qt/internal/binding/runtime/moc.go:101:16: undefined: qml

INFO[0001] installing full qt/network                   
INFO[0001] installing full qt/xml                       
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/xml outside GOPATH
        For more details see: 'go help gopath'

INFO[0001] installing full qt/dbus                      
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/dbus outside GOPATH
        For more details see: 'go help gopath'

INFO[0001] installing full qt/nfc                       
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/nfc outside GOPATH
        For more details see: 'go help gopath'

INFO[0001] installing full qt/script                    
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/script outside GOPATH
        For more details see: 'go help gopath'

INFO[0001] installing full qt/sensors                   
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/sensors outside GOPATH
        For more details see: 'go help gopath'

INFO[0001] installing full qt/positioning               
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/positioning outside GOPATH
        For more details see: 'go help gopath'

INFO[0002] installing full qt/widgets                   
github.com/therecipe/qt/internal/binding/runtime
# github.com/therecipe/qt/internal/binding/runtime
vendor/github.com/therecipe/qt/internal/binding/runtime/moc.go:101:16: undefined: qml

INFO[0003] installing full qt/sql                       
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/sql outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/qml                       
INFO[0003] installing full qt/websockets                
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/websockets outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/xmlpatterns               
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/xmlpatterns outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/bluetooth                 
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/bluetooth outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/webchannel                
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/webchannel outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/svg                       
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/svg outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/multimedia                
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/multimedia outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/quick                     
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/quick outside GOPATH
        For more details see: 'go help gopath'

INFO[0003] installing full qt/help                      
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/help outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/location                  
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/location outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/scripttools               
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/scripttools outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/uitools                   
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/uitools outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/webengine                 
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/webengine outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/testlib                   
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/testlib outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/serialport                
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/serialport outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/serialbus                 
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/serialbus outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/printsupport              
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/printsupport outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/designer                  
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/designer outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/scxml                     
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/scxml outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/gamepad                   
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/gamepad outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/purchasing                
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/purchasing outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/datavisualization    [GPLv3] 
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/datavisualization outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/charts               [GPLv3] 
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/charts outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/virtualkeyboard      [GPLv3] 
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/virtualkeyboard outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/speech                    
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/speech outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/quickcontrols2            
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/quickcontrols2 outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/sailfish                  
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/sailfish outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/webview                   
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/webview outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/remoteobjects             
go install: no install location for directory myproject/vendor/github.com/therecipe/qt/remoteobjects outside GOPATH
        For more details see: 'go help gopath'

INFO[0004] installing full qt/internal/binding/runtime  
github.com/therecipe/qt/internal/binding/runtime
# github.com/therecipe/qt/internal/binding/runtime
vendor/github.com/therecipe/qt/internal/binding/runtime/moc.go:101:16: undefined: qml

WARN[0006] failed to install:                           
WARN[0006] androidextras                                
WARN[0006] gui                                          
WARN[0006] xml                                          
WARN[0006] dbus                                         
WARN[0006] nfc                                          
WARN[0006] script                                       
WARN[0006] sensors                                      
WARN[0006] positioning                                  
WARN[0006] widgets                                      
WARN[0006] sql                                          
WARN[0006] websockets                                   
WARN[0006] xmlpatterns                                  
WARN[0006] bluetooth                                    
WARN[0006] webchannel                                   
WARN[0006] svg                                          
WARN[0006] multimedia                                   
WARN[0006] quick                                        
WARN[0006] help                                         
WARN[0006] location                                     
WARN[0006] scripttools                                  
WARN[0006] uitools                                      
WARN[0006] webengine                                    
WARN[0006] testlib                                      
WARN[0006] serialport                                   
WARN[0006] serialbus                                    
WARN[0006] printsupport                                 
WARN[0006] designer                                     
WARN[0006] scxml                                        
WARN[0006] gamepad                                      
WARN[0006] purchasing                                   
WARN[0006] datavisualization                            
WARN[0006] charts                                       
WARN[0006] virtualkeyboard                              
WARN[0006] speech                                       
WARN[0006] quickcontrols2                               
WARN[0006] sailfish                                     
WARN[0006] webview                                      
WARN[0006] remoteobjects                                
WARN[0006] internal/binding/runtime                     
flymzero commented 4 years ago

you need move your project into GOPATH/src/...., but i get other issues:

github.com/therecipe/qt/internal/binding/runtime
# github.com/therecipe/qt/internal/binding/runtime
vendor/github.com/therecipe/qt/internal/binding/runtime/moc.go:101:16: undefined: qml
jxltom commented 4 years ago

This go vendor mode, I don't think I need to put it upder GOPATH

flymzero commented 4 years ago

i think qtsetup install xxx need in GOPATH, i move to my project into GOPATH, and fix 'undefined: qml' bug, it is run ok.

jxltom commented 3 years ago

I can confirm the issue still exists in go 1.15