Re: Problems with Build World

2010-03-02 Thread Ron McDowell

Sorry, my mistake in wording.  I am indeed wanting to
follow -stable here. Replace all my uses of 'world'
below with 'build' and the same questions apply. 


I was following http://www.openbsd.org/faq/faq5.html#Bld
which appears to be a superset of the link you sent.

--
Ron McDowell
San Antonio TX



Tomas Bodzar wrote:

What are you trying to accomplish?

If you want to follow -stable then use this
http://www.openbsd.org/stable.html  (no make world anywhere in text).
If you want your own kernel then it's not supported. You can do that,
but you are on your own. Still -current or snapshots are best way with
OpenBSD because of its stability and good job of developers.

On Tue, Mar 2, 2010 at 6:00 AM, Ron McDowell r...@fuzzwad.org wrote:
  

I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
years and ATT/USL before that.

I have installed OpenBSD i386 v4.6 via a boot floppy and ftp. Installed the
src and sys tarballs.
Rebuilt the kernel, reboot, build World, reboot.
cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
rebuilt kernel, reboot.
all good to this point.
make build fails with a ton of errors in the krb tree.

I'm not as worried about the actual error...I'm sure it'll be fixed
soon and I'll rebuild in a day or two...but I'm concerned about the current
state of the system, and what 'make world' actually does.

Does 'make world' build and install in subdirectories or does it build
everything first, then install everything?
Is there a way to separately build everything, then install it all? B That
way I'd know that all's well before actually committing to my tree.

Thanks.



--
Ron McDowell
San Antonio TX




Re: Problems with Build World

2010-03-02 Thread Scott McEachern

Ron McDowell wrote:

I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
years and ATT/USL before that.


Welcome.

Rebuilt the kernel, reboot, build World, reboot.
make clean  make depend  make install is used for kernels, and make 
build is used for userland.  I do not know what this World is that you 
speak of.

cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
rebuilt kernel, reboot.
all good to this point.
make build fails with a ton of errors in the krb tree.
Without any information, nobody can help you, but if you do things 
correctly, you won't need help anyway.


I'm not as worried about the actual error...I'm sure it'll be fixed
soon and I'll rebuild in a day or two...but I'm concerned about the 
current state of the system, and what 'make world' actually does.


To borrow from Inigo Montoya, You keep using this 'world' word.  I do 
not think it means what you think it means.


You are obviously trying to build -stable, so I doubt you will find it 
will be 'fixed' in a day or two, because there is nothing to fix.  
Really.  You are doing something wrong, but we are back to that little 
'Without any information' problem.
Does 'make world' build and install in subdirectories or does it build 
everything first, then install everything?
I am not entirely sure of the answer because the build output flies by 
too quickly.  Either way, it does not matter.  As long as you reboot 
into the new kernel, you are good.  I generally reboot after building 
userland ('make build') to refresh any running daemons, or you can 
kill/restart them manually.
Is there a way to separately build everything, then install it all?  
That way I'd know that all's well before actually committing to my tree.


Short of manually building in each directory with 'make clean  make 
depend  make', then going back and doing a 'make install' in each 
subdirectory, I don't think so (but could be wrong).  Why would you 
bother with this anyway?


Make sure you follow the directions carefully in 
http://www.openbsd.org/faq/faq5.html.  It works. Really.


From what you have said, you can afford the downtime on your box to 
build from source, so you are probably not doing this on a production 
server.  If that is the case, you are strongly urged to use -current and 
start from the most recent snapshot.  Again, follow the directions in 
the faq.  It works.  Really.  Just because the name -current does not 
have the word 'stable' in it, it does NOT imply that -current is not a 
stable OS.  It will not fall down on you.  (It does happen, but very 
rarely, and _that_ you will see 'fixed in a day or two'.)  Getting all 
the cool goodies in -current (plus the goodies in the -current ports) is 
_well_ worth it.  It is also worth mentioning that -current (aka 
4.7-beta) is close enough to 4.7-release that you might as well use it 
anyway, so that the config changes (eg. the changed syntax in pf.conf) 
are not 'new' to you, and save yourself the aggravation of updating a 
4.6 box in a short while.  Don't let the word 'beta' fool you either.  
This isn't a product by a big vendor that you don't touch until at least 
service pack 1.


--

-RSM

http://www.erratic.ca



Re: Problems with Build World

