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.49k stars 748 forks source link

Installation problem qtsetup fails #541

Closed woodyjon closed 6 years ago

woodyjon commented 6 years ago

Hello,

I am trying to install the binding but I have the following errors. Your help would be much appreciated. Here are the steps I did:

I thought it was my gopath not set, but I think it is fine.

INFO[0061] generating full qt/speech                    
INFO[0061] generating full qt/quickcontrols2            
INFO[0061] generating full qt/sailfish                  
INFO[0061] generating full qt/webview                   
INFO[0061] generating full qt/remoteobjects             
INFO[0062] running: 'qtsetup install linux' [docker=false] [vagrant=false] 
INFO[0062] installing full qt/core                      
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/core" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install core"

INFO[0062] installing full qt/androidextras             
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/androidextras" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install androidextras"

INFO[0062] installing full qt/gui                       
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/gui" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install gui"

INFO[0062] installing full qt/network                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/network" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install network"

INFO[0062] installing full qt/xml                       
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/xml" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install xml"

INFO[0062] installing full qt/dbus                      
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/dbus" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install dbus"

INFO[0062] installing full qt/nfc                       
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/nfc" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install nfc"

INFO[0062] installing full qt/script                    
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/script" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install script"

INFO[0062] installing full qt/sensors                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/sensors" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install sensors"

INFO[0062] installing full qt/positioning               
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/positioning" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install positioning"

INFO[0062] installing full qt/widgets                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/widgets" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install widgets"

INFO[0062] installing full qt/sql                       
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/sql" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install sql"

INFO[0062] installing full qt/qml                       
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/qml" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install qml"

INFO[0062] installing full qt/websockets                
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/websockets" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install websockets"

INFO[0062] installing full qt/xmlpatterns               
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/xmlpatterns" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install xmlpatterns"

INFO[0062] installing full qt/bluetooth                 
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/bluetooth" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install bluetooth"

INFO[0062] installing full qt/webchannel                
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/webchannel" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install webchannel"

INFO[0062] installing full qt/svg                       
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/svg" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install svg"

INFO[0062] installing full qt/multimedia                
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/multimedia" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install multimedia"

INFO[0062] installing full qt/quick                     
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/quick" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install quick"

INFO[0062] installing full qt/help                      
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/help" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install help"

INFO[0062] installing full qt/location                  
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/location" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install location"

INFO[0062] installing full qt/scripttools               
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/scripttools" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install scripttools"

INFO[0062] installing full qt/uitools                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/uitools" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install uitools"

INFO[0062] installing full qt/webengine                 
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/webengine" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install webengine"

INFO[0062] installing full qt/testlib                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/testlib" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install testlib"

INFO[0062] installing full qt/serialport                
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/serialport" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install serialport"

INFO[0062] installing full qt/serialbus                 
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/serialbus" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install serialbus"

INFO[0062] installing full qt/printsupport              
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/printsupport" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install printsupport"

INFO[0062] installing full qt/designer                  
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/designer" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install designer"

INFO[0062] installing full qt/scxml                     
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/scxml" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install scxml"

INFO[0062] installing full qt/gamepad                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/gamepad" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install gamepad"

INFO[0062] installing full qt/purchasing                
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/purchasing" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install purchasing"

INFO[0062] installing full qt/datavisualization         
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/datavisualization" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install datavisualization"

INFO[0062] installing full qt/charts                    
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/charts" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install charts"

INFO[0062] installing full qt/speech                    
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/speech" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install speech"

INFO[0062] installing full qt/quickcontrols2            
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/quickcontrols2" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install quickcontrols2"

INFO[0062] installing full qt/sailfish                  
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/sailfish" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install sailfish"

INFO[0062] installing full qt/webview                   
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/webview" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install webview"

INFO[0062] installing full qt/remoteobjects             
ERRO[0062] failed to run command                         cmd="go install -p 8 -v github.com/therecipe/qt/remoteobjects" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmdOptionalError name="install remoteobjects"

