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

Does not build for FreeBSD/386 #51

Open
snowirbis opened this issue May 12, 2017 · 3 comments
Open

Does not build for FreeBSD/386 #51

snowirbis opened this issue May 12, 2017 · 3 comments

Comments

@snowirbis
Copy link

snowirbis commented May 12, 2017

When building on FreeBSD/amd64 for target GOARCH=386, example.go does not compile with the following errors:

/export/roman/go/src/github.com/takama/daemon/daemon.go:185: undefined: newDaemon
/export/roman/go/src/github.com/takama/daemon/daemon.go:190: undefined: execPath
/export/roman/go/src/github.com/takama/daemon/helper.go:46: undefined: execPath
/export/roman/go/src/github.com/takama/daemon/helper.go:50: undefined: execPath

Here is full output of % go build GOOS=freebsd GOARCH=386 takama-daemon.go

% uname -a ; gcc -v; env GOOS=freebsd GOARCH=386 go build -v -compiler gc takama-daemon.go
FreeBSD nas.home.lan 10.3-RELEASE-p11 FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.5/lto-wrapper
Target: x86_64-portbld-freebsd10.1
Configured with: /wrkdirs/usr/ports/lang/gcc/work/gcc-4.8.5/configure --disable-bootstrap --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar --enable-languages=c,c++,objc,fortran,java --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=x86_64-portbld-freebsd10.1
Thread model: posix
gcc version 4.8.5 (FreeBSD Ports Collection)
runtime/internal/sys
runtime/internal/atomic
runtime
sync/atomic
errors
internal/race
math
unicode
unicode/utf8
internal/nettrace
sync
io
syscall
internal/singleflight
bytes
strings
math/rand
strconv
time
reflect
os
vendor/golang_org/x/net/route
os/signal
fmt
sort
path/filepath
regexp/syntax
io/ioutil
context
text/template/parse
net/url
log
net
os/exec
regexp
text/template
github.com/takama/daemon

github.com/takama/daemon

/export/roman/go/src/github.com/takama/daemon/daemon.go:185: undefined: newDaemon
/export/roman/go/src/github.com/takama/daemon/daemon.go:190: undefined: execPath
/export/roman/go/src/github.com/takama/daemon/helper.go:46: undefined: execPath
/export/roman/go/src/github.com/takama/daemon/helper.go:50: undefined: execPath

No such issues when building for freebsd/amd64, linux/386, linux/arm, windows/386 and windows/amd64. Builds fine.

Not tested for others.

@derkan
Copy link
Contributor

derkan commented Sep 20, 2017

Try enabling CGO with CGO_ENABLED=1 as we are importing "C".

@derkan
Copy link
Contributor

derkan commented Sep 20, 2017

Pls check #58

@takama
Copy link
Owner

takama commented Sep 20, 2017

Thank you, good patch!
Could you make the pull request in develop branch?

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

3 participants