2010-03-02 Thread Stuart Henderson
On 2010-03-02, Ron McDowell r...@fuzzwad.org wrote:
 I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
 years and ATT/USL before that.

 I have installed OpenBSD i386 v4.6 via a boot floppy and ftp. 
 Installed the src and sys tarballs.
 Rebuilt the kernel, reboot, build World, reboot.
 cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
 rebuilt kernel, reboot.
 all good to this point.
 make build fails with a ton of errors in the krb tree.

 I'm not as worried about the actual error...I'm sure it'll be fixed
 soon and I'll rebuild in a day or two...but I'm concerned about the 
 current state of the system, and what 'make world' actually does.

 Does 'make world' build and install in subdirectories or does it build 
 everything first, then install everything? 

 Is there a way to separately build everything, then install it all?  
 That way I'd know that all's well before actually committing to my tree.

Try the -n option to make(1), and you'll see what it's doing.
I suspect your problem might be due to not doing a 'make obj' before
building; you could clean things out, but the easiest way is probably
to blow away /usr/src and unpack/update it again.



Re: Problems with Build World

2010-03-02 Thread Tomas Bodzar
If you will follow exactly this manual
http://www.openbsd.org/stable.html then no problem for sure.

On Tue, Mar 2, 2010 at 9:04 AM, Ron McDowell r...@fuzzwad.org wrote:
 Sorry, my mistake in wording. B I am indeed wanting to
 follow -stable here. Replace all my uses of 'world'
 below with 'build' and the same questions apply.
 I was following http://www.openbsd.org/faq/faq5.html#Bld
 which appears to be a superset of the link you sent.

 --
 Ron McDowell
 San Antonio TX



 Tomas Bodzar wrote:

 What are you trying to accomplish?

 If you want to follow -stable then use this
 http://www.openbsd.org/stable.html B (no make world anywhere in text).
 If you want your own kernel then it's not supported. You can do that,
 but you are on your own. Still -current or snapshots are best way with
 OpenBSD because of its stability and good job of developers.

 On Tue, Mar 2, 2010 at 6:00 AM, Ron McDowell r...@fuzzwad.org wrote:


 I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
 years and ATT/USL before that.

 I have installed OpenBSD i386 v4.6 via a boot floppy and ftp. Installed
 the
 src and sys tarballs.
 Rebuilt the kernel, reboot, build World, reboot.
 cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
 rebuilt kernel, reboot.
 all good to this point.
 make build fails with a ton of errors in the krb tree.

 I'm not as worried about the actual error...I'm sure it'll be fixed
 soon and I'll rebuild in a day or two...but I'm concerned about the
 current
 state of the system, and what 'make world' actually does.

 Does 'make world' build and install in subdirectories or does it build
 everything first, then install everything?
 Is there a way to separately build everything, then install it all? B
 That
 way I'd know that all's well before actually committing to my tree.

 Thanks.



 --
 Ron McDowell
 San Antonio TX





--
http://www.openbsd.org/lyrics.html



Re: Problems with Build World

2010-03-02 Thread Ron McDowell
My script builds the 4.6-release and 4.6-stable pulled 1/26.  It chokes 
on 2 copies of 4.6-stable pulled today.


As I've said, I don't care about the error at this point, I want to know 
how the build process works.  Restating my question:


Does 'make build' install each subdirectory as it traverses the source tree?
Or does it traverse the sources twice, first time to compile everything, 
second time to install what it compiled?


--
Ron McDowell
San Antonio TX



Tomas Bodzar wrote:

If you will follow exactly this manual
http://www.openbsd.org/stable.html then no problem for sure.

On Tue, Mar 2, 2010 at 9:04 AM, Ron McDowell r...@fuzzwad.org wrote:
  

Sorry, my mistake in wording.  I am indeed wanting to
follow -stable here. Replace all my uses of 'world'
below with 'build' and the same questions apply.
I was following http://www.openbsd.org/faq/faq5.html#Bld
which appears to be a superset of the link you sent.

--
Ron McDowell
San Antonio TX



Tomas Bodzar wrote:


What are you trying to accomplish?

If you want to follow -stable then use this
http://www.openbsd.org/stable.html  (no make world anywhere in text).
If you want your own kernel then it's not supported. You can do that,
but you are on your own. Still -current or snapshots are best way with
OpenBSD because of its stability and good job of developers.

On Tue, Mar 2, 2010 at 6:00 AM, Ron McDowell r...@fuzzwad.org wrote:

  

I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
years and ATT/USL before that.

I have installed OpenBSD i386 v4.6 via a boot floppy and ftp. Installed
the
src and sys tarballs.
Rebuilt the kernel, reboot, build World, reboot.
cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
rebuilt kernel, reboot.
all good to this point.
make build fails with a ton of errors in the krb tree.

I'm not as worried about the actual error...I'm sure it'll be fixed
soon and I'll rebuild in a day or two...but I'm concerned about the
current
state of the system, and what 'make world' actually does.