WARN[0062] failed to install:                           
WARN[0062] core                                         
WARN[0062] androidextras                                
WARN[0062] gui                                          
WARN[0062] network                                      
WARN[0062] xml                                          
WARN[0062] dbus                                         
WARN[0062] nfc                                          
WARN[0062] script                                       
WARN[0062] sensors                                      
WARN[0062] positioning                                  
WARN[0062] widgets                                      
WARN[0062] sql                                          
WARN[0062] qml                                          
WARN[0062] websockets                                   
WARN[0062] xmlpatterns                                  
WARN[0062] bluetooth                                    
WARN[0062] webchannel                                   
WARN[0062] svg                                          
WARN[0062] multimedia                                   
WARN[0062] quick                                        
WARN[0062] help                                         
WARN[0062] location                                     
WARN[0062] scripttools                                  
WARN[0062] uitools                                      
WARN[0062] webengine                                    
WARN[0062] testlib                                      
WARN[0062] serialport                                   
WARN[0062] serialbus                                    
WARN[0062] printsupport                                 
WARN[0062] designer                                     
WARN[0062] scxml                                        
WARN[0062] gamepad                                      
WARN[0062] purchasing                                   
WARN[0062] datavisualization                            
WARN[0062] charts                                       
WARN[0062] speech                                       
WARN[0062] quickcontrols2                               
WARN[0062] sailfish                                     
WARN[0062] webview                                      
WARN[0062] remoteobjects                                
INFO[0062] running: 'qtsetup test linux' [docker=false] [vagrant=false] 
INFO[0062] testing quick/calc                           
ERRO[0062] failed to run command                         cmd="go list std" env= error="exec: \"go\": executable file not found in $PATH" func=RunCmd name="go list std"
RadhiFadlillah commented 6 years ago

It seems go is not detected on your $PATH. Can you show me the output for :

woodyjon commented 6 years ago

There you go:

$ which go
/usr/local/go/bin/go
$ qtsetup check
INFO[0000] running: 'qtsetup check linux' [docker=false] [vagrant=false] 
INFO[0000] GOOS:                        'linux'         
INFO[0000] GOARCH:                      'amd64'         
INFO[0000] GOVERSION:                   'go1.9.2'       
INFO[0000] GOROOT:                      '/usr/local/go' 
INFO[0000] GOPATH:                   *  '/home/jon/Dropbox/go' 
INFO[0000] GOBIN:                    *  '/home/jon/Dropbox/go/bin' 
INFO[0000] QT_HASH:                     'a76e7081468b0d9d554349b66b4971929f036ce7' 
INFO[0000] QT_VERSION:                  '5.10.0'        
INFO[0000] QT_VERSION_MAJOR:            '5.10.0'        
INFO[0000] QT_DIR:                      '/home/jon/Qt'  
INFO[0000] QT_STUB:                     'false'         
INFO[0000] QT_DEBUG:                    'false'         
INFO[0000] QT_QMAKE_DIR:                ''              
INFO[0000] QT_WEBKIT:                   'false'         
INFO[0000] QT_DISTRO:                   'ubuntu'        
INFO[0000] QT_PKG_CONFIG:               'false'   
hexvalid commented 6 years ago

Same problem on Arch Linux:

$GOPATH/bin/qtsetup

