pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48834: Fix lang/go installation on i386 (and maybe evbarm)



>Number:         48834
>Category:       pkg
>Synopsis:       Fix lang/go installation on i386 (and maybe evbarm)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 23 08:25:00 +0000 2014
>Originator:     Leonardo Taccari
>Release:        NetBSD 6.1.4
>Organization:
The NetBSD community
>Environment:
        
        
System: NetBSD ermonnezza 6.1.4 NetBSD 6.1.4 (CELERON) #2: Wed Apr 23 16:03:38 
CEST 2014 leot@ermonnezza:/usr/src/sys/arch/i386/compile/CELERON i386
Architecture: i386
Machine: i386
>Description:
lang/go does not install on i386 due to PLIST issues.
>How-To-Repeat:
$ cd pkgsrc/lang/go
$ make
[...]
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in 
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg:
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/6a
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/6c
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/6g
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/6l
ERROR:         /tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/src/cmd/6l/enam.c
ERROR: ************************************************************
ERROR: The following files are in /tmp/pkgsrc/lang/go/work/.destdir/usr/pkg but 
not in the PLIST:
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/8a
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/8c
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/8g
ERROR:         
/tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/pkg/tool/netbsd_386/8l
ERROR:         /tmp/pkgsrc/lang/go/work/.destdir/usr/pkg/go/src/cmd/8l/enam.c
*** Error code 1
[...]

You can read that on pkgsrc-bulk@ too.
>Fix:
According to:

 http://golang.org/doc/install/source#introduction

there are three different Go compilers: 6* for amd64, 8* for i386, 5* for arm.
Please apply the attached patches to fix this problem. Basically I have just
added a GO_COMPILER variable to properly handle the compiler tools for each
architecture.



------------------------>8------------------------>8------------------------
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/go/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile    16 May 2014 11:53:10 -0000      1.8
+++ Makefile    22 May 2014 22:08:38 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.8 2014/05/16 11:53:10 wiz Exp $
 
 VERSION=       1.2.1
-PKGREVISION=   1
+PKGREVISION=   2
 DISTNAME=      go${VERSION}.src
 PKGNAME=       go-${VERSION}
 CATEGORIES=    lang
@@ -25,12 +25,16 @@
 ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64 *-*-evbarm
 .if ${MACHINE_ARCH} == "i386"
 GOARCH=                386
+GOCOMPILER=    8
 .elif ${MACHINE_ARCH} == "x86_64"
 GOARCH=                amd64
+GOCOMPILER=    6
 .elif ${MACHINE_ARCH} == "evbarm"
 GOARCH=                arm
+GOCOMPILER=    5
 .endif
 PLIST_SUBST+=  GO_PLATFORM=${LOWER_OPSYS:Q}_${GOARCH:Q} GOARCH=${GOARCH:Q}
+PLIST_SUBST+=  GO_COMPILER=${GOCOMPILER:Q}
 
 # cgo compiles under TMPDIR
 TMPDIR?=       /tmp
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/lang/go/PLIST,v
retrieving revision 1.5
diff -u -r1.5 PLIST
--- PLIST       3 Mar 2014 15:41:12 -0000       1.5
+++ PLIST       22 May 2014 22:08:43 -0000
@@ -502,10 +502,10 @@
 go/pkg/obj/${GO_PLATFORM}/libcc.a
 go/pkg/obj/${GO_PLATFORM}/libgc.a
 go/pkg/obj/${GO_PLATFORM}/libmach.a
-go/pkg/tool/${GO_PLATFORM}/6a
-go/pkg/tool/${GO_PLATFORM}/6c
-go/pkg/tool/${GO_PLATFORM}/6g
-go/pkg/tool/${GO_PLATFORM}/6l
+go/pkg/tool/${GO_PLATFORM}/${GO_COMPILER}a
+go/pkg/tool/${GO_PLATFORM}/${GO_COMPILER}c
+go/pkg/tool/${GO_PLATFORM}/${GO_COMPILER}g
+go/pkg/tool/${GO_PLATFORM}/${GO_COMPILER}l
 go/pkg/tool/${GO_PLATFORM}/addr2line
 go/pkg/tool/${GO_PLATFORM}/cgo
 go/pkg/tool/${GO_PLATFORM}/dist
@@ -606,7 +606,7 @@
 go/src/cmd/6l/Makefile
 go/src/cmd/6l/asm.c
 go/src/cmd/6l/doc.go
-go/src/cmd/6l/enam.c
+go/src/cmd/${GO_COMPILER}l/enam.c
 go/src/cmd/6l/l.h
 go/src/cmd/6l/list.c
 go/src/cmd/6l/mkenam

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index