Does 'make world' build and install in subdirectories or does it build
everything first, then install everything?
Is there a way to separately build everything, then install it all? B
That
way I'd know that all's well before actually committing to my tree.

Thanks.



--
Ron McDowell
San Antonio TX




Re: Problems with Build World

2010-03-02 Thread Ron McDowell
[Not sure if netiquette on this list says trim off excess stuff or leave 
it on...I'm leaving it on here this time.  --rcm]


Scott McEachern wrote:

Ron McDowell wrote:

I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
years and ATT/USL before that.


Welcome.

Rebuilt the kernel, reboot, build World, reboot.
make clean  make depend  make install is used for kernels, and 
make build is used for userland.  I do not know what this World is 
that you speak of.

cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
rebuilt kernel, reboot.
all good to this point.
make build fails with a ton of errors in the krb tree.
Without any information, nobody can help you, but if you do things 
correctly, you won't need help anyway.


I'm not as worried about the actual error...I'm sure it'll be fixed
soon and I'll rebuild in a day or two...but I'm concerned about the 
current state of the system, and what 'make world' actually does.


To borrow from Inigo Montoya, You keep using this 'world' word.  I do 
not think it means what you think it means.


You are obviously trying to build -stable, so I doubt you will find it 
will be 'fixed' in a day or two, because there is nothing to fix.  
Really.  You are doing something wrong, but we are back to that little 
'Without any information' problem.
Does 'make world' build and install in subdirectories or does it 
build everything first, then install everything?
I am not entirely sure of the answer because the build output flies by 
too quickly.  Either way, it does not matter.  As long as you reboot 
into the new kernel, you are good.  I generally reboot after building 
userland ('make build') to refresh any running daemons, or you can 
kill/restart them manually.
Is there a way to separately build everything, then install it all?  
That way I'd know that all's well before actually committing to my tree.


Short of manually building in each directory with 'make clean  make 
depend  make', then going back and doing a 'make install' in each 
subdirectory, I don't think so (but could be wrong).  Why would you 
bother with this anyway?


Because now I have a box where I am unsure if all the stuff that got 
built before the error happened has already been installed...i.e., if 
half the userland stuff is new and half is old.


Make sure you follow the directions carefully in 
http://www.openbsd.org/faq/faq5.html.  It works. Really.


After the fail, I tried a tarball I had from 4.6-stable pulled with cvs 
on 1/26 that builds cleanly. 
The cvs pull from this afternoon does not, for whatever reason.   I'm 
building with a simple script containing the commands from faq5, same 
script both times.  The script's good, builds the -release sources and 
the 1/26 -stable, but not the 3/1 -stable.  I even redid the cvs this 
evening, same thing.


From what you have said, you can afford the downtime on your box to 
build from source, so you are probably not doing this on a production 
server.  If that is the case, you are strongly urged to use -current 
and start from the most recent snapshot.


It is not production yet because it's just getting off the ground.  It 
*will* be production once it's up and running, and I certainly don't 
want something like this to happen then.  Yes, it's not supposed to 
fail, but in the real world things happen and stuff breaks, and that is 
not the time to scratch around trying to find out how things are 
supposed to work.  Knowing how things work can save valuable minutes 
when there's a real problem.


  Again, follow the directions in the faq.  It works.  Really.  Just 
because the name -current does not have the word 'stable' in it, it 
does NOT imply that -current is not a stable OS.  It will not fall 
down on you.  (It does happen, but very rarely, and _that_ you will 
see 'fixed in a day or two'.)  Getting all the cool goodies in 
-current (plus the goodies in the -current ports) is _well_ worth it.  
It is also worth mentioning that -current (aka 4.7-beta) is close 
enough to 4.7-release that you might as well use it anyway, so that 
the config changes (eg. the changed syntax in pf.conf) are not 'new' 
to you, and save yourself the aggravation of updating a 4.6 box in a 
short while.  Don't let the word 'beta' fool you either.  This isn't a 
product by a big vendor that you don't touch until at least service 
pack 1.


Yes, I get that, and will probably upgrade to that before we go live 
with the box in a week or two.  It's 80 miles away in a colo center but 
I've done a 4.5-4.6 upgrade without kernel install
http://www.openbsd.org/faq/upgrade46.html#upgrade with no problems.  
With us, once a box goes live it usually stays at the same rev for its' 
lifetime, with periodic bumps of -stable.  So by time we go live with it 
4.7 may well be -release.  FYI. this will be a web server with about 40 
domains on it, so 24/7/365 is expected.  I can get away with a couple 
quick reboots now and then but I have to be pretty 

Re: Problems with Build World

2010-03-02 Thread Tomas Bodzar
Oh so, then post your script. And looks like you may be interested in
this too http://www.openbsd.org/cgi-bin/man.cgi?query=releasesektion=8

On Tue, Mar 2, 2010 at 10:15 AM, Ron McDowell r...@fuzzwad.org wrote:
 My script builds the 4.6-release and 4.6-stable pulled 1/26. B It chokes on
2
 copies of 4.6-stable pulled today.

 As I've said, I don't care about the error at this point, I want to know
how
 the build process works. B Restating my question:

 Does 'make build' install each subdirectory as it traverses the source
tree?
 Or does it traverse the sources twice, first time to compile everything,
 second time to install what it compiled?

 --
 Ron McDowell
 San Antonio TX



 Tomas Bodzar wrote:

 If you will follow exactly this manual
 http://www.openbsd.org/stable.html then no problem for sure.

 On Tue, Mar 2, 2010 at 9:04 AM, Ron McDowell r...@fuzzwad.org wrote:


 Sorry, my mistake in wording. B I am indeed wanting to
 follow -stable here. Replace all my uses of 'world'
 below with 'build' and the same questions apply.
 I was following http://www.openbsd.org/faq/faq5.html#Bld
 which appears to be a superset of the link you sent.

 --
 Ron McDowell
 San Antonio TX



 Tomas Bodzar wrote:


 What are you trying to accomplish?

 If you want to follow -stable then use this
 http://www.openbsd.org/stable.html B (no make world anywhere in text).
 If you want your own kernel then it's not supported. You can do that,
 but you are on your own. Still -current or snapshots are best way with
 OpenBSD because of its stability and good job of developers.

 On Tue, Mar 2, 2010 at 6:00 AM, Ron McDowell r...@fuzzwad.org wrote:



 I'm relatively new to OpenBSD but have been working with FreeBSD for
 15+
 years and ATT/USL before that.

 I have installed OpenBSD i386 v4.6 via a boot floppy and ftp. Installed
 the
 src and sys tarballs.
 Rebuilt the kernel, reboot, build World, reboot.
 cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
 rebuilt kernel, reboot.
 all good to this point.
 make build fails with a ton of errors in the krb tree.

 I'm not as worried about the actual error...I'm sure it'll be fixed
 soon and I'll rebuild in a day or two...but I'm concerned about the
 current
 state of the system, and what 'make world' actually does.

 Does 'make world' build and install in subdirectories or does it build
 everything first, then install everything?
 Is there a way to separately build everything, then install it all? B
 That
 way I'd know that all's well before actually committing to my tree.

 Thanks.



 --
 Ron McDowell
 San Antonio TX










--
http://www.openbsd.org/lyrics.html



Re: Problems with Build World

2010-03-02 Thread Tobias Ulmer
On Tue, Mar 02, 2010 at 03:15:30AM -0600, Ron McDowell wrote:
 My script builds the 4.6-release and 4.6-stable pulled 1/26.  It
 chokes on 2 copies of 4.6-stable pulled today.
 
 As I've said, I don't care about the error at this point, I want to
 know how the build process works.  Restating my question:

build:
.ifdef GLOBAL_AUTOCONF_CACHE
cp /dev/null ${GLOBAL_AUTOCONF_CACHE}
.endif
cd ${.CURDIR}/share/mk  exec ${SUDO} ${MAKE} install
cd ${.CURDIR}/include  ${MAKE} prereq  exec ${SUDO} ${MAKE} includes
${SUDO} ${MAKE} cleandir
cd ${.CURDIR}/lib  ${MAKE} depend  ${MAKE}  \
NOMAN=1 exec ${SUDO} ${MAKE} install
cd ${.CURDIR}/gnu/lib  ${MAKE} depend  ${MAKE}  \
NOMAN=1 exec ${SUDO} ${MAKE} install
${MAKE} depend  ${MAKE}  exec ${SUDO} ${MAKE} install



Re: Problems with Build World

2010-03-02 Thread Stuart Henderson
On 2010-03-02, Ron McDowell r...@fuzzwad.org wrote:
 My script builds the 4.6-release and 4.6-stable pulled 1/26.  It chokes 
 on 2 copies of 4.6-stable pulled today.

 As I've said, I don't care about the error at this point, I want to know 
 how the build process works.  Restating my question:

 Does 'make build' install each subdirectory as it traverses the source tree?
 Or does it traverse the sources twice, first time to compile everything, 
 second time to install what it compiled?


Restating my advice:

Try the -n option to make(1)



Re: Problems with Build World

2010-03-02 Thread Marc Espie
On Tue, Mar 02, 2010 at 03:15:30AM -0600, Ron McDowell wrote:
 My script builds the 4.6-release and 4.6-stable pulled 1/26.  It
 chokes on 2 copies of 4.6-stable pulled today.
 
 As I've said, I don't care about the error at this point, I want to
 know how the build process works.  Restating my question:

Most likely and frequent newbie error is forgetting to make obj before
make build.

 Does 'make build' install each subdirectory as it traverses the source tree?
 Or does it traverse the sources twice, first time to compile
 everything, second time to install what it compiled?

No, it's more complicated than that. It obviously installs mk stuff, then
include, then it builds libs and install them, then it builds everything
else and installs it.

It's not a complicated bootstrap procedure like in freebsd land, it assumes
you already have a mostly working system (for instance, it takes no precautions
for compiler bootstrap).

follow release(8), find out the step you missed (most likely make obj) and
proceed from there. You definitely want a clean build before you play

(snide remark: you think you're smart, so you took shortcuts. Well, think
again. And anyone who can follow instructions can actually build OpenBSD
fairly easily. ;-) )



