Bug 231284 - "stand/i386" could not be built without buildworld
Summary: "stand/i386" could not be built without buildworld
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Warner Losh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-10 14:58 UTC by Lev A. Serebryakov
Modified: 2018-09-10 19:31 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-10 14:58:18 UTC
diskless(8) says:

====
   cd /usr/src/stand/i386
   make	clean; make; make install
   cp /boot/pxeboot /tftpdir/
====

but it doesn't work anymore:

====
cc  -O2 -pipe   -I/usr/home/lev/FreeBSD/src/stand/i386/btx/lib -nostdinc -I/usr/home/lev/FreeBSD/src/stand/libsa32 -I/usr/home/lev/FreeBSD/src/stand/libsa -D_STANDALONE -I/usr/home/lev/FreeBSD/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface -DLOADER_GELI_SUPPORT -I/usr/home/lev/FreeBSD/src/stand/libsa/geli -DLOADER_DISK_SUPPORT -m32 -ffreestanding -mno-mmx -mno-sse -mno-avx -mno-avx2 -msoft-float -march=i386 -I. -fomit-frame-pointer  -mrtd  -mregparm=3  -DUFS1_AND_UFS2  -DFLAGS=0x80  -DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600  -DSIORST="\x1bc"  -I/usr/home/lev/FreeBSD/src/stand/common  -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings  -Winline -g -MD  -MF.depend.boot2.o -MTboot2.o -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Oz -Oz -mstack-alignment=8 -mllvm -inline-threshold=3 -mllvm -simplifycfg-dup-ret -mllvm -enable-load-pre=false -Qunused-arguments  -c boot2.c -o boot2.o
boot2.c:28:10: fatal error: 'stdarg.h' file not found
#include <stdarg.h>
         ^~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/home/lev/FreeBSD/src/stand/i386/boot2
*** Error code 1
====
Comment 1 Warner Losh freebsd_committer freebsd_triage 2018-09-10 15:00:28 UTC
diskless is wrong. You need to cd to stand, not stand/i386.
Comment 2 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-10 15:02:37 UTC
(In reply to Warner Losh from comment #1)
Ok, then it is docs problem, sorry :-)
Comment 3 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-10 15:03:56 UTC
But stand doesn;t help completely:

====
===> userboot/test (all)
machine -> /usr/home/lev/FreeBSD/src/sys/amd64/include
x86 -> /usr/home/lev/FreeBSD/src/sys/x86/include
echo test.full: /usr/lib/libc.a  >> .depend
cc  -I/usr/home/lev/FreeBSD/src/stand/userboot -g -MD  -MF.depend.test.o -MTtest.o -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Oz -Qunused-arguments  -c test.c -o test.o
In file included from test.c:35:
/usr/include/err.h:50:30: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
void    verr(int, const char *, __va_list) __dead2 __printf0like(2, 0);
.....
====
Comment 4 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-10 15:08:14 UTC
(In reply to Lev A. Serebryakov from comment #3)
Ooops, it is problem of building CURRENT stand on STABLE host, it is not error per se, I thinks,
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-09-10 15:17:23 UTC
A commit references this bug:

Author: imp
Date: Mon Sep 10 15:16:33 UTC 2018
New revision: 338559
URL: https://svnweb.freebsd.org/changeset/base/338559

Log:
  Correct directions for building pxeboot. One needs to cd to src/stand,
  not src/stand/i386 as the directions say.

  PR: 231284
  Approved by: re@ (gjb)

Changes:
  head/share/man/man8/diskless.8
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2018-09-10 19:31:17 UTC
Assign to committer that closed.