Bug 241918 - make buildworld fails: freebsd.cf: No such file or directory
Summary: make buildworld fails: freebsd.cf: No such file or directory
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-12 15:23 UTC by oklaspec
Modified: 2019-11-22 08:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oklaspec 2019-11-12 15:23:07 UTC
How to reproduce:

revision: base r354233
https://svn.freebsd.org/base/releng/12.1

make buildworld
make MAKEOBJDIRPREFIX=/home/rj/RELENG_12_1.obj DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution

...
cd /usr/src/etc/sendmail; make distribution
install -N /usr/src/etc -o root -g wheel -m 644  /usr/src/etc/sendmail/freebsd.mc freebsd.cf /home/rj/RELENG_12_1.tmpl/etc/mail
install: freebsd.cf: No such file or directory
*** Error code 71

Stop.
make[3]: stopped in /usr/src/etc/sendmail
*** Error code 1

Stop.
make[2]: stopped in /usr/src/etc
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
root@ns2:/usr/src # ll /usr/src/etc/sendmail/
total 18
-rw-r--r--  1 root  wheel  2783 Nov  4 01:06 Makefile
-rw-r--r--  1 root  wheel   256 Nov  4 01:06 Makefile.depend
-rw-r--r--  1 root  wheel  4535 Nov  4 01:06 freebsd.mc
-rw-r--r--  1 root  wheel   896 Nov  4 01:06 freebsd.submit.mc
-rw-r--r--  1 root  wheel  2259 Nov  4 01:06 freefall.mc
Comment 1 oklaspec 2019-11-19 07:50:24 UTC
This problem exists even for this command (with MAKEOBJDIRPREFIX=/usr/obj):

```
make MAKEOBJDIRPREFIX=/usr/obj DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution
```

However for this command (with unspecified MAKEOBJDIRPREFIX variable) it works fine as expected:

```
make DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution
```
Comment 2 Mark Millard 2019-11-20 04:29:12 UTC
(In reply to oklaspec from comment #1)

Quoting the build man page:

     MAKEOBJDIRPREFIX  Defines the prefix for directory	names in the tree of
		       built objects.  Defaults	to /usr/obj if not defined.
		       This variable should only be set	in the environment or
		       /etc/src-env.conf and not via /etc/make.conf or
		       /etc/src.conf or	the command line.

Note that last: not to be set in the command line (after "make"). So:

make MAKEOBJDIRPREFIX=/usr/obj DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution

is inappropriate. Possibly presuming a specific shell type:

env MAKEOBJDIRPREFIX=/usr/obj make DESTDIR=/home/rj/RELENG_12_1.tmpl distrib-dirs distribution

would be appropriate (set in the environment) . You may wat to try that.
Comment 3 oklaspec 2019-11-22 08:01:15 UTC
Thanks, I have sh script so `export` works fine for me. I did not tried using `env` but it must works too.