Re: Problems with Build World

2010-03-02 Thread Bryan

On 3/2/2010 12:32 PM, Marc Espie wrote:


No, it's more complicated than that. It obviously installs mk stuff, then
include, then it builds libs and install them, then it builds everything
else and installs it.

It's not a complicated bootstrap procedure like in freebsd land, it assumes
you already have a mostly working system (for instance, it takes no precautions
for compiler bootstrap).

follow release(8), find out the step you missed (most likely make obj) and
proceed from there. You definitely want a clean build before you play

(snide remark: you think you're smart, so you took shortcuts. Well, think
again. And anyone who can follow instructions can actually build OpenBSD
fairly easily. ;-) )



I missed building make obj on a few occasions.  It happens if you are 
typing in things too quickly, or it's late at night.  I got into the 
habit of using a script that I built from the faq to build each (kernel, 
userland, X).


The most recent thing I did was move /usr/obj, /usr/xobj/, /usr/build, 
and /tmp to a ramdisk to allow for faster building, and also began using 
the -j on make.  I forgot that I could do that. Makes things way 
faster.  But I only did the scripting and changes when I knew what I was 
doing, and I had enough RAM.


for example, here is my script to build my kernel:

#!/bin/sh

cd /usr/obj
rm -rf *
cd /usr/xobj
rm -rf *
cd /usr/build
rm -rf *
cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
config -s /usr/src/sys -b . GENERIC.MP
make clean  make depend  make  make install



