* [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression @ 2017-07-25 22:55 Programmingkid 2017-07-26 4:13 ` Philippe Mathieu-Daudé 0 siblings, 1 reply; 9+ messages in thread From: Programmingkid @ 2017-07-25 22:55 UTC (permalink / raw) To: qemu-devel@nongnu.org qemu-devel; +Cc: Aurelien Jarno, Yongbok Kim, James Hogan While compiling the mips64el-softmmu target I encountered these errors: CC hw/display/g364fb.o hw/core/loader-fit.c:105:41: error: expected expression *addr = fdt32_to_cpu(*(fdt32_t *)prop); ^ hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' *addr = fdt32_to_cpu(*(fdt32_t *)prop); ^ hw/core/loader-fit.c:108:41: error: expected expression *addr = fdt64_to_cpu(*(fdt64_t *)prop); ^ hw/core/loader-fit.c:108:32: error: use of undeclared identifier 'fdt64_t' *addr = fdt64_to_cpu(*(fdt64_t *)prop); ^ hw/core/loader-fit.c:278:19: warning: implicit declaration of function 'fdt_first_subnode' is invalid in C99 [-Wimplicit-function-declaration] off = fdt_first_subnode(itb, configs); ^ hw/core/loader-fit.c:286:23: warning: implicit declaration of function 'fdt_next_subnode' is invalid in C99 [-Wimplicit-function-declaration] off = fdt_next_subnode(itb, off); ^ 2 warnings and 4 errors generated. make: *** [hw/core/loader-fit.o] Error 1 make: *** Waiting for unfinished jobs…. Steps to reproduce the error: ./configure --target-list=mips64el-softmmu && make ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-25 22:55 [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression Programmingkid @ 2017-07-26 4:13 ` Philippe Mathieu-Daudé 2017-07-26 5:15 ` Programmingkid 2017-07-26 10:45 ` Yongbok Kim 0 siblings, 2 replies; 9+ messages in thread From: Philippe Mathieu-Daudé @ 2017-07-26 4:13 UTC (permalink / raw) To: Programmingkid, qemu-devel@nongnu.org qemu-devel Cc: Yongbok Kim, James Hogan, Aurelien Jarno Hi John, On 07/25/2017 07:55 PM, Programmingkid wrote: > While compiling the mips64el-softmmu target I encountered these errors: > > CC hw/display/g364fb.o > hw/core/loader-fit.c:105:41: error: expected expression > *addr = fdt32_to_cpu(*(fdt32_t *)prop); > ^ > hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' It seems you are missing the libfdt headers, so indeed you found bug. Replacing CONFIG_FITLOADER by CONFIG_FDT in hw/core/Makefile.objs and default-configs/mips64el-softmmu.mak should fix it, can you try? > *addr = fdt32_to_cpu(*(fdt32_t *)prop); > ^ > hw/core/loader-fit.c:108:41: error: expected expression > *addr = fdt64_to_cpu(*(fdt64_t *)prop); > ^ > hw/core/loader-fit.c:108:32: error: use of undeclared identifier 'fdt64_t' > *addr = fdt64_to_cpu(*(fdt64_t *)prop); > ^ > hw/core/loader-fit.c:278:19: warning: implicit declaration of function > 'fdt_first_subnode' is invalid in C99 [-Wimplicit-function-declaration] > off = fdt_first_subnode(itb, configs); > ^ > hw/core/loader-fit.c:286:23: warning: implicit declaration of function > 'fdt_next_subnode' is invalid in C99 [-Wimplicit-function-declaration] > off = fdt_next_subnode(itb, off); > ^ > 2 warnings and 4 errors generated. > make: *** [hw/core/loader-fit.o] Error 1 > make: *** Waiting for unfinished jobs…. It'd be useful if next time you also tell which compiler/version are you using. > Steps to reproduce the error: > ./configure --target-list=mips64el-softmmu && make And also the ./configure output, I'm interested by: "fdt support no" Regards, Phil. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 4:13 ` Philippe Mathieu-Daudé @ 2017-07-26 5:15 ` Programmingkid 2017-07-26 10:24 ` Peter Maydell 2017-07-26 10:45 ` Yongbok Kim 1 sibling, 1 reply; 9+ messages in thread From: Programmingkid @ 2017-07-26 5:15 UTC (permalink / raw) To: Philippe Mathieu-Daudé; +Cc: qemu-devel@nongnu.org qemu-devel > On Jul 26, 2017, at 12:13 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > > Hi John, > > On 07/25/2017 07:55 PM, Programmingkid wrote: >> While compiling the mips64el-softmmu target I encountered these errors: >> CC hw/display/g364fb.o >> hw/core/loader-fit.c:105:41: error: expected expression >> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >> ^ >> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' > > It seems you are missing the libfdt headers, so indeed you found bug. > > Replacing CONFIG_FITLOADER by CONFIG_FDT in hw/core/Makefile.objs and default-configs/mips64el-softmmu.mak should fix it, can you try? That appears to help make things move past the loader-fit.c file. Here are the new errors: CC hw/core/loader-fit.o CC hw/dma/rc4030.o CC hw/ide/via.o hw/core/loader-fit.c:105:41: error: expected expression *addr = fdt32_to_cpu(*(fdt32_t *)prop); ^ hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' *addr = fdt32_to_cpu(*(fdt32_t *)prop); ^ hw/core/loader-fit.c:108:41: error: expected expression *addr = fdt64_to_cpu(*(fdt64_t *)prop); ^ hw/core/loader-fit.c:108:32: error: use of undeclared identifier 'fdt64_t' *addr = fdt64_to_cpu(*(fdt64_t *)prop); ^ hw/core/loader-fit.c:278:19: warning: implicit declaration of function 'fdt_first_subnode' is invalid in C99 [-Wimplicit-function-declaration] off = fdt_first_subnode(itb, configs); ^ hw/core/loader-fit.c:286:23: warning: implicit declaration of function 'fdt_next_subnode' is invalid in C99 [-Wimplicit-function-declaration] off = fdt_next_subnode(itb, off); ^ 2 warnings and 4 errors generated. make: *** [hw/core/loader-fit.o] Error 1 make: *** Waiting for unfinished jobs.... > >> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >> ^ >> hw/core/loader-fit.c:108:41: error: expected expression >> *addr = fdt64_to_cpu(*(fdt64_t *)prop); >> ^ >> hw/core/loader-fit.c:108:32: error: use of undeclared identifier 'fdt64_t' >> *addr = fdt64_to_cpu(*(fdt64_t *)prop); >> ^ >> hw/core/loader-fit.c:278:19: warning: implicit declaration of function >> 'fdt_first_subnode' is invalid in C99 [-Wimplicit-function-declaration] >> off = fdt_first_subnode(itb, configs); >> ^ >> hw/core/loader-fit.c:286:23: warning: implicit declaration of function >> 'fdt_next_subnode' is invalid in C99 [-Wimplicit-function-declaration] >> off = fdt_next_subnode(itb, off); >> ^ >> 2 warnings and 4 errors generated. >> make: *** [hw/core/loader-fit.o] Error 1 >> make: *** Waiting for unfinished jobs…. > > It'd be useful if next time you also tell which compiler/version are you using. gcc -v: Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.1.0 (clang-802.0.42) Target: x86_64-apple-darwin16.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin > >> Steps to reproduce the error: >> ./configure --target-list=mips64el-softmmu && make > > And also the ./configure output, I'm interested by: > > "fdt support no” Actually it was "fdt support yes”. > > Regards, > > Phil. Thanks for the help. Here is some more info that might help: Here is the full configure output: ./configure --target-list=mips64el-softmmu Install prefix /usr/local BIOS directory /usr/local/share/qemu binary directory /usr/local/bin library directory /usr/local/lib module directory /usr/local/lib/qemu libexec directory /usr/local/libexec include directory /usr/local/include config directory /usr/local/etc local state directory /usr/local/var Manual directory /usr/local/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /Users/john/Documents/Development/Projects/Qemu/qemu-git C compiler cc Host C compiler cc C++ compiler c++ Objective-C compiler clang ARFLAGS rv CFLAGS -O2 -g QEMU_CFLAGS -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -D_REENTRANT -I/usr/local/Cellar/glib/2.46.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.46.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -DNCURSES_WIDECHAR -D_DARWIN_C_SOURCE -I/opt/local/include -m64 -mcx16 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -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 -Wno-string-plus-int -Wno-initializer-overrides -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/local/Cellar/gnutls/3.4.11/include -I/usr/local/Cellar/nettle/3.2/include -I/usr/local/Cellar/libtasn1/4.8/include -I/opt/local/include -I/usr/local/Cellar/nettle/3.2/include -I/usr/local/Cellar/libpng/1.6.29/include/libpng16 -I/usr/local/Cellar/libusb/1.0.20/include/libusb-1.0 -I/usr/local/Cellar/usbredir/0.7.1/include LDFLAGS -m64 -framework CoreFoundation -framework IOKit -arch x86_64 -g make make install install python python -B smbd /usr/sbin/smbd module support no host CPU x86_64 host big endian no target list mips64el-softmmu gprof enabled no sparse enabled no strip binaries yes profiler no static build no Cocoa support yes pixman system SDL support no GTK support no GTK GL support no VTE support yes (0.39.92) TLS priority NORMAL GNUTLS support yes GNUTLS rnd yes libgcrypt no libgcrypt kdf no nettle yes (3.2) nettle kdf yes libtasn1 yes curses support yes virgl support no curl support yes mingw32 support no Audio drivers coreaudio Block whitelist (rw) Block whitelist (ro) VirtFS 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 no Documentation yes PIE no vde support no netmap support no Linux AIO support no ATTR/XATTR support no Install blobs yes KVM support no HAX support yes TCG support yes TCG debug enabled no TCG interpreter no RDMA support no fdt support yes preadv support no fdatasync no madvise yes posix_madvise yes libcap-ng support no vhost-net support no vhost-scsi support no vhost-vsock support no Trace backends log spice support no rbd support no xfsctl support no smartcard support no libusb yes usb net redir yes OpenGL support no OpenGL dmabufs no 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 no coroutine backend sigaltstack coroutine pool yes debug stack usage no crypto afalg no GlusterFS support no gcov gcov gcov enabled no TPM support yes libssh2 support no TPM passthrough no QOM debugging yes Live block migration yes lzo support no snappy support no bzip2 support yes NUMA host support no tcmalloc support no jemalloc support no avx2 optimization no replication support yes VxHS block device no ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 5:15 ` Programmingkid @ 2017-07-26 10:24 ` Peter Maydell 2017-07-26 16:46 ` Programmingkid 0 siblings, 1 reply; 9+ messages in thread From: Peter Maydell @ 2017-07-26 10:24 UTC (permalink / raw) To: Programmingkid Cc: Philippe Mathieu-Daudé, qemu-devel@nongnu.org qemu-devel On 26 July 2017 at 06:15, Programmingkid <programmingkidx@gmail.com> wrote: > >> On Jul 26, 2017, at 12:13 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: >> >> Hi John, >> >> On 07/25/2017 07:55 PM, Programmingkid wrote: >>> While compiling the mips64el-softmmu target I encountered these errors: >>> CC hw/display/g364fb.o >>> hw/core/loader-fit.c:105:41: error: expected expression >>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>> ^ >>> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' >> >> It seems you are missing the libfdt headers, so indeed you found bug. Configure requires libfdt to exist to enable mips64el-softmmu, so something is going wrong with our configure test compared to how QEMU itself is being built. > That appears to help make things move past the loader-fit.c file. Here are the new errors: > > CC hw/core/loader-fit.o > CC hw/dma/rc4030.o > CC hw/ide/via.o > hw/core/loader-fit.c:105:41: error: expected expression > *addr = fdt32_to_cpu(*(fdt32_t *)prop); > ^ ...this is still failing on loader-fit.c in the same way. >> And also the ./configure output, I'm interested by: >> >> "fdt support no” > > Actually it was "fdt support yes”. Configure thinks the fdt headers are available... > ./configure --target-list=mips64el-softmmu > Install prefix /usr/local > BIOS directory /usr/local/share/qemu > binary directory /usr/local/bin > library directory /usr/local/lib > module directory /usr/local/lib/qemu > libexec directory /usr/local/libexec > include directory /usr/local/include > config directory /usr/local/etc > local state directory /usr/local/var > Manual directory /usr/local/share/man > ELF interp prefix /usr/gnemul/qemu-%M > Source path /Users/john/Documents/Development/Projects/Qemu/qemu-git > C compiler cc > Host C compiler cc > C++ compiler c++ > Objective-C compiler clang > ARFLAGS rv > CFLAGS -O2 -g > QEMU_CFLAGS -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -D_REENTRANT -I/usr/local/Cellar/glib/2.46.2/include ...and it's put our local copy of libfdt on the include path. The fdt32_t type that the compiler is complaining about ought to be defined in the header in dtc/libfdt/libfdt_env.h. I wonder if you have an old copy of that submodule; if so then "git submodule update" ought to fix it. thanks -- PMM ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 10:24 ` Peter Maydell @ 2017-07-26 16:46 ` Programmingkid 2017-07-26 21:02 ` Philippe Mathieu-Daudé 2017-07-26 21:03 ` Philippe Mathieu-Daudé 0 siblings, 2 replies; 9+ messages in thread From: Programmingkid @ 2017-07-26 16:46 UTC (permalink / raw) To: Peter Maydell Cc: Philippe Mathieu-Daudé, qemu-devel@nongnu.org qemu-devel > On Jul 26, 2017, at 6:24 AM, Peter Maydell <peter.maydell@linaro.org> wrote: > > On 26 July 2017 at 06:15, Programmingkid <programmingkidx@gmail.com> wrote: >> >>> On Jul 26, 2017, at 12:13 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: >>> >>> Hi John, >>> >>> On 07/25/2017 07:55 PM, Programmingkid wrote: >>>> While compiling the mips64el-softmmu target I encountered these errors: >>>> CC hw/display/g364fb.o >>>> hw/core/loader-fit.c:105:41: error: expected expression >>>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>>> ^ >>>> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' >>> >>> It seems you are missing the libfdt headers, so indeed you found bug. > > Configure requires libfdt to exist to enable mips64el-softmmu, > so something is going wrong with our configure test compared > to how QEMU itself is being built. > >> That appears to help make things move past the loader-fit.c file. Here are the new errors: >> >> CC hw/core/loader-fit.o >> CC hw/dma/rc4030.o >> CC hw/ide/via.o >> hw/core/loader-fit.c:105:41: error: expected expression >> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >> ^ > > ...this is still failing on loader-fit.c in the same way. > >>> And also the ./configure output, I'm interested by: >>> >>> "fdt support no” >> >> Actually it was "fdt support yes”. > > Configure thinks the fdt headers are available… They appear to be available. The dtc/libfdt folder does have the files QEMU uses. > >> ./configure --target-list=mips64el-softmmu >> Install prefix /usr/local >> BIOS directory /usr/local/share/qemu >> binary directory /usr/local/bin >> library directory /usr/local/lib >> module directory /usr/local/lib/qemu >> libexec directory /usr/local/libexec >> include directory /usr/local/include >> config directory /usr/local/etc >> local state directory /usr/local/var >> Manual directory /usr/local/share/man >> ELF interp prefix /usr/gnemul/qemu-%M >> Source path /Users/john/Documents/Development/Projects/Qemu/qemu-git >> C compiler cc >> Host C compiler cc >> C++ compiler c++ >> Objective-C compiler clang >> ARFLAGS rv >> CFLAGS -O2 -g >> QEMU_CFLAGS -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -D_REENTRANT -I/usr/local/Cellar/glib/2.46.2/include > > ...and it's put our local copy of libfdt on the include path. > > The fdt32_t type that the compiler is complaining > about ought to be defined in the header in > dtc/libfdt/libfdt_env.h. The fdt32_t type is not there. Here is the full libfdt_env.h file: #ifndef _LIBFDT_ENV_H #define _LIBFDT_ENV_H #include <stddef.h> #include <stdint.h> #include <string.h> #define _B(n) ((unsigned long long)((uint8_t *)&x)[n]) static inline uint32_t fdt32_to_cpu(uint32_t x) { return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3); } #define cpu_to_fdt32(x) fdt32_to_cpu(x) static inline uint64_t fdt64_to_cpu(uint64_t x) { return (_B(0) << 56) | (_B(1) << 48) | (_B(2) << 40) | (_B(3) << 32) | (_B(4) << 24) | (_B(5) << 16) | (_B(6) << 8) | _B(7); } #define cpu_to_fdt64(x) fdt64_to_cpu(x) #undef _B #endif /* _LIBFDT_ENV_H */ > I wonder if you have an old copy of that submodule; > if so then "git submodule update" ought to fix it. I’m not sure how to obtain the version of libfdt. I did see a file called version.lds. At the top of this file is this text: "LIBFDT_1.2 {" So maybe I am using version 1.2. Perhaps the configure test should declare a variable of the fdt32_t type in the test code. After doing a git submodule update qemu-system-mips64el compiled successfully. Thank you. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 16:46 ` Programmingkid @ 2017-07-26 21:02 ` Philippe Mathieu-Daudé 2017-07-26 21:03 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 9+ messages in thread From: Philippe Mathieu-Daudé @ 2017-07-26 21:02 UTC (permalink / raw) To: Programmingkid, Peter Maydell; +Cc: qemu-devel@nongnu.org qemu-devel On 07/26/2017 01:46 PM, Programmingkid wrote: >> On Jul 26, 2017, at 6:24 AM, Peter Maydell <peter.maydell@linaro.org> wrote: >> On 26 July 2017 at 06:15, Programmingkid <programmingkidx@gmail.com> wrote: >>>> On Jul 26, 2017, at 12:13 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: >>>> >>>> Hi John, >>>> >>>> On 07/25/2017 07:55 PM, Programmingkid wrote: >>>>> While compiling the mips64el-softmmu target I encountered these errors: >>>>> CC hw/display/g364fb.o >>>>> hw/core/loader-fit.c:105:41: error: expected expression >>>>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>>>> ^ >>>>> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' >>>> >>>> It seems you are missing the libfdt headers, so indeed you found bug. >> >> Configure requires libfdt to exist to enable mips64el-softmmu, >> so something is going wrong with our configure test compared >> to how QEMU itself is being built. >> >>> That appears to help make things move past the loader-fit.c file. Here are the new errors: >>> >>> CC hw/core/loader-fit.o >>> CC hw/dma/rc4030.o >>> CC hw/ide/via.o It looks you ran "make -j3" firing 3 CC tasks. >>> hw/core/loader-fit.c:105:41: error: expected expression >>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>> ^ >> >> ...this is still failing on loader-fit.c in the same way. >> >>>> And also the ./configure output, I'm interested by: >>>> >>>> "fdt support no” >>> >>> Actually it was "fdt support yes”. >> >> Configure thinks the fdt headers are available… > > They appear to be available. The dtc/libfdt folder does have the files QEMU uses. > >> >>> ./configure --target-list=mips64el-softmmu >>> Install prefix /usr/local >>> BIOS directory /usr/local/share/qemu >>> binary directory /usr/local/bin >>> library directory /usr/local/lib >>> module directory /usr/local/lib/qemu >>> libexec directory /usr/local/libexec >>> include directory /usr/local/include >>> config directory /usr/local/etc >>> local state directory /usr/local/var >>> Manual directory /usr/local/share/man >>> ELF interp prefix /usr/gnemul/qemu-%M >>> Source path /Users/john/Documents/Development/Projects/Qemu/qemu-git >>> C compiler cc >>> Host C compiler cc >>> C++ compiler c++ >>> Objective-C compiler clang >>> ARFLAGS rv >>> CFLAGS -O2 -g >>> QEMU_CFLAGS -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -D_REENTRANT -I/usr/local/Cellar/glib/2.46.2/include >> >> ...and it's put our local copy of libfdt on the include path. >> >> The fdt32_t type that the compiler is complaining >> about ought to be defined in the header in >> dtc/libfdt/libfdt_env.h. > > The fdt32_t type is not there. Here is the full libfdt_env.h file: > > #ifndef _LIBFDT_ENV_H > #define _LIBFDT_ENV_H > > #include <stddef.h> > #include <stdint.h> > #include <string.h> > > #define _B(n) ((unsigned long long)((uint8_t *)&x)[n]) > static inline uint32_t fdt32_to_cpu(uint32_t x) > { > return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3); > } > #define cpu_to_fdt32(x) fdt32_to_cpu(x) > > static inline uint64_t fdt64_to_cpu(uint64_t x) > { > return (_B(0) << 56) | (_B(1) << 48) | (_B(2) << 40) | (_B(3) << 32) > | (_B(4) << 24) | (_B(5) << 16) | (_B(6) << 8) | _B(7); > } > #define cpu_to_fdt64(x) fdt64_to_cpu(x) > #undef _B > > #endif /* _LIBFDT_ENV_H */ > > >> I wonder if you have an old copy of that submodule; >> if so then "git submodule update" ought to fix it. > > I’m not sure how to obtain the version of libfdt. I did see a file called version.lds. > At the top of this file is this text: "LIBFDT_1.2 {" > So maybe I am using version 1.2. Perhaps the configure test should declare a variable > of the fdt32_t type in the test code. > > After doing a git submodule update qemu-system-mips64el compiled successfully. Thank you. Oops I wanted to ask your "git submodule status" output before that, to reproduce your bug. Anyway checking out a pre-v1.4.2 is enough. Peter I guess I found the culprit, compile_prog is not called for dtc submodule. I'll send a patch. Regards, Phil. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 16:46 ` Programmingkid 2017-07-26 21:02 ` Philippe Mathieu-Daudé @ 2017-07-26 21:03 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 9+ messages in thread From: Philippe Mathieu-Daudé @ 2017-07-26 21:03 UTC (permalink / raw) To: Programmingkid, Peter Maydell; +Cc: qemu-devel@nongnu.org qemu-devel On 07/26/2017 01:46 PM, Programmingkid wrote: >> On Jul 26, 2017, at 6:24 AM, Peter Maydell <peter.maydell@linaro.org> wrote: >> On 26 July 2017 at 06:15, Programmingkid <programmingkidx@gmail.com> wrote: >>>> On Jul 26, 2017, at 12:13 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: >>>> >>>> Hi John, >>>> >>>> On 07/25/2017 07:55 PM, Programmingkid wrote: >>>>> While compiling the mips64el-softmmu target I encountered these errors: >>>>> CC hw/display/g364fb.o >>>>> hw/core/loader-fit.c:105:41: error: expected expression >>>>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>>>> ^ >>>>> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' >>>> >>>> It seems you are missing the libfdt headers, so indeed you found bug. >> >> Configure requires libfdt to exist to enable mips64el-softmmu, >> so something is going wrong with our configure test compared >> to how QEMU itself is being built. >> >>> That appears to help make things move past the loader-fit.c file. Here are the new errors: >>> >>> CC hw/core/loader-fit.o >>> CC hw/dma/rc4030.o >>> CC hw/ide/via.o It looks you ran "make -j3" firing 3 CC tasks. >>> hw/core/loader-fit.c:105:41: error: expected expression >>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>> ^ >> >> ...this is still failing on loader-fit.c in the same way. >> >>>> And also the ./configure output, I'm interested by: >>>> >>>> "fdt support no” >>> >>> Actually it was "fdt support yes”. >> >> Configure thinks the fdt headers are available… > > They appear to be available. The dtc/libfdt folder does have the files QEMU uses. > >> >>> ./configure --target-list=mips64el-softmmu >>> Install prefix /usr/local >>> BIOS directory /usr/local/share/qemu >>> binary directory /usr/local/bin >>> library directory /usr/local/lib >>> module directory /usr/local/lib/qemu >>> libexec directory /usr/local/libexec >>> include directory /usr/local/include >>> config directory /usr/local/etc >>> local state directory /usr/local/var >>> Manual directory /usr/local/share/man >>> ELF interp prefix /usr/gnemul/qemu-%M >>> Source path /Users/john/Documents/Development/Projects/Qemu/qemu-git >>> C compiler cc >>> Host C compiler cc >>> C++ compiler c++ >>> Objective-C compiler clang >>> ARFLAGS rv >>> CFLAGS -O2 -g >>> QEMU_CFLAGS -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -D_REENTRANT -I/usr/local/Cellar/glib/2.46.2/include >> >> ...and it's put our local copy of libfdt on the include path. >> >> The fdt32_t type that the compiler is complaining >> about ought to be defined in the header in >> dtc/libfdt/libfdt_env.h. > > The fdt32_t type is not there. Here is the full libfdt_env.h file: > > #ifndef _LIBFDT_ENV_H > #define _LIBFDT_ENV_H > > #include <stddef.h> > #include <stdint.h> > #include <string.h> > > #define _B(n) ((unsigned long long)((uint8_t *)&x)[n]) > static inline uint32_t fdt32_to_cpu(uint32_t x) > { > return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3); > } > #define cpu_to_fdt32(x) fdt32_to_cpu(x) > > static inline uint64_t fdt64_to_cpu(uint64_t x) > { > return (_B(0) << 56) | (_B(1) << 48) | (_B(2) << 40) | (_B(3) << 32) > | (_B(4) << 24) | (_B(5) << 16) | (_B(6) << 8) | _B(7); > } > #define cpu_to_fdt64(x) fdt64_to_cpu(x) > #undef _B > > #endif /* _LIBFDT_ENV_H */ > > >> I wonder if you have an old copy of that submodule; >> if so then "git submodule update" ought to fix it. > > I’m not sure how to obtain the version of libfdt. I did see a file called version.lds. > At the top of this file is this text: "LIBFDT_1.2 {" > So maybe I am using version 1.2. Perhaps the configure test should declare a variable > of the fdt32_t type in the test code. > > After doing a git submodule update qemu-system-mips64el compiled successfully. Thank you. Oops I wanted to ask your "git submodule status" output before that, to reproduce your bug. Anyway checking out a pre-v1.4.2 is enough. Peter I guess I found the culprit, compile_prog is not called for dtc submodule. I'll send a patch. Regards, Phil. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 4:13 ` Philippe Mathieu-Daudé 2017-07-26 5:15 ` Programmingkid @ 2017-07-26 10:45 ` Yongbok Kim 2017-07-26 17:24 ` Programmingkid 1 sibling, 1 reply; 9+ messages in thread From: Yongbok Kim @ 2017-07-26 10:45 UTC (permalink / raw) To: Philippe Mathieu-Daudé, Programmingkid, qemu-devel@nongnu.org qemu-devel Cc: James Hogan, Aurelien Jarno On 26/07/2017 05:13, Philippe Mathieu-Daudé wrote: > Hi John, > > On 07/25/2017 07:55 PM, Programmingkid wrote: >> While compiling the mips64el-softmmu target I encountered these errors: >> >> CC hw/display/g364fb.o >> hw/core/loader-fit.c:105:41: error: expected expression >> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >> ^ >> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' > > It seems you are missing the libfdt headers, so indeed you found bug. > > Replacing CONFIG_FITLOADER by CONFIG_FDT in hw/core/Makefile.objs and > default-configs/mips64el-softmmu.mak should fix it, can you try? > >> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >> ^ >> hw/core/loader-fit.c:108:41: error: expected expression >> *addr = fdt64_to_cpu(*(fdt64_t *)prop); >> ^ >> hw/core/loader-fit.c:108:32: error: use of undeclared identifier 'fdt64_t' >> *addr = fdt64_to_cpu(*(fdt64_t *)prop); >> ^ >> hw/core/loader-fit.c:278:19: warning: implicit declaration of function >> 'fdt_first_subnode' is invalid in C99 >> [-Wimplicit-function-declaration] >> off = fdt_first_subnode(itb, configs); >> ^ >> hw/core/loader-fit.c:286:23: warning: implicit declaration of function >> 'fdt_next_subnode' is invalid in C99 >> [-Wimplicit-function-declaration] >> off = fdt_next_subnode(itb, off); >> ^ >> 2 warnings and 4 errors generated. >> make: *** [hw/core/loader-fit.o] Error 1 >> make: *** Waiting for unfinished jobs…. > > It'd be useful if next time you also tell which compiler/version are you > using. > >> Steps to reproduce the error: >> ./configure --target-list=mips64el-softmmu && make > > And also the ./configure output, I'm interested by: > > "fdt support no" > > Regards, > > Phil. Hi, As Philippe pointed, it looks like something with dtc(libfdt). Could you also try to install DTC into your QEMU source base? By default for mips64el-softmmu, if DTC is not compatible you should get this message. ERROR: DTC (libfdt) version >= 1.4.2 not present. Your options: (1) Preferred: Install the DTC (libfdt) devel package (2) Fetch the DTC submodule, using: git submodule update --init dtc Since I am not able to reproduce the problem on my machines, please let us know the detail of your system. $ ../master/configure --target-list=mips64el-softmmu && make -j ... GEN trace/generated-helpers.c CC mips64el-softmmu/trace/control-target.o CC mips64el-softmmu/trace/generated-helpers.o LINK mips64el-softmmu/qemu-system-mips64el Regards, Yongbok ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression 2017-07-26 10:45 ` Yongbok Kim @ 2017-07-26 17:24 ` Programmingkid 0 siblings, 0 replies; 9+ messages in thread From: Programmingkid @ 2017-07-26 17:24 UTC (permalink / raw) To: Yongbok Kim Cc: Philippe Mathieu-Daudé, qemu-devel@nongnu.org qemu-devel, James Hogan, Aurelien Jarno > On Jul 26, 2017, at 6:45 AM, Yongbok Kim <yongbok.kim@imgtec.com> wrote: > > > > On 26/07/2017 05:13, Philippe Mathieu-Daudé wrote: >> Hi John, >> >> On 07/25/2017 07:55 PM, Programmingkid wrote: >>> While compiling the mips64el-softmmu target I encountered these errors: >>> >>> CC hw/display/g364fb.o >>> hw/core/loader-fit.c:105:41: error: expected expression >>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>> ^ >>> hw/core/loader-fit.c:105:32: error: use of undeclared identifier 'fdt32_t' >> >> It seems you are missing the libfdt headers, so indeed you found bug. >> >> Replacing CONFIG_FITLOADER by CONFIG_FDT in hw/core/Makefile.objs and >> default-configs/mips64el-softmmu.mak should fix it, can you try? >> >>> *addr = fdt32_to_cpu(*(fdt32_t *)prop); >>> ^ >>> hw/core/loader-fit.c:108:41: error: expected expression >>> *addr = fdt64_to_cpu(*(fdt64_t *)prop); >>> ^ >>> hw/core/loader-fit.c:108:32: error: use of undeclared identifier 'fdt64_t' >>> *addr = fdt64_to_cpu(*(fdt64_t *)prop); >>> ^ >>> hw/core/loader-fit.c:278:19: warning: implicit declaration of function >>> 'fdt_first_subnode' is invalid in C99 >>> [-Wimplicit-function-declaration] >>> off = fdt_first_subnode(itb, configs); >>> ^ >>> hw/core/loader-fit.c:286:23: warning: implicit declaration of function >>> 'fdt_next_subnode' is invalid in C99 >>> [-Wimplicit-function-declaration] >>> off = fdt_next_subnode(itb, off); >>> ^ >>> 2 warnings and 4 errors generated. >>> make: *** [hw/core/loader-fit.o] Error 1 >>> make: *** Waiting for unfinished jobs…. >> >> It'd be useful if next time you also tell which compiler/version are you >> using. >> >>> Steps to reproduce the error: >>> ./configure --target-list=mips64el-softmmu && make >> >> And also the ./configure output, I'm interested by: >> >> "fdt support no" >> >> Regards, >> >> Phil. > > > > Hi, > > As Philippe pointed, it looks like something with dtc(libfdt). > Could you also try to install DTC into your QEMU source base? > By default for mips64el-softmmu, if DTC is not compatible you should get > this message. > > ERROR: DTC (libfdt) version >= 1.4.2 not present. Your options: > (1) Preferred: Install the DTC (libfdt) devel package > (2) Fetch the DTC submodule, using: > git submodule update --init dtc > > Since I am not able to reproduce the problem on my machines, > please let us know the detail of your system. > > $ ../master/configure --target-list=mips64el-softmmu && make -j > ... > GEN trace/generated-helpers.c > CC mips64el-softmmu/trace/control-target.o > CC mips64el-softmmu/trace/generated-helpers.o > LINK mips64el-softmmu/qemu-system-mips64el > > Regards, > Yongbok My host system is Mac OS 10.12. It looks like I was using an older version of libfdt. Updating fixed the problem. Thank you. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-07-26 21:03 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-07-25 22:55 [Qemu-devel] hw/core/loader-fit.c:105:41: error: expected expression Programmingkid 2017-07-26 4:13 ` Philippe Mathieu-Daudé 2017-07-26 5:15 ` Programmingkid 2017-07-26 10:24 ` Peter Maydell 2017-07-26 16:46 ` Programmingkid 2017-07-26 21:02 ` Philippe Mathieu-Daudé 2017-07-26 21:03 ` Philippe Mathieu-Daudé 2017-07-26 10:45 ` Yongbok Kim 2017-07-26 17:24 ` Programmingkid
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.