On 23/10/2019 17:44, Jared Stevens via blfs-support wrote:
Let's try some troubleshooting:
First, try "make V=1", and check the command that leads to the
error. If
it contains "-m32", we have to understand why(see below). if not,
assuming you do not have "foo.h" in your current directory, try:
touch foo.h
cpp -dM foo.h | grep x86
if -m32 is used in the command line, grep for -m32 in the build
directory, and try to understand why it is used for you.
Here is the output of the "configure" command before starting the make
process:
Install prefix /usr
BIOS directory /usr/share/qemu
firmware path /usr/share/qemu-firmware
binary directory /usr/bin
library directory /usr/lib
module directory /usr/lib/qemu
libexec directory /usr/libexec
include directory /usr/include
config directory /etc
local state directory /usr/var
Manual directory /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /usr/src/blfs/vm/qemu-4.1.0
GIT binary git
GIT submodules
C compiler cc
Host C compiler cc
C++ compiler c++
Objective-C compiler clang
ARFLAGS rv
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS -I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt
-pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fPIE
-DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common
-fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels
-Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body
-Wnested-externs -Wformat-security -Wformat-y2k -Winit-self
-Wignored-qualifiers -Wold-style-declaration -Wold-style-definition
-Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1
-I/usr/include/libpng16 -I/usr/include/libdrm
-I$(SRC_PATH)/capstone/include
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
QEMU_LDFLAGS -L$(BUILD_DIR)/dtc/libfdt
make make
install install
python python3 -B (3.8.0)
slirp support internal
smbd /usr/sbin/smbd
module support no
*host CPU x86_64*
host big endian no
*target list x86_64-softmmu*
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
SDL support yes (2.0.10)
SDL image support no
GTK support yes (3.24.12)
GTK GL support yes
VTE support no
TLS priority NORMAL
GNUTLS support yes
libgcrypt no
nettle yes (3.5.1)
libtasn1 yes
PAM yes
iconv support yes
curses support yes
virgl support no
curl support yes
mingw32 support no
Audio drivers alsa
Block whitelist (rw)
Block whitelist (ro)
VirtFS support yes
Multipath support no
VNC support yes
VNC SASL support yes
VNC JPEG support yes
VNC PNG support yes
xen support no
brlapi support no
bluez support yes
Documentation no
PIE yes
vde support no
netmap support no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs yes
KVM support yes
HAX support no
HVF support no
WHPX support no
TCG support yes
TCG debug enabled no
TCG interpreter no
malloc trim support yes
RDMA support no
PVRDMA support no
fdt support git
membarrier no
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
posix_memalign yes
libcap-ng support no
vhost-net support yes
vhost-crypto support yes
vhost-scsi support yes
vhost-vsock support yes
vhost-user support yes
Trace backends log
spice support no
rbd support no
xfsctl support yes
smartcard support no
libusb yes
usb net redir no
OpenGL support yes
OpenGL dmabufs yes
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support yes
coroutine backend ucontext
coroutine pool yes
debug stack usage no
mutex debugging no
crypto afalg no
GlusterFS support no
gcov gcov
gcov enabled no
TPM support yes
libssh support no
QOM debugging yes
Live block migration yes
lzo support yes
snappy support no
bzip2 support yes
lzfse support no
NUMA host support no
libxml2 yes
tcmalloc support no
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device no
bochs support yes
cloop support yes
dmg support yes
qcow v1 support yes
vdi support yes
vvfat support yes
qed support yes
parallels support yes
sheepdog support yes
capstone internal
docker no
libpmem support no
libudev yes
default devices yes
NOTE: cross-compilers enabled: 'cc'
And here is where the error occurs using "*make V=1*":
make[1]: Entering directory
'/usr/src/blfs/vm/qemu-4.1.0/build/pc-bios/optionrom'
cc -E -iquote /usr/src/blfs/vm/qemu-4.1.0/tcg -iquote
/usr/src/blfs/vm/qemu-4.1.0/tcg/i386
-I/usr/src/blfs/vm/qemu-4.1.0/linux-headers
-I/usr/src/blfs/vm/qemu-4.1.0/build/linux-headers -iquote . -iquote
/usr/src/blfs/vm/qemu-4.1.0 -iquote
/usr/src/blfs/vm/qemu-4.1.0/accel/tcg -iquote
/usr/src/blfs/vm/qemu-4.1.0/include -I/usr/src/blfs/vm/qemu-4.1.0 -MMD
-MP -MT multiboot.o -MF ./multiboot.d -c -o -
/usr/src/blfs/vm/qemu-4.1.0/pc-bios/optionrom/multiboot.S | as *-32* -o
multiboot.o
ld -m *elf_i386* -T
/usr/src/blfs/vm/qemu-4.1.0/pc-bios/optionrom/flat.lds -s -o
multiboot.img multiboot.o
objcopy -O binary -j .text multiboot.img multiboot.raw
python3 -B /usr/src/blfs/vm/qemu-4.1.0/scripts/signrom.py multiboot.raw
multiboot.bin
cc -E -iquote /usr/src/blfs/vm/qemu-4.1.0/tcg -iquote
/usr/src/blfs/vm/qemu-4.1.0/tcg/*i386*
-I/usr/src/blfs/vm/qemu-4.1.0/linux-headers
-I/usr/src/blfs/vm/qemu-4.1.0/build/linux-headers -iquote . -iquote
/usr/src/blfs/vm/qemu-4.1.0 -iquote
/usr/src/blfs/vm/qemu-4.1.0/accel/tcg -iquote
/usr/src/blfs/vm/qemu-4.1.0/include -I/usr/src/blfs/vm/qemu-4.1.0 -MMD
-MP -MT linuxboot.o -MF ./linuxboot.d -c -o -
/usr/src/blfs/vm/qemu-4.1.0/pc-bios/optionrom/linuxboot.S | as *-32 *-o
linuxboot.o
ld -m *elf_i386 *-T
/usr/src/blfs/vm/qemu-4.1.0/pc-bios/optionrom/flat.lds -s -o
linuxboot.img linuxboot.o
objcopy -O binary -j .text linuxboot.img linuxboot.raw
python3 -B /usr/src/blfs/vm/qemu-4.1.0/scripts/signrom.py linuxboot.raw
linuxboot.bin
cc -iquote /usr/src/blfs/vm/qemu-4.1.0/build/. -iquote . -iquote
/usr/src/blfs/vm/qemu-4.1.0/tcg -iquote
/usr/src/blfs/vm/qemu-4.1.0/tcg/i386
-I/usr/src/blfs/vm/qemu-4.1.0/linux-headers
-I/usr/src/blfs/vm/qemu-4.1.0/build/linux-headers -iquote . -iquote
/usr/src/blfs/vm/qemu-4.1.0 -iquote
/usr/src/blfs/vm/qemu-4.1.0/accel/tcg -iquote
/usr/src/blfs/vm/qemu-4.1.0/include -I/usr/src/blfs/vm/qemu-4.1.0
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -Wexpansion-to-defined -Wendif-labels
-Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body
-Wnested-externs -Wformat-security -Wformat-y2k -Winit-self
-Wignored-qualifiers -Wold-style-declaration -Wold-style-definition
-Wtype-limits -ffreestanding -fno-stack-protector *-m16* -Wa,*-32*
-MMD -MP -MT linuxboot_dma.o -MF ./linuxboot_dma.d -O2 -g -march=i486
-c -o linuxboot_dma.o
/usr/src/blfs/vm/qemu-4.1.0/pc-bios/optionrom/linuxboot_dma.c
*In file included from /usr/include/features.h:474,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from
/usr/src/blfs/vm/qemu-4.1.0/pc-bios/optionrom/linuxboot_dma.c:65:
/usr/include/gnu/stubs.h:7:11:* *fatal error:* *gnu/stubs-32.h: No such
file or directory*
*7 | # include <gnu/stubs-32.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.*
make[1]: *** [/usr/src/blfs/vm/qemu-4.1.0/rules.mak:69: linuxboot_dma.o]
Error 1
make[1]: Leaving directory
'/usr/src/blfs/vm/qemu-4.1.0/build/pc-bios/optionrom'
make: *** [Makefile:519: pc-bios/optionrom/all] Error 2
Finally, just to make sure, here is the result of the "foo.h" test of
the compiler:
$ touch foo.h
$ cpp -dM foo.h | grep x86
*#define __x86_64 1
#define __x86_64__ 1*
I keep seeing the world "multiboot" throughout the output, so is it
trying to build support for 32-bit VM's even though the host is x86_64?
I also don't see '-m32' anywhere in the command line. However, I DO see
'-m16' which I have no idea what that means in all honesty. I also see
'elf_i386' and '-32' seemingly confirming the use of 32-bit for this
particular make process.
I have exactly the same command lines on my build, and there is no
errors. I've made some experiments:
-------------
$ echo '#include <stdint.h>' > foo.h
$ gcc -m16 foo.h
In file included from /usr/include/features.h:474,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stdint.h:9,
from foo.h:1:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file
or directory
7 | # include <gnu/stubs-32.h>
| ^~~~~~~~~~~~~~~~
compilation terminated
-------------
$ gcc -m16 -ffreestanding foo.h
(no error)
-------------
Actually, /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stdint.h contains:
-----------
#if __STDC_HOSTED__
# if defined __cplusplus && __cplusplus >= 201103L
# undef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# undef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
# endif
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
and __STDC_HOSTED__ is defined to 0 by option -ffreestanding...
and /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stdint-gcc.h does not
include anything...
So there might be some problem with the fact that
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stdint.h is not included
first in your case.
Do you have it? If not, that might be a problem with your gcc
installation. Note that -ffreestanding is rarely used, so that it is
normal that you have seen no error up to now with your new installation
of gcc.
Pierre
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page