after I pull /usr/src successfully, then I issue ./build_kernel  reboot

the caveat is that if something in the build ever were to change, I'd be 
SOL, but I am a frequent visitor to the FAQ, and I'm always checking 
follow -current (http://www.openbsd.org/faq/current.html) to see if 
anything might cause me issues...


The make(1) update issue caught me initially, as I started a build 
before I checked the site, but I saw the change, and then everything was 
good.


I will admit to some abject terror when I first tried building from 
source, but it's like falling asleep... it's that easy.  The devs make 
it quite painless.


Regards,
Bryan



Re: Problems with Build World

2010-03-02 Thread Otto Moerbeek
On Tue, Mar 02, 2010 at 01:17:09PM -0600, Bryan wrote:

 On 3/2/2010 12:32 PM, Marc Espie wrote:
 
 No, it's more complicated than that. It obviously installs mk stuff, then
 include, then it builds libs and install them, then it builds everything
 else and installs it.
 
 It's not a complicated bootstrap procedure like in freebsd land, it assumes
 you already have a mostly working system (for instance, it takes no 
 precautions
 for compiler bootstrap).
 
 follow release(8), find out the step you missed (most likely make obj) and
 proceed from there. You definitely want a clean build before you play
 
 (snide remark: you think you're smart, so you took shortcuts. Well, think
 again. And anyone who can follow instructions can actually build OpenBSD
 fairly easily. ;-) )
 
 
 I missed building make obj on a few occasions.  It happens if you
 are typing in things too quickly, or it's late at night.  I got into
 the habit of using a script that I built from the faq to build each
 (kernel, userland, X).
 
 The most recent thing I did was move /usr/obj, /usr/xobj/,
 /usr/build, and /tmp to a ramdisk to allow for faster building, and
 also began using the -j on make.  I forgot that I could do that.
 Makes things way faster.  But I only did the scripting and changes
 when I knew what I was doing, and I had enough RAM.
 
 for example, here is my script to build my kernel:
 
 #!/bin/sh
 
 cd /usr/obj
 rm -rf *
 cd /usr/xobj
 rm -rf *
 cd /usr/build
 rm -rf *
 cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
 config -s /usr/src/sys -b . GENERIC.MP
 make clean  make depend  make  make install

