NetBSD-Users archive

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

Re: Few notes&questions on NetBSD building and on wedges included by default



On Tue, Sep 24, 2013 at 07:33:45PM +0100, scft wrote:
> Hi, NetBSD mailing lists.
> 
> I'm intending to cross-build NetBSD to try it out. I very much liked project 
> goals, as well as emphasis on code clarity and portability. 
> Minimalism and perfectionism are attractive.
> However, i have one practical question (which is 2.) and a few 
> suggestions\fixes on building process.
> 
> 1. I'm actually do cross-building because installer fails with "wd0: device 
> busy" (googling for further info i found out that it's because of some thing 
> called wedges.).
> Then why to include this unnecessary whistle by default? The goal of defaults 
> is by definition to fit to most users. Either fix sysinst, or kernel config!

It is needed to support GPT partitions, which is needed to support > 2TB
drives. What version of NetBSD are you trying to install ? I though this had
been fixed ...

> 
> 2. The only value for x86 architecture is i386. Which obviously means that 
> new features from >i486 are not included, sse is (i guess) not included, amd 
> k8 & opteron optimizations are not included... It is possible to fine-tune 
> these settings in FreeBSD (see: 
> http://svnweb.freebsd.org/base/head/share/mk/bsd.cpu.mk?view=co). Judging by 
> absence of such in /usr/share/mk of NetBSD, it is not possible to get this 
> without DIY there. Why not to implement and document this?

Actually the system is built for i486. You can tune this with
CFLAGS I guess. e.g. build.sh -V CFLAGS="-march=nocona"

CFLAGS is documented in share/mk/bsd.README, with most other
tuneable variables


> It is not even explained anywhere, what's the difference between MACHINE and 
> MACHINE_ARCH. BUILDING says that MACHINE_ARCH should always be an exact 
> architecture, MACHINE may be not. And it says that by saying that first is 
> "architecture", second is "type" Very straightforward.

You should'nt need to set theses, build.sh takes care of this for you.

> 
> 3. I've also found a bug in BUILDING documentation file. It says that 
> HOST_CXX is a C++ compiler. Yet setting HOST_CXX to g++ makes build,sh fail 
> with messages like "C preprocessor fails sanity check". By setting HOST_CXX 
> to c preproc, i have no such messages.

> 
> 4. There is no option to actually set c++ compiler then. Groff needs it and 
> fails without it. So i have a choice between hacking makefiles and setting 
> MKGROFF=no. I chose second - nobody loves to hack makefiles. Especially those 
> makefiles that are written by other people.
> I suggest you to implement HOST_CPLUS feature.
> CPLUS, not CPP. So that nobody'll be confused with cpp\cxx.

Why do you need to set HOST_CXX at all ? build.sh does TRT for me, on both
NetBSD and linux.

> 
> 5. mk.conf is somewhat badly documented. E.g. i've found new mk.conf options 
> in makefiles, which are not listed in documentation. Some options listed in 
> mk.conf(5) are not listed in BUILDING or handbook, and vice versa.

Be carefull, there are some variables used in Makefiles that are not
intended to be set in mk.conf.

> 
> 6. libc fails to build with MKPICLIB=no, saying that '-lgcc is not found'. 
> Even though i've found that i actually need MKPICLIB set to yes, seem as a 
> bug. (This happened when i tried to crossbuild it on both FreeBSD and on an 
> unpopular Ubuntu Linux derivative.)

Maybe you should use MKPIC=no ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index