INFO[0000] running: 'qtsetup prep'                      
WARN[0000] failed to create qtrcc symlink in your PATH (/usr/lib/go/bin/qtrcc); please use /home/hexvalid/Go/bin/qtrcc instead 
WARN[0000] failed to create qtmoc symlink in your PATH (/usr/lib/go/bin/qtmoc); please use /home/hexvalid/Go/bin/qtmoc instead 
WARN[0000] failed to create qtminimal symlink in your PATH (/usr/lib/go/bin/qtminimal); please use /home/hexvalid/Go/bin/qtminimal instead 
WARN[0000] failed to create qtdeploy symlink in your PATH (/usr/lib/go/bin/qtdeploy); please use /home/hexvalid/Go/bin/qtdeploy instead 
INFO[0000] running: 'qtsetup check linux' [docker=false] [vagrant=false] 
INFO[0000] GOOS:                        'linux'         
INFO[0000] GOARCH:                      'amd64'         
INFO[0000] GOVERSION:                   'go1.10'        
INFO[0000] GOROOT:                      '/usr/lib/go'   
INFO[0000] GOPATH:                   *  '/home/hexvalid/Go/' 
INFO[0000] GOBIN:                       '/home/hexvalid/Go/bin' 
INFO[0000] QT_HASH:                     'a76e7081468b0d9d554349b66b4971929f036ce7' 
INFO[0000] QT_VERSION:               *  '5.10.1'        
INFO[0000] QT_VERSION_MAJOR:            '5.10.1'        
INFO[0000] QT_DIR:                   *  '/home/hexvalid/HDD/Qt' 
INFO[0000] QT_STUB:                     'false'         
INFO[0000] QT_DEBUG:                    'false'         
INFO[0000] QT_QMAKE_DIR:                ''              
INFO[0000] QT_WEBKIT:                   'false'         
INFO[0000] QT_DISTRO:                   'arch'          
INFO[0000] QT_PKG_CONFIG:               'false'         
INFO[0000] running: 'qtsetup generate linux' [docker=false] [vagrant=false] 
INFO[0003] generating full qt/core                      
INFO[0007] generating full qt/androidextras             
INFO[0007] generating full qt/gui                       
INFO[0025] generating full qt/network                   
INFO[0027] generating full qt/xml                       
INFO[0027] generating full qt/dbus                      
INFO[0028] generating full qt/nfc                       
INFO[0028] generating full qt/script                    
INFO[0029] generating full qt/sensors                   
INFO[0030] generating full qt/positioning               
INFO[0031] generating full qt/widgets                   
INFO[0046] generating full qt/sql                       
INFO[0046] generating full qt/qml                       
INFO[0047] generating full qt/websockets                
INFO[0047] generating full qt/xmlpatterns               
INFO[0048] generating full qt/bluetooth                 
INFO[0049] generating full qt/webchannel                
INFO[0049] generating full qt/svg                       
INFO[0049] generating full qt/multimedia                
INFO[0054] generating full qt/quick                     
INFO[0055] generating full qt/help                      
INFO[0057] generating full qt/location                  
INFO[0057] generating full qt/scripttools               
INFO[0057] generating full qt/uitools                   
INFO[0057] generating full qt/webengine                 
INFO[0058] generating full qt/testlib                   
INFO[0059] generating full qt/serialport                
INFO[0059] generating full qt/serialbus                 
INFO[0059] generating full qt/printsupport              
INFO[0060] generating full qt/designer                  
INFO[0062] generating full qt/scxml                     
INFO[0063] generating full qt/gamepad                   
INFO[0063] generating full qt/purchasing                
INFO[0063] generating full qt/datavisualization         
INFO[0064] generating full qt/charts                    
INFO[0067] generating full qt/speech                    
INFO[0067] generating full qt/quickcontrols2            
INFO[0067] generating full qt/sailfish                  
INFO[0067] generating full qt/webview                   
INFO[0067] generating full qt/remoteobjects             
INFO[0067] running: 'qtsetup install linux' [docker=false] [vagrant=false] 
INFO[0067] installing full qt/core                      
ERRO[0067] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/core" env= error="exit status 1" func=RunCmdOptionalError name="install core"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0067] installing full qt/androidextras             
ERRO[0067] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/androidextras" env= error="exit status 1" func=RunCmdOptionalError name="install androidextras"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0067] installing full qt/gui                       
ERRO[0067] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/gui" env= error="exit status 1" func=RunCmdOptionalError name="install gui"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0067] installing full qt/network                   
ERRO[0067] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/network" env= error="exit status 1" func=RunCmdOptionalError name="install network"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0067] installing full qt/xml                       
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/xml" env= error="exit status 1" func=RunCmdOptionalError name="install xml"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/dbus                      
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/dbus" env= error="exit status 1" func=RunCmdOptionalError name="install dbus"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/nfc                       
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/nfc" env= error="exit status 1" func=RunCmdOptionalError name="install nfc"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/script                    
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/script" env= error="exit status 1" func=RunCmdOptionalError name="install script"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/sensors                   
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/sensors" env= error="exit status 1" func=RunCmdOptionalError name="install sensors"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/positioning               
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/positioning" env= error="exit status 1" func=RunCmdOptionalError name="install positioning"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/widgets                   
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/widgets" env= error="exit status 1" func=RunCmdOptionalError name="install widgets"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/sql                       
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/sql" env= error="exit status 1" func=RunCmdOptionalError name="install sql"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/qml                       
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/qml" env= error="exit status 1" func=RunCmdOptionalError name="install qml"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/websockets                
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/websockets" env= error="exit status 1" func=RunCmdOptionalError name="install websockets"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/xmlpatterns               
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/xmlpatterns" env= error="exit status 1" func=RunCmdOptionalError name="install xmlpatterns"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/bluetooth                 
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/bluetooth" env= error="exit status 1" func=RunCmdOptionalError name="install bluetooth"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/webchannel                
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/webchannel" env= error="exit status 1" func=RunCmdOptionalError name="install webchannel"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/svg                       
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/svg" env= error="exit status 1" func=RunCmdOptionalError name="install svg"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/multimedia                
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/multimedia" env= error="exit status 1" func=RunCmdOptionalError name="install multimedia"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/quick                     
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/quick" env= error="exit status 1" func=RunCmdOptionalError name="install quick"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/help                      
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/help" env= error="exit status 1" func=RunCmdOptionalError name="install help"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/location                  
ERRO[0068] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/location" env= error="exit status 1" func=RunCmdOptionalError name="install location"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0068] installing full qt/scripttools               
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/scripttools" env= error="exit status 1" func=RunCmdOptionalError name="install scripttools"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/uitools                   
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/uitools" env= error="exit status 1" func=RunCmdOptionalError name="install uitools"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/webengine                 
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/webengine" env= error="exit status 1" func=RunCmdOptionalError name="install webengine"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/testlib                   
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/testlib" env= error="exit status 1" func=RunCmdOptionalError name="install testlib"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/serialport                
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/serialport" env= error="exit status 1" func=RunCmdOptionalError name="install serialport"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/serialbus                 
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/serialbus" env= error="exit status 1" func=RunCmdOptionalError name="install serialbus"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/printsupport              
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/printsupport" env= error="exit status 1" func=RunCmdOptionalError name="install printsupport"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/designer                  
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/designer" env= error="exit status 1" func=RunCmdOptionalError name="install designer"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/scxml                     
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/scxml" env= error="exit status 1" func=RunCmdOptionalError name="install scxml"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/gamepad                   
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/gamepad" env= error="exit status 1" func=RunCmdOptionalError name="install gamepad"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/purchasing                
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/purchasing" env= error="exit status 1" func=RunCmdOptionalError name="install purchasing"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/datavisualization         
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/datavisualization" env= error="exit status 1" func=RunCmdOptionalError name="install datavisualization"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/charts                    
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/charts" env= error="exit status 1" func=RunCmdOptionalError name="install charts"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/speech                    
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/speech" env= error="exit status 1" func=RunCmdOptionalError name="install speech"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/quickcontrols2            
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/quickcontrols2" env= error="exit status 1" func=RunCmdOptionalError name="install quickcontrols2"
github.com/therecipe/qt/quickcontrols2
go build github.com/therecipe/qt/quickcontrols2: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/sailfish                  
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/sailfish" env= error="exit status 1" func=RunCmdOptionalError name="install sailfish"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/webview                   
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/webview" env= error="exit status 1" func=RunCmdOptionalError name="install webview"
github.com/therecipe/qt/webview
go build github.com/therecipe/qt/webview: invalid flag in #cgo LDFLAGS: -Wl,-O1