ugh is ee bad scripting habits.

what happens if /usr/obj or one of the other dirs does not exist?

-Otto

 
 
 
 after I pull /usr/src successfully, then I issue ./build_kernel  reboot
 
 the caveat is that if something in the build ever were to change,
 I'd be SOL, but I am a frequent visitor to the FAQ, and I'm always
 checking follow -current (http://www.openbsd.org/faq/current.html)
 to see if anything might cause me issues...
 
 The make(1) update issue caught me initially, as I started a build
 before I checked the site, but I saw the change, and then everything
 was good.
 
 I will admit to some abject terror when I first tried building from
 source, but it's like falling asleep... it's that easy.  The devs
 make it quite painless.
 
 Regards,
 Bryan



Re: Problems with Build World

2010-03-02 Thread Bryan

On 3/2/2010 1:22 PM, Otto Moerbeek wrote:



ugh is ee bad scripting habits.

what happens if /usr/obj or one of the other dirs does not exist?

-Otto

I know Otto...  I didn't write it for production purposes...  yes, I'd 
screw the pooch mightily if those directories did not exist..




Re: Problems with Build World

2010-03-02 Thread Bryan Irvine
On Tue, Mar 2, 2010 at 11:17 AM, Bryan bra...@gmail.com wrote:
 On 3/2/2010 12:32 PM, Marc Espie wrote:

 No, it's more complicated than that. It obviously installs mk stuff, then
 include, then it builds libs and install them, then it builds everything
 else and installs it.

 It's not a complicated bootstrap procedure like in freebsd land, it
 assumes
 you already have a mostly working system (for instance, it takes no
 precautions
 for compiler bootstrap).

 follow release(8), find out the step you missed (most likely make obj) and
 proceed from there. You definitely want a clean build before you play

 (snide remark: you think you're smart, so you took shortcuts. Well, think
 again. And anyone who can follow instructions can actually build OpenBSD
 fairly easily. ;-) )


 I missed building make obj on a few occasions.  It happens if you are
 typing in things too quickly, or it's late at night.  I got into the habit
 of using a script that I built from the faq to build each (kernel,
userland,
 X).

 The most recent thing I did was move /usr/obj, /usr/xobj/, /usr/build, and
 /tmp to a ramdisk to allow for faster building, and also began using the
 -j on make.  I forgot that I could do that. Makes things way faster.  But
 I only did the scripting and changes when I knew what I was doing, and I
had
 enough RAM.

 for example, here is my script to build my kernel:

 #!/bin/sh

 cd /usr/obj
 rm -rf *
 cd /usr/xobj
 rm -rf *
 cd /usr/build
 rm -rf *
 cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
 config -s /usr/src/sys -b . GENERIC.MP
 make clean  make depend  make  make install

What if for some reason /usr/obj doesn't exist? what will it remove?  :-)


-B



Re: Problems with Build World

2010-03-02 Thread Marc Espie
On Tue, Mar 02, 2010 at 01:17:09PM -0600, Bryan wrote:
 #!/bin/sh
 
 cd /usr/obj
 rm -rf *
 cd /usr/xobj
 rm -rf *
 cd /usr/build
 rm -rf *
 cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
 config -s /usr/src/sys -b . GENERIC.MP
 make clean  make depend  make  make install

Never *ever* write this, even for your own purposes.

#! /bin/sh
set -e
cd /usr/obj  rm -rf *
cd /usr/xobj  rm -rf *
cd /usr/build  rm -rf *
cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
config -s /usr/src/sys -b . GENERIC.MP
make clean  make depend  make  make install


that's not even more complicated, and it might work.

