From owner-freebsd-current@freebsd.org Sun Apr 8 19:00:55 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 017DEF99FC5 for ; Sun, 8 Apr 2018 19:00:55 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 825CF7FD7B for ; Sun, 8 Apr 2018 19:00:54 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w38J0qxK014768 for ; Sun, 8 Apr 2018 12:00:52 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w38J0q23014767 for freebsd-current@freebsd.org; Sun, 8 Apr 2018 12:00:52 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201804081900.w38J0q23014767@pdx.rh.CN85.dnsmgr.net> Subject: Module compiles looking in /usr/src when alternate src tree is in use To: freebsd-current@freebsd.org Date: Sun, 8 Apr 2018 12:00:52 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Apr 2018 19:00:55 -0000 I am having a compile time issue for a patched that compiled fine on my r329294 system, but now failes to compile with what looks like a wrong header being included. I have wrapped the long line so I can point to a difference between r329294 and r332262 make log of this file. r329294 make output: cc -O2 -pipe -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL \ -DKLD_MODULE -nostdinc -I/usr/src-topo/sys/amd64/vmm \ -I/usr/src-topo/sys/amd64/vmm/io -I/usr/src-topo/sys/amd64/vmm/intel \ -I/usr/src-topo/sys/amd64/vmm/amd -I. -I/usr/src-topo/sys -fno-common \ ^^^^^^^^^^^^^^^^^ this is what I would expect -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD \ -MF .depend.vmm.o -MTvmm.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse \ -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv \ -fstack-protector -Wall -Wredundant-decls -Wnested-externs \ -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ \ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas \ -Wno-error-tautological-compare -Wno-error-empty-body \ -Wno-error-parentheses-equality -Wno-error-unused-function \ -Wno-error-pointer-sign -Wno-error-shift-negative-value \ -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -c /usr/src-topo/sys/amd64/vmm/vmm.c -o vmm.o No error, and I get my vmm.ko! r332262 make output: cc -O2 -pipe -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL \ -DKLD_MODULE -nostdinc -I/usr/src-topo/sys/amd64/vmm \ -I/usr/src-topo/sys/amd64/vmm/io -I/usr/src-topo/sys/amd64/vmm/intel \ -I/usr/src-topo/sys/amd64/vmm/amd -I. -I/usr/src/sys -fno-common \ ^^^^^^^^^^^^ why HERE? -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD \ -MF.depend.vmm.o -MTvmm.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse \ -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv \ -fstack-protector -Wall -Wredundant-decls -Wnested-externs \ -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ \ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas \ -Wno-error-tautological-compare -Wno-error-empty-body \ -Wno-error-parentheses-equality -Wno-error-unused-function \ -Wno-error-pointer-sign -Wno-error-shift-negative-value \ -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 \ -c /usr/src-topo/sys/amd64/vmm/vmm.c -o vmm.o /usr/src-topo/sys/amd64/vmm/vmm.c:476:1: error: no previous prototype for function 'vm_get_topology' [-Werror,-Wmissing-prototypes] vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores, ^ /usr/src-topo/sys/amd64/vmm/vmm.c:486:1: error: no previous prototype for function 'vm_set_topology' [-Werror,-Wmissing-prototypes] vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores, ^ 2 errors generated. *** Error code 1 Stop. make: stopped in /usr/src-topo/sys/modules/vmm UGLY GROSS HACK TO FIX: cp /usr/src-topo/amd64/include/vmm.h /usr/src/sys/amd64/include/vmm.h Regards, -- Rod Grimes rgrimes@freebsd.org