INFO[0069] installing full qt/remoteobjects             
ERRO[0069] failed to run command                         cmd="go install -p 4 -v github.com/therecipe/qt/remoteobjects" env= error="exit status 1" func=RunCmdOptionalError name="install remoteobjects"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1

WARN[0069] failed to install:                           
WARN[0069] core                                         
WARN[0069] androidextras                                
WARN[0069] gui                                          
WARN[0069] network                                      
WARN[0069] xml                                          
WARN[0069] dbus                                         
WARN[0069] nfc                                          
WARN[0069] script                                       
WARN[0069] sensors                                      
WARN[0069] positioning                                  
WARN[0069] widgets                                      
WARN[0069] sql                                          
WARN[0069] qml                                          
WARN[0069] websockets                                   
WARN[0069] xmlpatterns                                  
WARN[0069] bluetooth                                    
WARN[0069] webchannel                                   
WARN[0069] svg                                          
WARN[0069] multimedia                                   
WARN[0069] quick                                        
WARN[0069] help                                         
WARN[0069] location                                     
WARN[0069] scripttools                                  
WARN[0069] uitools                                      
WARN[0069] webengine                                    
WARN[0069] testlib                                      
WARN[0069] serialport                                   
WARN[0069] serialbus                                    
WARN[0069] printsupport                                 
WARN[0069] designer                                     
WARN[0069] scxml                                        
WARN[0069] gamepad                                      
WARN[0069] purchasing                                   
WARN[0069] datavisualization                            
WARN[0069] charts                                       
WARN[0069] speech                                       
WARN[0069] quickcontrols2                               
WARN[0069] sailfish                                     
WARN[0069] webview                                      
WARN[0069] remoteobjects                                
INFO[0069] running: 'qtsetup test linux' [docker=false] [vagrant=false] 
INFO[0069] testing qml/application                      
ERRO[0071] failed to run command                         cmd="go build -p 4 -v -ldflags=all=\"-s\" \"-w\" -o /home/hexvalid/Go/src/github.com/therecipe/qt/internal/examples/qml/application/deploy/linux/application -tags=\"minimal\"" env= error="exit status 1" func=RunCmd name="build for linux on linux"
github.com/therecipe/qt/core
go build github.com/therecipe/qt/core: invalid flag in #cgo LDFLAGS: -Wl,-O1
gollariel commented 6 years ago
export CGO_CXXFLAGS_ALLOW=".*" 
export CGO_LDFLAGS_ALLOW=".*" 
export CGO_CFLAGS_ALLOW=".*" 
$GOPATH/bin/qtsetup

This is helped for me

woodyjon commented 6 years ago

I understood my problem. It was a problem with the GOPATH. Basically, as when I launched qtsetup, it was telling me it could not remove files:

INFO[0000] running: 'qtsetup prep'                      
PANI[0000] failed to remove /usr/local/bin/qtrcc         error="remove /usr/local/bin/qtrcc: permission denied"

So I ran it with sudo. But running it with sudo means it did not take my user environment variables, but the global ones. So I removed manually the files it could not remove, then I ran qtsetup without sudo, and it worked fine.