(personally, I would quickly do a
rm -rf /usr/{obj,xobj,build}/*
but that's me)



Re: Problems with Build World

2010-03-02 Thread Bryan

On 3/2/2010 1:40 PM, Marc Espie wrote:



Never *ever* write this, even for your own purposes.

#! /bin/sh
set -e
cd /usr/obj  rm -rf *
cd /usr/xobj  rm -rf *
cd /usr/build  rm -rf *
cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
config -s /usr/src/sys -b . GENERIC.MP
make clean  make depend  make  make install


that's not even more complicated, and it might work.

(personally, I would quickly do a
rm -rf /usr/{obj,xobj,build}/*
but that's me)


That's why I don't get paid the big bucks... :)  I will make the 
changes, so I don't have to pull my hair out later...




Re: Problems with Build World

2010-03-02 Thread Miod Vallat
 That's why I don't get paid the big bucks... :)  I will make the changes, 
 so I don't have to pull my hair out later...

I can't stress enough how important it is to prevent things, especially
computers, from causing severe loss of hair.

Miod



Re: Problems with Build World

2010-03-02 Thread Otto Moerbeek
On Tue, Mar 02, 2010 at 08:09:58PM +, Miod Vallat wrote:

  That's why I don't get paid the big bucks... :)  I will make the changes, 
  so I don't have to pull my hair out later...
 
 I can't stress enough how important it is to prevent things, especially
 computers, from causing severe loss of hair.
 
 Miod

But at one point is doesn't matter anymore, and you'll be free!

-Otto



Re: Problems with Build World

2010-03-02 Thread Ron McDowell
Thanks to everyone on-list and off- for their hints; snide remark 
silently ignored.  Today the entire build went fine using the same 
scripts as yesterday...  Tomas asked to see my scripts, here they are.  
Note that /usr/obj is symlinked to /Stash/Sources/obj, and /usr/src is 
symlinked to /Stash/Sources/src.




[...@dev] cat 000_refresh_src.sh
#!/bin/sh -x

ver=46stable
VER=OPENBSD_4_6
root=/Stash/Sources

cd $root || exit 1
rm -rf src
mkdir src || exit 1
pax -rzf `ls -1 obsd*|tail -1` || exit 1
cd $root/src || exit 1
cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -r${VER} -Pd || exit 1
cd $root || exit 1
pax -zwx cpio -f obsd-${ver}-`date +%y%m%d`-src-after-cvsup.pgz $dirs 
|| exit 1

echo 
echo 
echo 
echo finished.
exit 0

[...@dev] cat 010_build_and_install_kernel.sh
#!/bin/sh -x

ver=46stable
VER=OPENBSD_4_6
root=/Stash/Sources

cd $root/src || exit 1
make obj || exit 1

cd $root/src/sys/arch/i386/conf/ || exit 1
config GENERIC || exit 1
cd ../compile/GENERIC || exit 1
make clean || exit 1
make depend || exit 1
make || exit 1
make install || exit 1
echo 
echo 
echo 
echo reboot to start new kernel
exit 0

[...@dev] cat 020_build_and_install_userland.sh
#!/bin/sh -x

ver=46stable
VER=OPENBSD_4_6
root=/Stash/Sources
DESTDIR=/

cd $root/src/etc || exit 1
make distrib-dirs || exit 1
cd $root/src || exit 1
make build || exit 1
echo 
echo 
echo 
echo reboot to start using new userland.

--
Ron McDowell
San Antonio TX



Re: Problems with Build World

2010-03-02 Thread Hugo Villeneuve
On Tue, Mar 02, 2010 at 08:40:47PM +0100, Marc Espie wrote:
 On Tue, Mar 02, 2010 at 01:17:09PM -0600, Bryan wrote:
  [...]
 
 #! /bin/sh
 set -e

 cd /usr/obj  rm -rf *
 cd /usr/xobj  rm -rf *

Stupid question: Is that even necessary before building a kernel
on i386?

I know mac68k/m68k archs will make /usr/src/sys/arch/m68k/fpsp as
part of a kernel build. And annoyingly, if you didn't make obj
in that folder first, your next cvs up will be peppered with ?
lines.

Any other arch is special in that way?


 cd /usr/build  rm -rf *
 cp /usr/src/sys/arch/i386/conf/GENERIC.MP .
 config -s /usr/src/sys -b . GENERIC.MP
 make clean  make depend  make  make install



-- 
Hugo Villeneuve h...@eintr.net
http://EINTR.net/ 



Re: Problems with Build World

2010-03-02 Thread Woodchuck
On Tue, Mar 2, 2010 at 4:30 PM, Hugo Villeneuve
harpa...@jwales.eintr.net wrote:
 On Tue, Mar 02, 2010 at 08:40:47PM +0100, Marc Espie wrote:
 On Tue, Mar 02, 2010 at 01:17:09PM -0600, Bryan wrote:
  [...]

 #! /bin/sh
 set -e

 cd /usr/obj  rm -rf *
 cd /usr/xobj  rm -rf *

 Stupid question: Is that even necessary before building a kernel
 on i386?

Not that I am aware.  The orthodox kernel compilation,

cd /usr/src/sys/arch/name your poison/conf
config name of kernel
cd ..
make clean  make depend  make
check your work
make install

does not use /usr/*obj at all, nor anything outside of /usr/src/sys,
(But when you make the raft of kernels with make release,
/usr/obj is used.)

In the ancient days, many only had the /usr/src/sys hierarchy
installed, since they needed only to roll a custom kernel  -- this
made a difference in days of 10MByte main memory and 120MB
disks, and was in fact a necessity.  No longer, though, thanks to
sysctl's and related solutions.

A second point, I like to keep /usr/*obj around in case I mess
around with something in /usr/src/ and wish to recompile just
a component.  This is handy when a source patch comes out.


 I know mac68k/m68k archs will make /usr/src/sys/arch/m68k/fpsp as
 part of a kernel build. And annoyingly, if you didn't make obj

I see that's under /usr/src/sys   I'd put up with the ?'s.  Or maybe
stick .cvsignore files in the obj dirs.  potato/potahto.

 in that folder first, your next cvs up will be peppered with ?
 lines.

 Any other arch is special in that way?

Each snowflake is unique :)

Dave
-- 
teh googlez read my emails 'n' STUFF  LOLZ!!! urz 2!!! LOLZ!!!



Re: Problems with Build World

2010-03-02 Thread Woodchuck
 #!/bin/sh -x

 ver=46stable
 VER=OPENBSD_4_6
 root=/Stash/Sources
 DESTDIR=/

Is this necessary or desirable?  I ask because it is my impression
that on NetBSD,  DESTDIR=/ and DESTDIR unset is used to
discriminate between a full installation, including /etc and
what we're trying to do here, which is updating the host doing
the compilation on the fly.  How does OpenBSD discriminate
between those two cases?  My habit is to unset DESTDIR
before commencing a make build.

Dave
-- 
teh googlez read my emails 'n' STUFF  LOLZ!!! urz 2!!! LOLZ!!!



Re: Problems with Build World

2010-03-02 Thread Theo de Raadt
  #!/bin/sh -x
 
  ver=46stable
  VER=OPENBSD_4_6
  root=/Stash/Sources
  DESTDIR=/
 
 Is this necessary or desirable?  I ask because it is my impression
 that on NetBSD,  DESTDIR=/ and DESTDIR unset is used to
 discriminate between a full installation, including /etc and
 what we're trying to do here, which is updating the host doing
 the compilation on the fly.  How does OpenBSD discriminate
 between those two cases?  

By hving it unset.

 My habit is to unset DESTDIR
 before commencing a make build.

Damn right.

I think we've done an admirable job of keeping /usr/src/Makefile and
/usr/src/etc/Makefile mostly readably and without other obtuseness, so
please do go read them.  It is pretty clear.



Re: Problems with Build World

2010-03-02 Thread Woodchuck
On Tue, Mar 2, 2010 at 10:27 PM, Ron McDowell r...@fuzzwad.org wrote:
 the $ver $VER and $ROOT are my own.  For $DESTDIR, see
 http://openbsd.org/faq/faq5.html#Bld section 5.3.5:

 Make sure all the appropriate directories are created.

   # cd /usr/src/etc  env DESTDIR=/ make distrib-dirs

 As a newbie to OpenBSD I have to believe the docs are correct...

Ah.  But ~that~ DESTDIR is transient, only for the make distrib-dirs
Only has effect in the make distrib-dirs subshell.

(try:$ unset FOO
   $ env FOO=bar ls /tmp
   $ echo $FOO

)

Docs correct?  In this OS, yes.  Man release is holy writ.

Dave
--
teh googlez read my emails 'n' STUFF  LOLZ!!! urz 2!!! LOLZ!!!



Re: Problems with Build World

2010-03-01 Thread Tomas Bodzar
What are you trying to accomplish?

If you want to follow -stable then use this
http://www.openbsd.org/stable.html  (no make world anywhere in text).
If you want your own kernel then it's not supported. You can do that,
but you are on your own. Still -current or snapshots are best way with
OpenBSD because of its stability and good job of developers.

On Tue, Mar 2, 2010 at 6:00 AM, Ron McDowell r...@fuzzwad.org wrote:
 I'm relatively new to OpenBSD but have been working with FreeBSD for 15+
 years and ATT/USL before that.

 I have installed OpenBSD i386 v4.6 via a boot floppy and ftp. Installed the
 src and sys tarballs.
 Rebuilt the kernel, reboot, build World, reboot.
 cvs -d anon...@anoncvs3.usa.openbsd.org:/cvs up -rOPENBSD_4_6 -Pd
 rebuilt kernel, reboot.
 all good to this point.
 make build fails with a ton of errors in the krb tree.

 I'm not as worried about the actual error...I'm sure it'll be fixed
 soon and I'll rebuild in a day or two...but I'm concerned about the current
 state of the system, and what 'make world' actually does.

 Does 'make world' build and install in subdirectories or does it build
 everything first, then install everything?
 Is there a way to separately build everything, then install it all? B That
 way I'd know that all's well before actually committing to my tree.

 Thanks.



 --
 Ron McDowell
 San Antonio TX





--
http://www.openbsd.org/lyrics.html