RFH: golang dynamic linker
Hi, golang uses ld-elf.so.1 which is only present in freebsd-hackedutils which has been removed from archive. I have tried modifying the build scripts to use standard /lib/ld*.so.1, but that fails on kfreebsd-i386 with: cgo -dynimport _cgo1_.o >_obj/_cgo_import.c_ && mv -f _obj/_cgo_import.c_ _obj/_cgo_import.c Inconsistency detected by ld.so: dl-deps.c: 626: _dl_map_object_deps: Assertion `nlist > 1' failed! make[3]: *** [_obj/_cgo_import.c] Error 127 make[3]: Leaving directory `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13/src/pkg/runtime/cgo' make[2]: *** [runtime/cgo.install] Error 1 make[2]: Leaving directory `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13/src/pkg' make[1]: *** [debian/build.stamp] Error 2 make[1]: Leaving directory `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13' make: *** [build] Error 2 Which is basically beyond my skill (time to debug) to fix that. I was able to build kfreebsd-amd64 on asdfasdf, but it may also fail on buildd, but it hasn't been built yet. Ondrej -- Ondřej Surý -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/BANLkTi=djd8krnydmvty3tnng5phjgc...@mail.gmail.com
Re: RFH: golang dynamic linker
I have tried modifying the build scripts to use standard /lib/ld*.so.1, but that fails on kfreebsd-i386 with: cgo -dynimport _cgo1_.o >_obj/_cgo_import.c_ && mv -f _obj/_cgo_import.c_ _obj/_cgo_import.c Inconsistency detected by ld.so: dl-deps.c: 626: _dl_map_object_deps: Assertion `nlist > 1' failed! make[3]: *** [_obj/_cgo_import.c] Error 127 make[3]: Leaving directory `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13/src/pkg/runtime/cgo' make[2]: *** [runtime/cgo.install] Error 1 make[2]: Leaving directory `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13/src/pkg' make[1]: *** [debian/build.stamp] Error 2 make[1]: Leaving directory `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13' make: *** [build] Error 2 Which is basically beyond my skill (time to debug) to fix that. I was able to build kfreebsd-amd64 on asdfasdf, but it may also fail on buildd, but it hasn't been built yet. It does not fail for me. The difference is at least that the experimental buildd uses experimental eglibc 2.13-0exp4, while I use eglibc 2.11.2-11. On the other hand, in my build log is: dh_strip -X".a" -Xgoinstall -Xgodoc -Xgoyacc -Xbin/cgo -Xebnflint -Xgofmt -Xgovet BFD: debian/golang-go/usr/bin/st6sBHUC: section .rodata lma 0x80a2000 adjusted to 0x80a2010 BFD: debian/golang-go/usr/bin/st6sBHUC: section .plt lma 0x80a2010 adjusted to 0x813f74c BFD: debian/golang-go/usr/bin/st6sBHUC: section .dynstr lma 0x80a2020 adjusted to 0x813f75c BFD: debian/golang-go/usr/bin/st6sBHUC: section .hash lma 0x80a2034 adjusted to 0x813f76e BFD: debian/golang-go/usr/bin/st6sBHUC: section .dynamic lma 0x80a2048 adjusted to 0x813f782 BFD: debian/golang-go/usr/bin/st6sBHUC: section .gopclntab lma 0x80f8b1c adjusted to 0x813f7fa BFD: debian/golang-go/usr/bin/st6sBHUC: section .gosymtab lma 0x81002a4 adjusted to 0x8146f82 BFD: debian/golang-go/usr/bin/st6sBHUC: section .got.plt lma 0x81400a0 adjusted to 0x8141d98 BFD: debian/golang-go/usr/bin/st6sBHUC: section .bss lma 0x8141d98 adjusted to 0x8141da4 BFD: debian/golang-go/usr/bin/st6sBHUC: warning: allocated section `.interp' not in segment The same is in (linux-)386 experimental buildd, it uses eglibc 2.11.2-11. May be the problem is not kfreebsd-* specific. Petr -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.lrh.2.02.1104281416510.14...@sci.felk.cvut.cz
Re: RFH: golang dynamic linker
On Thu, Apr 28, 2011 at 14:24, Petr Salinger wrote: >> I have tried modifying the build scripts to use standard >> /lib/ld*.so.1, but that fails on kfreebsd-i386 with: >> >> cgo -dynimport _cgo1_.o >_obj/_cgo_import.c_ && mv -f >> _obj/_cgo_import.c_ _obj/_cgo_import.c >> Inconsistency detected by ld.so: dl-deps.c: 626: _dl_map_object_deps: >> Assertion `nlist > 1' failed! >> make[3]: *** [_obj/_cgo_import.c] Error 127 >> make[3]: Leaving directory >> >> `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13/src/pkg/runtime/cgo' >> make[2]: *** [runtime/cgo.install] Error 1 >> make[2]: Leaving directory >> >> `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13/src/pkg' >> make[1]: *** [debian/build.stamp] Error 2 >> make[1]: Leaving directory >> >> `/build/buildd-golang_2011.04.13-2~exp6-kfreebsd-i386-mL5F9f/golang-2011.04.13' >> make: *** [build] Error 2 >> >> Which is basically beyond my skill (time to debug) to fix that. >> >> I was able to build kfreebsd-amd64 on asdfasdf, but it may also fail >> on buildd, but it hasn't been built yet. > > It does not fail for me. > The difference is at least that the experimental buildd uses experimental > eglibc 2.13-0exp4, while I use eglibc 2.11.2-11. > > On the other hand, in my build log is: > > dh_strip -X".a" -Xgoinstall -Xgodoc -Xgoyacc -Xbin/cgo -Xebnflint -Xgofmt > -Xgovet > BFD: debian/golang-go/usr/bin/st6sBHUC: section .rodata lma 0x80a2000 > adjusted to 0x80a2010 > BFD: debian/golang-go/usr/bin/st6sBHUC: section .plt lma 0x80a2010 adjusted > to 0x813f74c > BFD: debian/golang-go/usr/bin/st6sBHUC: section .dynstr lma 0x80a2020 > adjusted to 0x813f75c > BFD: debian/golang-go/usr/bin/st6sBHUC: section .hash lma 0x80a2034 adjusted > to 0x813f76e > BFD: debian/golang-go/usr/bin/st6sBHUC: section .dynamic lma 0x80a2048 > adjusted to 0x813f782 > BFD: debian/golang-go/usr/bin/st6sBHUC: section .gopclntab lma 0x80f8b1c > adjusted to 0x813f7fa > BFD: debian/golang-go/usr/bin/st6sBHUC: section .gosymtab lma 0x81002a4 > adjusted to 0x8146f82 > BFD: debian/golang-go/usr/bin/st6sBHUC: section .got.plt lma 0x81400a0 > adjusted to 0x8141d98 > BFD: debian/golang-go/usr/bin/st6sBHUC: section .bss lma 0x8141d98 adjusted > to 0x8141da4 > BFD: debian/golang-go/usr/bin/st6sBHUC: warning: allocated section `.interp' > not in segment I have just realized that's the new gotest binary, I forgot to add -Xgotest to dh_strip. Thanks for pointing that out. > The same is in (linux-)386 experimental buildd, it uses eglibc 2.11.2-11. > May be the problem is not kfreebsd-* specific. Hmm, I'll go ahead and upload new version with kfreebsd-* support to unstable and see what happens. I'll get back if that's broken too. O. -- Ondřej Surý -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/BANLkTikd�+GoFiB=wj3vuzntaulyk...@mail.gmail.com
Re: RFH: golang dynamic linker
So the dynamic linker issue seems to be solved, but the buildd didn't finish due different bug: https://buildd.debian.org/status/package.php?p=golang&suite=sid make[3]: Entering directory `/build/buildd-golang_2011.04.27-1-kfreebsd-i386-IT5KRG/golang-2011.04.27/src/pkg/net' CGOPKGPATH= cgo -- cgo_bsd.go cgo_unix.go 1: error: 'AI_MASK' undeclared (first use in this function) 1: note: each undeclared identifier is reported only once for each function it appears in unresolved names Any clues? O. -- Ondřej Surý -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/BANLkTinoyWQN8iprYrHuyzBXbOGH�t...@mail.gmail.com
Re: RFH: golang dynamic linker
make[3]: Entering directory `/build/buildd-golang_2011.04.27-1-kfreebsd-i386-IT5KRG/golang-2011.04.27/src/pkg/net' CGOPKGPATH= cgo -- cgo_bsd.go cgo_unix.go 1: error: 'AI_MASK' undeclared (first use in this function) 1: note: each undeclared identifier is reported only once for each function it appears in unresolved names Any clues? In this case, the go wants userspace library which is the same as on linux. I.e cgo_linux.go should be used on GNU/kFreeBSD. Build-tested by hack bellow, IMHO suitable for debian. The question is what should be done properly by upstream. Petr --- src/pkg/net/Makefile +++ src/pkg/net/Makefile @@ -31,7 +31,7 @@ port.go\ CGOFILES_freebsd=\ - cgo_bsd.go\ + cgo_linux.go\ cgo_unix.go\ GOFILES_darwin=\ -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.lrh.2.02.1104290729510.16...@sci.felk.cvut.cz