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

编译未能通过:build constraints exclude all Go files #558

Closed
hammerfunctor opened this issue Jan 12, 2021 · 1 comment
Closed

编译未能通过:build constraints exclude all Go files #558

hammerfunctor opened this issue Jan 12, 2021 · 1 comment

Comments

@hammerfunctor
Copy link

环境信息:

版本

% go version                                                                     21-01-13 - 2:31:12
go version go1.15.6 linux/arm64

环境变量

% go env                                                                    :( 1 21-01-13 - 2:31:03
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/huzf/.cache/go-build"
GOENV="/home/huzf/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/huzf/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/huzf/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/huzf/tools/Go-CQHttp/go-cqhttp.src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build226931164=/tmp/go-build -gno-record-gcc-switches"

问题描述

编译不能通过

% go build -ldflags "-s -w -extldflags '-static'"                           :( 1 21-01-13 - 2:34:14
package github.com/Mrs4s/go-cqhttp
	imports github.com/Mrs4s/go-cqhttp/coolq
	imports github.com/Mrs4s/go-cqhttp/global
	imports github.com/Mrs4s/go-cqhttp/global/codec: build constraints exclude all Go files in /home/huzf/tools/Go-CQHttp/go-cqhttp.src/global/codec

改为% CGO_ENABLED=1 CC=/usr/bin/gcc go build -ldflags "-s -w -extldflags '-static'"仍有相同的结果

复现方式

...不知道要怎么复现,只是把 repo clone下来然后按照执行了doc里的命令

@Ink-33
Copy link
Contributor

Ink-33 commented Jan 12, 2021

我这边尝试复现下

@Mrs4s Mrs4s closed this as completed in 0c3ba71 Jan 13, 2021
bephbin51695 added a commit to bephbin51695/go-cqhttp that referenced this issue Feb 1, 2021
* feat send CQ:forward

* drop getlantern/go-update

* tidy

* Update cqhttp.md

* Update cqhttp.md

* update MiraiGo.

* fix none msg

* fix typo

* feature multi-threading download & fix invalid file.

* fix message type.

* update MiraiGo.

* fix typo.

* update MiraiGo.

* update doc.

* update MiraiGo.

* fix ptt.

* fix reconnect

* feature download_file.

* update doc.

* fix reconnect loop on account banned.

* drop  go-silk

* encode mp4

* feat CQ:video

* update docs

* fix video

* fix private video

* fix typo

* update MiraiGo.

* update MiraiGo & fix user-agent & fix file lock.

* fix file close

* support video cache file

* Fix misspell

* update MiraiGo & qid support.

* update MiraiGo.

* fix message.

* fix multi-threading upload.

* fix thumb.

* fix show pic error.

* fix forward img & video upload.

* fix show pic error.

* fix forward img & video upload.

* fix Mrs4s#558

* add codec/codec_unsupported.go

* Update github action

* Update github action

* fix build

* fix Mrs4s#557 & remove some goto

* fix codec path

* fix Mrs4s#561

* update MiraiGo.

* Try force transcoding

Attempt to brute force ffmpeg transcoding after failure

* update go.mod

* fix: golangci-lint gosimple

* update import

* fix: golangci-lint ineffassign

* fix: golangci-lint staticcheck

* fix: golangci-lint errcheck

* fix get gender of group member

* fix get gender of group member

* fix golint

* Make send_group_forward_msg can use on get_msg

理论上这个是正常支持的, Fix Mrs4s#542

* Added unbreakable feature
- Reply message customizable
- Forward message able to customize time

Signed-off-by: Sam <lau.sam745033858@gmail.com>

* update string message

* update MiraiGo.

* fix Mrs4s#562.

* fix ua.

* feature get_group_msg_history.

* local log hook

* reset default config log_level

* log support print report_line

* fix Mrs4s#540.

* update MiraiGo.

* feature get_online_clients.

* doc update.

* feature client status updated event.

* update MiraiGo. fix Mrs4s#586

* update MiraiGo. fix Mrs4s#577

* update MiraiGo.

* update doc.

* fix

* isFastStart setting appiled to config.hjson gen

* Move isFastStart outside

Co-authored-by: wdvxdr <wdvxdr@foxmail.com>
Co-authored-by: Mrs4s <mrs4sxiaoshi@gmail.com>
Co-authored-by: ishkong <i@shkong.cc>
Co-authored-by: Mrs4s <1844812067@qq.com>
Co-authored-by: そら <ritsuka.sunny@gmail.com>
Co-authored-by: Ink33 <51873347+Ink-33@users.noreply.github.com>
Co-authored-by: Ink-33 <quhyu@qq.com>
Co-authored-by: Diving-Fish <dfyshisb@163.com>
Co-authored-by: sam01101 <lau.sam745033858@gmail.com>
Co-authored-by: xuthus5 <xuthus5@gmail.com>
Co-authored-by: xuye <xuye@pinquest.cn>
bephbin51695 added a commit to bephbin51695/go-cqhttp that referenced this issue Feb 1, 2021
* fix:Dockerfile增加代理源

* remove mkdir, add set -ex

* update MiraiGo.

* update MiraiGo.

* feature new cqcode converter

* more error message.

* update MiraiGo.

* clear code.

* fix Mrs4s#455.

* update MiraiGo.

* try to fix Mrs4s#422.

* update MiraiGo.

* update MiraiGo.

* update MiraiGo.

* fix Mrs4s#458.

* feature remove test for ocr_image api.

* optimization cqcode converter.

* ⚡ improve event filter

* remove convert

* feat get group info no cache

* update go-silk

* feature pprof service.

* fix msg.

* more info for 当前上网环境异常. close Mrs4s#465.

* 补充并整理文档

* update MiraiGo.

* add stacktrace on panic.

* fix pprof.

* improve doc

* improve doc

* update docs

* support event recover.

* feature auto fragment.

* update MiraiGo.

* update MiraiGo.

* fix ios record

* [Break Change]feature: key entry without echoing
Remove unexpected "CR" & "LF" while scaning key. This will cause the previous encrypted password unusable.

* update MiraiGo.

* update MiraiGo.

* update MiraiGo.

* update ISSUE_TEMPLATE.

* update MiraiGo.

* feature get_group_at_all_remain.

* support old coolq data path. Mrs4s#499

* update raw.

* fix Mrs4s#501.

* fix issue of get_msg image url empty. Mrs4s#503

* update doc.

* feature fix url & update doc.

* update MiraiGo.

* update MiraiGo.

* websocket not found method

* fix lock

* add user group.

* update doc.

* Update README.md

* 📝 update readme

* group forward msg套娃

* update MiraiGo

* feature set_group_anonymous_ban.

* update MiraiGo.

* fix onebot protocol.

* feature solve silder.

* fix silder.

* update doc.

* update.

* fix panic.

* update doc.

* Update quick_start.md

* update MiraiGo.

* update MiraiGo.

* update (#4)

* feat send CQ:forward

* drop getlantern/go-update

* tidy

* Update cqhttp.md

* Update cqhttp.md

* update MiraiGo.

* fix none msg

* fix typo

* feature multi-threading download & fix invalid file.

* fix message type.

* update MiraiGo.

* fix typo.

* update MiraiGo.

* update doc.

* update MiraiGo.

* fix ptt.

* fix reconnect

* feature download_file.

* update doc.

* fix reconnect loop on account banned.

* drop  go-silk

* encode mp4

* feat CQ:video

* update docs

* fix video

* fix private video

* fix typo

* update MiraiGo.

* update MiraiGo & fix user-agent & fix file lock.

* fix file close

* support video cache file

* Fix misspell

* update MiraiGo & qid support.

* update MiraiGo.

* fix message.

* fix multi-threading upload.

* fix thumb.

* fix show pic error.

* fix forward img & video upload.

* fix show pic error.

* fix forward img & video upload.

* fix Mrs4s#558

* add codec/codec_unsupported.go

* Update github action

* Update github action

* fix build

* fix Mrs4s#557 & remove some goto

* fix codec path

* fix Mrs4s#561

* update MiraiGo.

* Try force transcoding

Attempt to brute force ffmpeg transcoding after failure

* update go.mod

* fix: golangci-lint gosimple

* update import

* fix: golangci-lint ineffassign

* fix: golangci-lint staticcheck

* fix: golangci-lint errcheck

* fix get gender of group member

* fix get gender of group member

* fix golint

* Make send_group_forward_msg can use on get_msg

理论上这个是正常支持的, Fix Mrs4s#542

* Added unbreakable feature
- Reply message customizable
- Forward message able to customize time

Signed-off-by: Sam <lau.sam745033858@gmail.com>

* update string message

* update MiraiGo.

* fix Mrs4s#562.

* fix ua.

* feature get_group_msg_history.

* local log hook

* reset default config log_level

* log support print report_line

* fix Mrs4s#540.

* update MiraiGo.

* feature get_online_clients.

* doc update.

* feature client status updated event.

* update MiraiGo. fix Mrs4s#586

* update MiraiGo. fix Mrs4s#577

* update MiraiGo.

* update doc.

* fix

* isFastStart setting appiled to config.hjson gen

* Move isFastStart outside

Co-authored-by: wdvxdr <wdvxdr@foxmail.com>
Co-authored-by: Mrs4s <mrs4sxiaoshi@gmail.com>
Co-authored-by: ishkong <i@shkong.cc>
Co-authored-by: Mrs4s <1844812067@qq.com>
Co-authored-by: そら <ritsuka.sunny@gmail.com>
Co-authored-by: Ink33 <51873347+Ink-33@users.noreply.github.com>
Co-authored-by: Ink-33 <quhyu@qq.com>
Co-authored-by: Diving-Fish <dfyshisb@163.com>
Co-authored-by: sam01101 <lau.sam745033858@gmail.com>
Co-authored-by: xuthus5 <xuthus5@gmail.com>
Co-authored-by: xuye <xuye@pinquest.cn>

Co-authored-by: daofeng2015 <jcb20150301@gmail.com>
Co-authored-by: Mrs4s <mrs4sxiaoshi@gmail.com>
Co-authored-by: brownchow <8622915+brownchow@users.noreply.github.com>
Co-authored-by: Mrs4s <1844812067@qq.com>
Co-authored-by: wdvxdr <wdvxdr@foxmail.com>
Co-authored-by: shirokurakana <admin@thdog.moe>
Co-authored-by: Yiwen-Chan <yiwen_chan@foxmail.com>
Co-authored-by: Ink-33 <quhyu@qq.com>
Co-authored-by: ishkong <i@shkong.cc>
Co-authored-by: yanyongyu <yanyongyu_1@126.com>
Co-authored-by: HelloWorld <mzdluo123@foxmail.com>
Co-authored-by: そら <ritsuka.sunny@gmail.com>
Co-authored-by: Ink33 <51873347+Ink-33@users.noreply.github.com>
Co-authored-by: Diving-Fish <dfyshisb@163.com>
Co-authored-by: sam01101 <lau.sam745033858@gmail.com>
Co-authored-by: xuthus5 <xuthus5@gmail.com>
Co-authored-by: xuye <xuye@pinquest.cn>
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

2 participants