Subject: Re: pkgsrc on solaris 8/sparc + bmake gnome2
To: None <tech-pkg@netbsd.org>
From: adam morley <adam-netbsd-techpkg@gmi.com>
List: tech-pkg
Date: 06/25/2003 12:20:46
> > Global:MACHINE_GNU_ARCH = ${GNU_ARCH.${MACHINE_ARCH}}
> > Global:LOWER_VENDOR = sun
> > Global:LOWER_OPSYS = solaris
> 
> ok, we are getting somewhere.  these lines should look this way instead:
> 
>   Global:MACHINE_GNU_ARCH = ${GNU_ARCH.${MACHINE_ARCH}}
>   Global:MACHINE_ARCH = sparc
>   Global:SPARC_TARGET_ARCH = sparcv7
>   Global:LOWER_VENDOR = sun
>   Global:LOWER_OPSYS = solaris

Yeah, that's kinda what I was hoping for.

> 
> the corresponding lines are (bsd.prefs.mk):
> 
>   .elif ${OPSYS} == "SunOS"
>   .  if ${MACHINE_ARCH} == "sparc"
>   SPARC_TARGET_ARCH?=     sparcv7
>   .  elif ${MACHINE_ARCH} == "sun4"
>   MACHINE_ARCH=           sparc
>   SPARC_TARGET_ARCH?=     sparcv7
>   .  elif ${MACHINE_ARCH} == "i86pc"
>   MACHINE_ARCH=           i386
>   .  elif ${MACHINE_ARCH} == "unknown"
>   .    if !defined(LOWER_ARCH)
>   LOWER_ARCH!=            ${UNAME} -p
>   .    endif      # !defined(LOWER_ARCH)
>   MAKEFLAGS+=             LOWER_ARCH=${LOWER_ARCH}
>   .  endif
>   LOWER_VENDOR?=          sun
>   LOWER_OPSYS?=           solaris
> 
> MACHINE_ARCH is set by bmake itself but it completely ignores these
> conditionals, so it suggests it's neither "sparc" or "sun4", nor "unknown".
> 
> could you test this simple Makefile somewhere outside pkgsrc?
> 
>   all:
>   	@echo ${MACHINE_ARCH}

$ /usr/pkg/bin/bmake

$

> 
> which compiler did you use to compile bootstrap-pkgsrc and what precise machine
> do you have, btw?

$ uname -a
SunOS mahler 5.8 Generic_108528-19 sun4u sparc SUNW,Sun-Fire-280R

I used gcc-3.2.3 from www.sunfreeware.com.  I have a feeling I should simply use the one from ftp://ftp.netbsd.org/pub/NetBSD/misc/seb/, but I don't have an MD5/SHA1 of that, so I can't use it, grrr!

That said, would the NPC project (http://solarpack.sourceforge.net/howto.html) be a better bet than the binary kit from the NetBSD website?

-- 
adam