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

-installsuffix 参数没有指定后缀字符串。它被设定为空,这可能导致一些问题 #753

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

Vingurzhou
Copy link
Contributor

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

我在mac使用makefile时,提示错误:make: *** [build] Error 1

正常情况下,-installsuffix 参数应该指定一个非空字符串,用于将生成的文件安装到带有后缀的目录中,以避免与其他版本的软件包冲突。在您的命令中,由于未提供后缀字符串,Go 将不会为生成的文件添加后缀,而是将其安装到默认目录。

如果希望使用 -installsuffix 参数,并且不需要添加后缀字符串,可以将其设定为一个空字符串(""),而不是省略它。可以使用以下命令:

CGO_ENABLED=0 go build -ldflags="-w -s" -a -installsuffix "" -o go-admin .

这将使用空字符串作为后缀,并将生成的文件安装到默认目录中。

使用 -installsuffix 参数时,最好确保目标目录不存在其他版本的同名软件包,以避免潜在的文件冲突问题。

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

fix(makefile): -installsuffix 参数没有指定后缀字符串。它被设定为空,这可能导致一些问题
@wenjianzhang wenjianzhang merged commit a282e44 into go-admin-team:master Aug 2, 2023
2 of 4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants