Problems building userland

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building userland

Amit Kulkarni-5
Hello,

How are you guys able to build userland? I double-checked that the

http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain

is still referring to ${SUDO}

here is the result.....

# make build
cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
/bin/sh: /usr/bin/sudo: not found
*** Error 127 in /usr/src (Makefile:75 'build')

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Problems building userland

Josh Grosse
On Sat, Sep 19, 2015 at 10:35:07AM -0500, Amit Kulkarni wrote:

> Hello,
>
> How are you guys able to build userland? I double-checked that the
>
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain
>
> is still referring to ${SUDO}
>
> here is the result.....
>
> # make build
> cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
> /bin/sh: /usr/bin/sudo: not found
> *** Error 127 in /usr/src (Makefile:75 'build')
>
> Thanks
>

The sudo application moved from built-in to ports.  See the details in
the Following -current FAQ:

http://www.openbsd.org/faq/current.html#20150703

Reply | Threaded
Open this post in threaded view
|

Re: Problems building userland

Amit Kulkarni-5
On Sat, Sep 19, 2015 at 10:39 AM, Josh Grosse <[hidden email]>
wrote:

> On Sat, Sep 19, 2015 at 10:35:07AM -0500, Amit Kulkarni wrote:
> > Hello,
> >
> > How are you guys able to build userland? I double-checked that the
> >
> >
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain
> >
> > is still referring to ${SUDO}
> >
> > here is the result.....
> >
> > # make build
> > cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
> > /bin/sh: /usr/bin/sudo: not found
> > *** Error 127 in /usr/src (Makefile:75 'build')
> >
> > Thanks
> >
>
> The sudo application moved from built-in to ports.  See the details in
> the Following -current FAQ:
>
> http://www.openbsd.org/faq/current.html#20150703
>
>
Yes, I know. After following instructions removing base sudo, userland does
not build. I think the /usr/src/Makefile needs to be adjusted, or am I
wrong in that?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Problems building userland

Philip Guenther-2
In reply to this post by Amit Kulkarni-5
On Sat, Sep 19, 2015 at 8:35 AM, Amit Kulkarni <[hidden email]> wrote:

> How are you guys able to build userland? I double-checked that the
>
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain
>
> is still referring to ${SUDO}
>
> here is the result.....
>
> # make build
> cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
> /bin/sh: /usr/bin/sudo: not found
> *** Error 127 in /usr/src (Makefile:75 'build')

It's your /etc/mk.conf that says "SUDO=sudo -E".  Either remove that
line and do builds as root, or update it to refer to say SUDO=doas


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: Problems building userland

Amit Kulkarni-5
On Sat, Sep 19, 2015 at 11:01 AM, Philip Guenther <[hidden email]>
wrote:

> On Sat, Sep 19, 2015 at 8:35 AM, Amit Kulkarni <[hidden email]> wrote:
> > How are you guys able to build userland? I double-checked that the
> >
> >
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain
> >
> > is still referring to ${SUDO}
> >
> > here is the result.....
> >
> > # make build
> > cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
> > /bin/sh: /usr/bin/sudo: not found
> > *** Error 127 in /usr/src (Makefile:75 'build')
>
> It's your /etc/mk.conf that says "SUDO=sudo -E".  Either remove that
> line and do builds as root, or update it to refer to say SUDO=doas
>

Thanks for the clue stick Philip! Getting back into compiling after a long
time.

Reply | Threaded
Open this post in threaded view
|

Re: Problems building userland

Nigel J Taylor
In reply to this post by Amit Kulkarni-5
On 09/19/15 16:35, Amit Kulkarni wrote:

> Hello,
>
> How are you guys able to build userland? I double-checked that the
>
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain
>
> is still referring to ${SUDO}
>
> here is the result.....
>
> # make build
> cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
> /bin/sh: /usr/bin/sudo: not found
> *** Error 127 in /usr/src (Makefile:75 'build')
>
> Thanks
>
>
I use this

cd /usr/src
make obj

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

cd /usr/src
make SUDO=doas build


For building other things like ports ...
$ grep SUDO /etc/mk.conf
SUDO=/usr/bin/doas


doas replaces sudo, which is now in ports.

Reply | Threaded
Open this post in threaded view
|

Re: Problems building userland

Patrick-2
In reply to this post by Josh Grosse
Josh Grosse <josh <at> jggimi.homeip.net> writes:

>
> On Sat, Sep 19, 2015 at 10:35:07AM -0500, Amit Kulkarni wrote:
> > Hello,
> >
> > How are you guys able to build userland? I double-checked that the
> >
> >
http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/Makefile?rev=1.125&content-type=text/plain

> >
> > is still referring to ${SUDO}
> >
> > here is the result.....
> >
> > # make build
> > cd /usr/src/share/mk && exec /usr/bin/sudo -E make install
> > /bin/sh: /usr/bin/sudo: not found
> > *** Error 127 in /usr/src (Makefile:75 'build')
> >
> > Thanks
> >
>
> The sudo application moved from built-in to ports.  See the details in
> the Following -current FAQ:
>
> http://www.openbsd.org/faq/current.html#20150703
>
> Greetings I use the FAQ 5.3.5 to build userland
it works on amd64 and i386
5.3.5 - Building the userland
There is a specific process used by OpenBSD. Processes used on other OSs you
may have been familiar with will most likely not work on OpenBSD, and will
get you laughed at when you ask why.

    Clear your /usr/obj directory and rebuild symbolic links:

        # rm -rf /usr/obj/*
        # cd /usr/src
        # make obj

    Note that the use of the /usr/obj directory is mandatory. Failing to do
this step before building the rest of the tree will likely leave your src
tree in bad shape.

    Make sure all the appropriate directories are created.

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

    Build the system:

        # cd /usr/src
        # make build

    This compiles and installs all the "userland" utilities in the
appropriate order. This is a fairly time consuming step -- a very fast
machine may be able to complete it in well under an hour, a very slow
machine may take many days. When this step is complete, you have newly
compiled binaries in place on your system.
>> cheers