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

蓝鲸cmdb开源版release-v3.13.4 版本编译报错 #7876

Open
xi2106 opened this issue Mar 18, 2024 · 1 comment
Open

蓝鲸cmdb开源版release-v3.13.4 版本编译报错 #7876

xi2106 opened this issue Mar 18, 2024 · 1 comment

Comments

@xi2106
Copy link

xi2106 commented Mar 18, 2024

  1. 产品:蓝鲸GitHub开源版CMDB

  2. 版本: 要编译的开源版v3.13.4,要替换的社区版v3.10.21

  3. 环境信息: centos7.9,mongodb4.2.3

  4. 问题描述: 根据GitHub开源版的编译指南,下载release代码后,执行make报错。
    https://github.com/TencentBlueKing/bk-cmdb/blob/master/docs/overview/upgrade-from-ce.md

  5. 问题现象关键片段(文字):
    /root/go/pkg/mod/github.com/!tencent!blue!king/crypto-golang-sdk@v1.0.0/sm4.go:83:38: could not determine kind of name for C.EVP_sm4_ctr

make[1]: *** [cmdb_apiserver] Error 1
make[1]: Leaving directory `/root/tmp1/src/configcenter/src/apiserver'
make: *** [default] Error 2

  1. 问题现象关键信息截图,日志截图:

#GITHASH=v3.13.4 GITTAG=ocr-v3.13.4 VERSION=v3.13.4 make

tongsuo already exists
building server...
enter directory: /root/tmp1/src/configcenter/src/apiserver
make[1]: Entering directory `/root/tmp1/src/configcenter/src/apiserver'

building the target: cmdb_apiserver...

CGO_ENABLED=1 CGO_CFLAGS="-I/root/tmp1/src/configcenter/src/bin/build/v3.13.4/tongsuo/include -Wno-deprecated-declarations" CGO_LDFLAGS="-L/root/tmp1/src/configcenter/src/bin/build/v3.13.4/tongsuo/lib -lssl -lcrypto" go build -ldflags "-X configcenter/src/common/version.CCVersion=v3.13.4 -X configcenter/src/common/version.CCBuildTime=2024-03-15T13:32:21+0800 -X configcenter/src/common/version.CCGitHash=v3.13.4 -X configcenter/src/common/version.CCTag=ocr-v3.13.4 -X configcenter/src/common/version.CCDistro=community -X configcenter/src/common/version.GoVersion=go1.20.10" -o /root/tmp1/src/configcenter/src/bin/build/v3.13.4/cmdb_apiserver/cmdb_apiserver
#github.com/TencentBlueKing/crypto-golang-sdk
/root/go/pkg/mod/github.com/!tencent!blue!king/crypto-golang-sdk@v1.0.0/sm4.go:83:38: could not determine kind of name for C.EVP_sm4_ctr
make[1]: *** [cmdb_apiserver] Error 1
make[1]: Leaving directory `/root/tmp1/src/configcenter/src/apiserver'
make: *** [default] Error 2

  1. 尝试过的操作/已经排查过的情况:如关键的日志片段(请勿粘贴截图)

确认go版本:GOVERSION="go1.20.10";

确认C语言头文件位置:/usr/include/bits/、/usr/include/openssl/

@liduote
Copy link

liduote commented Jun 13, 2024

你 tongsuo 的位置在这里吗?CGO_CFLAGS="-I/root/tmp1/src/configcenter/src/bin/build/v3.13.4/tongsuo/include,不在的话可以通过设置TONGSUO_PATH环境变量指定tongsuo 的路径

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