第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

設(shè)置 Go 進行交叉編譯時出錯

設(shè)置 Go 進行交叉編譯時出錯

Go
江戶川亂折騰 2021-09-10 21:31:53
我正在使用 Linux 64 位,我正在嘗試設(shè)置 Go 進行交叉編譯(特別是對于 Windows)。有這一個真棒指南這里。但是當(dāng)我嘗試運行下面的第二個命令時:cd /usr/lib/go/srcsudo GOOS=windows GOARCH=386 CGO_ENABLED=0 ./make.bash --no-clean嘗試構(gòu)建cmd包時出現(xiàn)錯誤。它說use of internal package not allowed。這是 Go 的主要源代碼中的錯誤嗎?我將粘貼完整的錯誤列表。# Building packages and commands for host, linux/amd64.package cmd/cmd/pprof    imports cmd/pprof/internal/driver: use of internal package not allowedpackage cmd/cmd/pprof    imports cmd/pprof/internal/fetch: use of internal package not allowedpackage cmd/cmd/pprof    imports cmd/pprof/internal/symbolizer: use of internal package not allowedpackage cmd/cmd/pprof    imports cmd/pprof/internal/symbolz: use of internal package not allowedpackage cmd/cmd/pprof/internal/commands    imports cmd/pprof/internal/report: use of internal package not allowedpackage cmd/cmd/pprof/internal/commands    imports cmd/pprof/internal/svg: use of internal package not allowedpackage cmd/cmd/pprof/internal/commands    imports cmd/pprof/internal/tempfile: use of internal package not allowedpackage cmd/cmd/pprof/internal/driver    imports cmd/pprof/internal/commands: use of internal package not allowedpackage cmd/cmd/pprof/internal/driver    imports cmd/pprof/internal/report: use of internal package not allowedpackage cmd/cmd/pprof/internal/driver    imports cmd/pprof/internal/tempfile: use of internal package not allowedpackage cmd/cmd/pprof/internal/fetch    imports cmd/pprof/internal/plugin: use of internal package not allowedpackage cmd/cmd/pprof/internal/fetch    imports cmd/pprof/internal/profile: use of internal package not allowedpackage cmd/cmd/pprof/internal/plugin    imports cmd/pprof/internal/profile: use of internal package not allowedpackage cmd/cmd/pprof/internal/report    imports cmd/pprof/internal/plugin: use of internal package not allowed我在谷歌上找不到這樣的東西,所以這可能意味著我做錯了什么。順便說一下,我正在使用 Arch Linux,并且我安裝的Go是pacman,而不是從源代碼。
查看完整描述

1 回答

?
溫溫醬

TA貢獻1752條經(jīng)驗 獲得超4個贊

這個錯誤來自cmd/go/pkg.go#L358,查看一下blame視圖顯示這是由commit 1338f32為go 1.4引入的

因此,由于Go 1.4“內(nèi)部”包主張,該指南可能僅適用于 go 1.3-,而不適用于 go 1.4 。

對于 Go 1.4,我們將首先為 實現(xiàn)規(guī)則$GOROOT,而不是$GOPATH。我們將使用編譯器轉(zhuǎn)換和標準庫中的一些次要用途來獲得規(guī)則的經(jīng)驗。

由于主 repo 中的不規(guī)則性,作為特殊情況,路徑中的“ /pkg/”元素$GOROOT/src/pkg/…被認為不存在。
這意味著$GOROOT/src/pkg/internal可以通過進口$GOROOT/src/cmd/…$GOROOT/src/pkg/…。
當(dāng)我們將標準庫向上移動到$GOROOT/src/.


查看完整回答
反對 回復(fù) 2021-09-10
  • 1 回答
  • 0 關(guān)注
  • 385 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號