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

[OpenBSD] -buildmode=pie not supported on openbsd/amd64 #315

Closed
B-Interactive opened this issue Dec 4, 2020 · 1 comment
Closed

[OpenBSD] -buildmode=pie not supported on openbsd/amd64 #315

B-Interactive opened this issue Dec 4, 2020 · 1 comment
Labels
bug Something isn't working.

Comments

@B-Interactive
Copy link

B-Interactive commented Dec 4, 2020

Describe the bug

When building maddy via build.sh, it fails with the error -buildmode=pie not supported on openbsd/amd64:

Steps to reproduce

build.sh (at the time of writing this) has existing issues on BSD systems, related to the version of getopt native to those systems, that doesn't support the necessary GNU extensions. As such, gnugetopt must be installed and referenced in order to get this far. Details below.

  1. Install go from packages.
  2. Install bash from packages.
  3. Install gnugetopt from packages.
  4. Modify build.sh so line 3 references gnugetopt instead of getopt.
options=$(gnugetopt -o hb:p:d: -l help,builddir:,prefix:,destdir:,systemddir:,configdir:,statedir:,runtimedir:,fail2bandir:,tags:,prefix:,gitversion:,version:,source:,sudo -- "$@")
  1. Run ./build.sh:
# bash ./build.sh
  1. Build fails with error:
bash-5.0# ./build.sh
                                _|        _|
_|_|_|  _|_|      _|_|_|    _|_|_|    _|_|_|  _|    _|
_|    _|    _|  _|    _|  _|    _|  _|    _|  _|    _|
_|    _|    _|  _|    _|  _|    _|  _|    _|  _|    _|
_|    _|    _|    _|_|_|    _|_|_|    _|_|_|    _|_|_|
                                                    _|
 All-in-one composable mail server.             _|_|

--- Using system Go toolchain (1.15.2, /usr/local/bin/go).
--- WARNING: Source tree is not a Git repository and no version specified.
--- Downloading dependencies...
go: downloading github.com/foxcpp/go-mockdns v0.0.0-20200531120619-ae750bbf9d73
--- Building main executable...
-buildmode=pie not supported on openbsd/amd64

Environment information

  • OpenBSD version: 6.8 amd64
  • maddy version: 0.4.2
  • go version: 1.15.2
  • gnugetopt version: 1.1.6p2
  • bash version: 5.0.18

Notes

There was apparently a patch for Go that would appear to have enabled buildmode=pie on OpenBSD, for Go 1.11. Seems strange it's cropping up here given that.
cmd/go: static linking fails on OpenBSD 6.2

@foxcpp
Copy link
Owner

foxcpp commented Dec 5, 2020

New build.sh script does not unconditionally use -buildmode=pie so this issue can be considered resolved.

@foxcpp foxcpp closed this as completed Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants