DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th April 2015
bceverly bceverly is offline
Port Guard
 
Join Date: Mar 2015
Posts: 18
Thanked 0 Times in 0 Posts
Default Building OpenBSD userland from source

Hi - apologies if this is a n00b question. I am attempting to follow current and build from source for the first time. I have successfully built the kernel and am running it. In trying to build userland, I have discovered that in bsd.subdir.mk (in /usr/share/mk) ${MAKE} is being invoked with a -C (capital C) option that is not legit for pmake.

I see that -C is a legit option for gmake so if I'm doing something wrong, I'd sure appreciate a nudge in the right direction. My google fu has not availed me on this one.

Thanks in advance
Reply With Quote
  #2   (View Single Post)  
Old 6th April 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 4,213
Thanked 214 Times in 189 Posts
Default

You *must* start from the most recent snapshot available, in order to follow -current. Building -current from a prior -release is unsupported. It's a guess, based on the limited information posted, but it might be why you are having trouble.

Follow FAQ 5 carefully. You may also find the release(8) manual helpful for building the system.
Reply With Quote
  #3   (View Single Post)  
Old 6th April 2015
bceverly bceverly is offline
Port Guard
 
Join Date: Mar 2015
Posts: 18
Thanked 0 Times in 0 Posts
Default

Thanks. I did a fresh install of 5.6 from the ISO image before doing this. Am I understanding you correctly that I first need to build "stable", then I can grab the current code and build from there?

Basically my process so far has been:

1. Download the 5.6 ISO image
2. Install from the image
3. Log in as root and set my CVSROOT environment variable
4. Check out the code from CVS (I had been just grabbing current) (src, xenocara and ports)
5. Following FAQ 5 to build the kernel (multi CPU / amd64) from source
6. Reboot
7. Build userland per 5.3.5 from the FAQ

I immediately hit the "invalid -C flag" error when I run "make build" from /usr/src and when I look at the makefile, it most certainly is invoking ${MAKE} with a -C option which the man page doesn't list as a valid flag.

I'll try following stable using this approach and see if I am able to build that. From my reading of the documentation, stable is basically the 5.6 base plus the errata.

Thanks for the help so far. Please let me know if I'm heading down a bad path.
Reply With Quote
  #4   (View Single Post)  
Old 6th April 2015
ibara's Avatar
ibara ibara is offline
Spam Deminer
 
Join Date: Jan 2014
Posts: 286
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by bceverly View Post
I immediately hit the "invalid -C flag" error when I run "make build" from /usr/src and when I look at the makefile, it most certainly is invoking ${MAKE} with a -C option which the man page doesn't list as a valid flag.
You checked out a -current tree (or a 5.7 tree). The -C option to make was added recently:
http://marc.info/?l=openbsd-cvs&m=142331595208299&w=2
Your make dates from before the -C option was added. The option will be available in 5.7.

If you really know what you are doing, you will have to build and install the new make before building anything else.
Reply With Quote
  #5   (View Single Post)  
Old 6th April 2015
bceverly bceverly is offline
Port Guard
 
Join Date: Mar 2015
Posts: 18
Thanked 0 Times in 0 Posts
Default

Thanks all. The hint about building the latest make solved my problem.
Reply With Quote
  #6   (View Single Post)  
Old 6th April 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 4,213
Thanked 214 Times in 189 Posts
Default

Quote:
Originally Posted by bceverly View Post
Am I understanding you correctly that I first need to build "stable", then I can grab the current code and build from there?
No, the supported path is starting from a binary install/upgrade of -current itself. That means, the most recently available snapshot.
Quote:
Originally Posted by ibara View Post
If you really know what you are doing, you will have to build and install the new make before building anything else.
And that is why building -current from anything other than -current is unsupported. Possible? Yes. Supported? No. That's because, while careful analysis of the Following -current FAQ can provide you with the changes to the OS and/or the build toolchain you may need to handle manually before building the full system; it's not necessarily going to be all-inclusive. The "flag day" changes that come along recommend using a snapshot rather than building from source for very good reason. The most recent example is the Static PIE transition.
Reply With Quote
  #7   (View Single Post)  
Old 6th April 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,344
Thanked 182 Times in 149 Posts
Default

Quote:
Originally Posted by bceverly View Post
Thanks. I did a fresh install of 5.6 from the ISO image before doing this. Am I understanding you correctly that I first need to build "stable", then I can grab the current code and build from there?
No, as mentioned by Jggimi you need to install a binary snapshot of the OpenBSD current branch first.
For example from ftp://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/
Code:
       46518 Apr  2 19:53 INSTALL.amd64
        1726 Apr  5 22:27 SHA256
        1889 Apr  5 22:28 SHA256.sig
    55890709 Apr  2 19:48 base57.tgz
     9951807 Apr  2 19:47 bsd
     9988254 Apr  2 19:47 bsd.mp
     7602926 Apr  2 19:53 bsd.rd
     7747584 Apr  2 19:53 cd57.iso
       71108 Apr  2 19:37 cdboot
        2048 Apr  2 19:37 cdbr
    51293032 Apr  2 19:48 comp57.tgz
     1474560 Apr  2 19:53 floppy57.fs
     2789749 Apr  2 19:48 game57.tgz
        1490 Apr  5 22:28 index.txt
   293601280 Apr  5 22:20 install57.fs
   227905536 Apr  5 22:20 install57.iso
     8968350 Apr  2 19:48 man57.tgz
     3571712 Apr  2 19:53 miniroot57.fs
       80996 Apr  2 19:37 pxeboot
    16972976 Apr  5 22:19 xbase57.tgz
    39930097 Apr  5 22:19 xfont57.tgz
    19794027 Apr  5 22:19 xserv57.tgz
     4512055 Apr  5 22:19 xshare57.tgz
On normal working days about 2 snapshots are being pushed to the ftp servers. With that rate I wonder why you would want to build from source
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie - Building OpenBSD WAP, need assistance bobmarss OpenBSD General 5 16th October 2012 10:00 PM
*** Error code 1 building OpenBSD 5.1-stable from source comet--berkeley OpenBSD Installation and Upgrading 12 19th May 2012 02:18 AM
OpenBSD Building VPN’s with OpenBSD and IPSEC J65nko News 0 19th February 2011 07:53 PM
Chrooted Userland Tommahawk OpenBSD General 3 23rd December 2010 12:01 AM
building userland fails after upgrade to 7.0 padmanabh FreeBSD Installation and Upgrading 10 22nd July 2008 05:18 AM


All times are GMT. The time now is 12:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick