Yury Tsybizov
2013-Dec-21 18:25 UTC
unable to build 10.0-RC2/i386 GENERIC kernel with gcc (stop at hyperv module)
Hi! I am trying to update (clean) install of 9.2 to releng/10.0 svn on i386. It did not work with freebsd-update or usual build world/buildkernel/installworld/reboot/ etc procedure - looks like 9.2 gcc world is unable to run ?make installworld" under 10.0 clang kernel. As recommended by UPDATING, I am trying to build it with gcc instead of clang. Everything builds well, but hyperv module has some problems: make -DWITHOUT_CLANG -DWITHOUT_CLANG_IS_CC -DWITH_GCC -DWITH_GNUCXX -DNO_CLEAN MODULES_OVERRIDE=hyperv buildkernel -------------------------------------------------------------->>> Kernel build for GENERIC started on Sat Dec 21 18:59:21 CET 2013-------------------------------------------------------------- ===> GENERIC mkdir -p /usr/obj/usr/src/sys -------------------------------------------------------------->>> stage 1: configuring the kernel-------------------------------------------------------------- cd /usr/src/sys/i386/conf; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin config -d /usr/obj/usr/src/sys/GENERIC /usr/src/sys/i386/conf/GENERIC Kernel build directory is /usr/obj/usr/src/sys/GENERIC Don't forget to do ``make cleandepend && make depend'' -------------------------------------------------------------->>> stage 2.2: rebuilding the object tree-------------------------------------------------------------- cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp _LDSCRIPTROOT= VERSION="FreeBSD 10.0-RC2 i386 1000510" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= RANLIB=ranlib STRINGS= COMPILER_TYPE=gcc /usr/obj/usr/src/make.i386/bmake -D WITHOUT_CLANG -D WITHOUT_CLANG_IS_CC -D WITH_GCC -D WITH_GNUCXX -D NO_CLEAN -m /usr/src/share/mk KERNEL=kernel obj cd /usr/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules KMODDIR=/boot/kernel MACHINE_CPUARCH=i386 MODULES_OVERRIDE="hyperv" DEBUG_FLAGS="-g" MACHINE=i386 KERNBUILDDIR="/usr/obj/usr/src/sys/GENERIC" SYSDIR="/usr/src/sys" WITH_CTF="1" /usr/obj/usr/src/make.i386/bmake obj ===> hyperv (obj) ===> hyperv/vmbus (obj) ===> hyperv/netvsc (obj) ===> hyperv/stordisengage (obj) ===> hyperv/storvsc (obj) ===> hyperv/utilities (obj) -------------------------------------------------------------->>> stage 2.3: build tools-------------------------------------------------------------- cd /usr/obj/usr/src/sys/GENERIC; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin MAKESRCPATH=/usr/src/sys/dev/aic7xxx/aicasm /usr/obj/usr/src/make.i386/bmake SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD -f /usr/src/sys/dev/aic7xxx/aicasm/Makefile Warning: Object directory not changed from original /usr/obj/usr/src/sys/GENERIC cd /usr/src/sys/modules/aic7xxx/aicasm; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules /usr/obj/usr/src/make.i386/bmake SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD obj cd /usr/src/sys/modules/aic7xxx/aicasm; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules /usr/obj/usr/src/make.i386/bmake SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD depend cd /usr/src/sys/modules/aic7xxx/aicasm; PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules /usr/obj/usr/src/make.i386/bmake SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD all -------------------------------------------------------------->>> stage 3.1: making dependencies-------------------------------------------------------------- cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp _LDSCRIPTROOT= VERSION="FreeBSD 10.0-RC2 i386 1000510" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= RANLIB=ranlib STRINGS= COMPILER_TYPE=gcc /usr/obj/usr/src/make.i386/bmake -D WITHOUT_CLANG -D WITHOUT_CLANG_IS_CC -D WITH_GCC -D WITH_GNUCXX -D NO_CLEAN -m /usr/src/share/mk KERNEL=kernel depend -DNO_MODULES_OBJ cd /usr/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules KMODDIR=/boot/kernel MACHINE_CPUARCH=i386 MODULES_OVERRIDE="hyperv" DEBUG_FLAGS="-g" MACHINE=i386 KERNBUILDDIR="/usr/obj/usr/src/sys/GENERIC" SYSDIR="/usr/src/sys" WITH_CTF="1" /usr/obj/usr/src/make.i386/bmake depend ===> hyperv (depend) ===> hyperv/vmbus (depend) ===> hyperv/netvsc (depend) ===> hyperv/stordisengage (depend) ===> hyperv/storvsc (depend) ===> hyperv/utilities (depend) -------------------------------------------------------------->>> stage 3.2: building everything-------------------------------------------------------------- cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp _LDSCRIPTROOT= VERSION="FreeBSD 10.0-RC2 i386 1000510" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP= RANLIB=ranlib STRINGS= COMPILER_TYPE=gcc /usr/obj/usr/src/make.i386/bmake -D WITHOUT_CLANG -D WITHOUT_CLANG_IS_CC -D WITH_GCC -D WITH_GNUCXX -D NO_CLEAN -m /usr/src/share/mk KERNEL=kernel all -DNO_MODULES_OBJ cd /usr/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src/sys/GENERIC/modules KMODDIR=/boot/kernel MACHINE_CPUARCH=i386 MODULES_OVERRIDE="hyperv" DEBUG_FLAGS="-g" MACHINE=i386 KERNBUILDDIR="/usr/obj/usr/src/sys/GENERIC" SYSDIR="/usr/src/sys" WITH_CTF="1" /usr/obj/usr/src/make.i386/bmake all ===> hyperv (all) ===> hyperv/vmbus (all) ===> hyperv/netvsc (all) cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/GENERIC -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c cc1: warnings being treated as errors /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_init_rx_buffer_with_net_vsp': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:182: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_init_send_buffer_with_net_vsp': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:280: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_destroy_rx_buffer': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:334: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_destroy_send_buffer': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:402: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_negotiate_nvsp_protocol': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:464: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_send_ndis_config': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:508: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_connect_to_vsp': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:580: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_on_send': /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:830: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:833: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] *** Error code 1 Stop. bmake[4]: stopped in /usr/src/sys/modules/hyperv/netvsc *** Error code 1 Stop. bmake[3]: stopped in /usr/src/sys/modules/hyperv *** Error code 1 Stop. bmake[2]: stopped in /usr/src/sys/modules *** Error code 1 Stop. bmake[1]: stopped in /usr/obj/usr/src/sys/GENERIC *** Error code 1 Stop. bmake: stopped in /usr/src *** [buildkernel] Error code 1 Stop in /usr/src. I was able to build GENERIC with clang from the same sources. Best, Yuriy.
Dimitry Andric
2013-Dec-21 18:53 UTC
unable to build 10.0-RC2/i386 GENERIC kernel with gcc (stop at hyperv module)
On 21 Dec 2013, at 19:25, Yury Tsybizov <yuriy.tsibizov at gmail.com> wrote:> > I am trying to update (clean) install of 9.2 to releng/10.0 svn on i386. > > It did not work with freebsd-update or usual build world/buildkernel/installworld/reboot/ etc procedureYou are using the incorrect order. The correct order is: * make buildworld * make buildkernel * make installkernel * reboot to single user * make installworld * mergemaster (or etcupdate, whichever you prefer) * reboot> - looks like 9.2 gcc world is unable to run ?make installworld" under 10.0 clang kernel.No, this has nothing to do with clang or gcc. You are attempting to install a 10.0 world while still running a 9.2 kernel, which is unsupported. (That means, it might work if you are lucky, but it is more likely to break.)> As recommended by UPDATING, I am trying to build it with gcc instead of clang. > > Everything builds well, but hyperv module has some problems:...> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/GENERIC -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c > cc1: warnings being treated as errors > /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c: In function 'hv_nv_init_rx_buffer_with_net_vsp': > /usr/src/sys/modules/hyperv/netvsc/../../../dev/hyperv/netvsc/hv_net_vsc.c:182: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]Yes, this is a known problem in the hyperv code. I have tried to get some attention for it, but apparently it is not that important to be able to build 10.0 with gcc anymore... If you do not care about hyperv, just use WERROR= to build your kernel, e.g.: make buildkernel WERROR to disable -Werror. -Dimitry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20131221/8a970f89/attachment-0001.sig>