On Thu, Apr 21, 2016 at 12:20:17AM +0100, Edd Barrett wrote:
> On Thu, Jul 23, 2015 at 04:05:21PM +0200, Fritjof Bornebusch wrote:
> > Hi ports@,
> >
> > while working on a port that uses lang/go it looks like there are some
> > segments missing.
> > The install(1) command says the following:
> >
> > BFD: /fake-amd64/usr/local/bin/st827dDR: warning: allocated section
> > `.gosymtab' not in segment
> > BFD: /fake-amd64/usr/local/bin/st827dDR: warning: allocated section
> > `.gnu.version_r' not in segment
>
> A few of us have started seeing messages like this. I only started
> seeing these messages when I upgraded from go-1.5.3 to 1.5.4.
>
> E.g. 'make fake' in net/syncthing from openbsd-wip:
>
> ---8<---
> ===> Faking installation for syncthing-0.12.22
> install -d -m 755 /usr/ports/pobj/syncthing-0.12.22/fake-amd64
> /usr/ports/pobj/syncthing-0.12.22/bin/install -c -s -m 755
> /usr/ports/pobj/syncthing-0.12.22/go/src/github.com/syncthing/syncthing/bin/syncthing
> /usr/ports/pobj/syncthing-0.12.22/fake-amd64/usr/local/bin/
> BFD: /usr/ports/pobj/syncthing-0.12.22/fake-amd64/usr/local/bin//stoBJG4T:
> warning: allocated section `.gosymtab' not in segment
> BFD: /usr/ports/pobj/syncthing-0.12.22/fake-amd64/usr/local/bin//stoBJG4T:
> warning: allocated section `.gnu.version_r' not in segment
> /usr/ports/pobj/syncthing-0.12.22/bin/install -c -m 644
> /usr/ports/pobj/syncthing-0.12.22/go/src/github.com/syncthing/syncthing/man/*.{1,5,7}
> /usr/ports/pobj/syncthing-0.12.22/fake-amd64/usr/local/man/
> --->8---
>
> I also noticed similar stuff when building go itself.
Can you try this patch?
diff --git lang/go/go.port.mk lang/go/go.port.mk
index 2fd3db0..92f24af 100644
--- lang/go/go.port.mk
+++ lang/go/go.port.mk
@@ -33,6 +33,9 @@ TEST_TARGET ?=${ALL_TARGET}
SEPARATE_BUILD ?= Yes
WRKSRC ?= ${MODGO_WORKSPACE}/src/${ALL_TARGET}
+# We never should use the standard "strip" command against go binaries
+INSTALL_STRIP=
+
MODGO_SETUP_WORKSPACE =mkdir -p ${WRKSRC:H}; mv ${MODGO_SUBDIR}
${WRKSRC};
CATEGORIES += lang/go