VM images for 12.0-CURRENT have problem with USB 3.0 flash drives

2018-01-27 Thread David Boyd
Beginning with 12.0-CURRENT VM image:

FreeBSD-12.0-CURRENT-amd64-20180118-r328126.vmdk.xz

and continuing with 12.0-CURRENT VM image:

FreeBSD-12.0-CURRENT-amd64-20180125-r328383.vmdk.xz

when a USB flash drive is present via the attached USB 3.0 controller
the console hangs for 10-12 minutes during boot and then emits the
error messages seen in the attachment.

The UFS filesystem on the USB flash drive cannot be mounted.

If the USB flash drive is connected via the attached USB 2.0
controller, everything is good.

This problem is not manifested in any 10.4-STABLE or 11.1-STABLE VM
images.

The host system is CentOS EL7 7.1708.

VirtualBox version is 5.2.6.

The USB 3.0 controller uses a VIA chipset.

System is for test purposes only, so it is easy to try anything that
might help resolve this problem.


Thanks.

David Boyd 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Kernel build error

2018-01-27 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Hello!
> 
> I am trying to build the kernel with revision 328463.
> 
> It halts with this error:
> 
> /usr/src/sys/cam/scsi/scsi_da.c:1514:9: error: 'CAM_PERIPH_PRINT' macro
> redefined [-Werror,-Wmacro-redefined]
> #define CAM_PERIPH_PRINT(p, msg, args...)
> ??? ^
> /usr/src/sys/cam/cam_periph.h:263:9: note: previous definition is here
> #define CAM_PERIPH_PRINT(p, msg, args...)?? \
> ??? ^
> 1 error generated.
> *** Error code 1
> 
> Stop.
> make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/GENERIC
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /usr/src
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/src
> 
> Regards,
> 
> Per Gunnarsson

Fixed in https://svnweb.freebsd.org/changeset/base/328464


-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Kernel build error rev.328485

2018-01-27 Thread Per Gunnarsson
I am back with new build errors. If I post too frequently, please inform me.

/usr/src/sys/compat/freebsd32/freebsd32_misc.c:122:1: error:
static_assert failed "compile-time assertion failed"
CTASSERT(sizeof(struct kevent32) == 20);
^    ~
/usr/src/sys/sys/systm.h:107:21: note: expanded from macro 'CTASSERT'
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
    ^  ~
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:126:1: error:
static_assert failed "compile-time assertion failed"
CTASSERT(sizeof(struct stat32) == 96);
^    ~~~
/usr/src/sys/sys/systm.h:107:21: note: expanded from macro 'CTASSERT'
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
    ^  ~
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:612:24: error: no member
named 'data' in 'struct kevent32'
    CP(kevp[i], ks32[i], data);
    ~^
/usr/src/sys/compat/freebsd32/freebsd32.h:41:36: note: expanded from
macro 'CP'
#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0)
 ~ ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:644:24: error: no member
named 'data' in 'struct kevent32'
    CP(ks32[i], kevp[i], data);
    ~^
/usr/src/sys/compat/freebsd32/freebsd32.h:41:48: note: expanded from
macro 'CP'
#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0)
 ~ ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1738:42: error:
declaration of 'struct freebsd32_stat_args' will not be visible outside
of this function [-Werror,-Wvisibility]
freebsd32_stat(struct thread *td, struct freebsd32_stat_args *uap)
 ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1744:42: error:
incomplete definition of type 'struct freebsd32_stat_args'
    error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE,
 ~~~^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1738:42: note: forward
declaration of 'struct freebsd32_stat_args'
freebsd32_stat(struct thread *td, struct freebsd32_stat_args *uap)
 ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1749:28: error:
incomplete definition of type 'struct freebsd32_stat_args'
    error = copyout(, uap->ub, sizeof (sb32));
   ~~~^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1738:42: note: forward
declaration of 'struct freebsd32_stat_args'
freebsd32_stat(struct thread *td, struct freebsd32_stat_args *uap)
 ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1738:1: error: no
previous prototype for function 'freebsd32_stat'
[-Werror,-Wmissing-prototypes]
freebsd32_stat(struct thread *td, struct freebsd32_stat_args *uap)
^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1820:43: error:
declaration of 'struct freebsd32_lstat_args' will not be visible outside
of this function [-Werror,-Wvisibility]
freebsd32_lstat(struct thread *td, struct freebsd32_lstat_args *uap)
  ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1826:60: error:
incomplete definition of type 'struct freebsd32_lstat_args'
    error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path,
   ~~~^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1820:43: note: forward
declaration of 'struct freebsd32_lstat_args'
freebsd32_lstat(struct thread *td, struct freebsd32_lstat_args *uap)
  ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1831:28: error:
incomplete definition of type 'struct freebsd32_lstat_args'
    error = copyout(, uap->ub, sizeof (sb32));
   ~~~^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1820:43: note: forward
declaration of 'struct freebsd32_lstat_args'
freebsd32_lstat(struct thread *td, struct freebsd32_lstat_args *uap)
  ^
/usr/src/sys/compat/freebsd32/freebsd32_misc.c:1820:1: error: no
previous prototype for function 'freebsd32_lstat'
[-Werror,-Wmissing-prototypes]
freebsd32_lstat(struct thread *td, struct freebsd32_lstat_args *uap)
^
12 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/GENERIC
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

Regards,

Per Gunnarsson

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Error compiling isboot-kmod

2018-01-27 Thread Ian Lepore
On Fri, 2018-01-26 at 23:20 -0700, John Nielsen wrote:
> > 
> > On Jan 26, 2018, at 9:42 PM, John Nielsen  wrote:
> > 
> > > 
> > > [...]
> > --- iscsi.o ---
> > iscsi.c:1146:3: error: incompatible pointer types passing 'void (struct 
> > mbuf *, void *, void *)' to parameter of type 'm_ext_free_t *' (aka 'void 
> > (*)(struct mbuf *)') [-Werror,-Wincompatible-pointer-types]
> >    MEXTADD(md, (caddr_t)ds_dd, (ISCSI_ALIGN(pp->ds_len)
> >    ^~~~
> > /usr/src/sys/sys/mbuf.h:887:42: note: expanded from macro 'MEXTADD'
> >    m_extadd((m), (char *)(buf), (size), (free), (arg1), (arg2),\
> > ^~
> > /usr/src/sys/sys/mbuf.h:634:59: note: passing argument to parameter here
> > void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t,
> Looks like iscsi.c needs to be fixed up following r324446
> (https://svnweb.freebsd.org/changeset/base/324446). Starting to be
> out of my depth unless there's a mechanical way to make the changes?
> 
> 

I'm not set up to test-compile this against -current right now, so I'm
not sure if this is all that remains or just another breadcrumb on the
trail, but... try the attached patch.

-- Ian
--- iscsi.c.orig	2018-01-27 08:43:26.937858000 -0700
+++ iscsi.c	2018-01-27 09:15:39.631501000 -0700
@@ -1071,17 +1071,23 @@
 }
 
 
-#if __FreeBSD_version >= 110
+#if __FreeBSD_version >= 1200051
+static void
+isboot_free_mbufext(struct mbuf *m)
+{
+	void *p = m->m_ext.ext_arg1;
+#elif __FreeBSD_version >= 110
 static void
 isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
 #elif __FreeBSD_version >= 150 && __FreeBSD_version < 110
 static int
 isboot_free_mbufext(struct mbuf *m, void *p, void *optarg)
+{
 #else
 static void
 isboot_free_mbufext(void *p, void *optarg)
-#endif
 {
+#endif
 
 	ISBOOT_TRACE("isboot_free_mbufext\n");
 	if (p == NULL)
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Kernel build error

2018-01-27 Thread Per Gunnarsson
Hello!

I am trying to build the kernel with revision 328463.

It halts with this error:

/usr/src/sys/cam/scsi/scsi_da.c:1514:9: error: 'CAM_PERIPH_PRINT' macro
redefined [-Werror,-Wmacro-redefined]
#define CAM_PERIPH_PRINT(p, msg, args...)
    ^
/usr/src/sys/cam/cam_periph.h:263:9: note: previous definition is here
#define CAM_PERIPH_PRINT(p, msg, args...)   \
    ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/GENERIC
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

Regards,

Per Gunnarsson

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: pkg OSVERSION problem

2018-01-27 Thread Ronald Klop
On Sat, 27 Jan 2018 08:36:58 +0100, O. Hartmann   
wrote:



Am Thu, 25 Jan 2018 21:38:27 +0100
Jan Kokemüller  schrieb:


On 25.01.2018 21:19, Ronald Klop wrote:
> I know there should be multiple updates of packages.
> Even with -o OSVERSION it does not give any new pkgs anymore.
> What will help this?

I've just had the same issue and solved it by forcefully updating the
package database:

# pkg -o OSVERSION=1200056 update -f
# pkg -o OSVERSION=1200056 upgrade


-Jan
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to  
"freebsd-current-unsubscr...@freebsd.org"


Thanks,

I'll give it a try.

regards,

Oliver



Thanks also. It kicked pkg upgrade into upgrading again, but in the end I  
missed libdl.so (clang 6?) which was fixed by updating my system to  
1200056 anyway. Otherwise Firefox wouldn't start.
So although the OSVERSION check is annoying it does warn for actual  
problems.


Regards,
Ronald.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: PkgBase: Can not upgrade base system

2018-01-27 Thread O. Hartmann
Am Tue, 23 Jan 2018 22:34:15 +
Ben Woods  schrieb:

> On Tue, 23 Jan 2018 at 4:12 pm, O. Hartmann  wrote:
> 
> > For a client I tried PkgBase and followed the procedures recommended (first
> > build the OS from /usr/src/, installworld/kernel, then proceed with pkg
> > update
> > -r FreeBSD-base and pkg install -g 'FreeBSD-*'.
> >
> > This doesn't work for any update I try to apply. Since the target host is
> > a two
> > years old Intel NUC based on some Broadwell snail CPU, building world and
> > kernel is performed on another, much more potent host.
> >
> > In the first place, when performing a "pkg upgrade", the system complains
> > about
> > mismatching OSVERSION, 1200055 forthe running system, and 1200056 for the
> > packages to be updated. When setting env OSVERSION=1200056, pkg (not
> > pkg-static!) complains about revision numbers (the long date trailing the
> > package's name), for instance the newest one is
> >
> > FreeBSD-hast-12.0.s20180123050738.txz
> >
> > contained within the repository to be used for the update, but installed is
> > something older, like FreeBSD-hast-12.0.s20171103114456.txz.
> >
> > When trying pkg-static, I get a crash of pkg-static, segmentation fault is
> > its
> > death-cause.
> >
> > How am I supposed to update a base system via PkgBase?
> >
> > Kind regards,
> >
> > oh
> >
> > p.s. sorry for the lack of data, the box in question is on a remote site
> > without net.
> >
> > ___
> > freebsd-current@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"  
> 
> 
> 
> This issue was discussed on the FreeBSD-current mailing list. A workaround
> has been provided there, but a proper fix is still to be developed:
> 
> https://lists.freebsd.org/pipermail/freebsd-current/2018-January/068153.html
> 
> 
> Workaround:
> 
> # pkg -o OSVERSION=1200056 upgrade
> 
> 
> Regards,
> Ben
> 
> > --  
> 
> --
> From: Benjamin Woods
> woods...@gmail.com

Thanks.

-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).


pgpFvjIA6AwZz.pgp
Description: OpenPGP digital signature


Re: pkg OSVERSION problem

2018-01-27 Thread O. Hartmann
Am Thu, 25 Jan 2018 21:38:27 +0100
Jan Kokemüller  schrieb:

> On 25.01.2018 21:19, Ronald Klop wrote:
> > I know there should be multiple updates of packages.
> > Even with -o OSVERSION it does not give any new pkgs anymore.
> > What will help this?  
> 
> I've just had the same issue and solved it by forcefully updating the
> package database:
> 
> # pkg -o OSVERSION=1200056 update -f
> # pkg -o OSVERSION=1200056 upgrade
> 
> 
> -Jan
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Thanks,

I'll give it a try.

regards,

Oliver

-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).


pgp6G3LmQrM3N.pgp
Description: OpenPGP digital signature


Re: Error compiling isboot-kmod

2018-01-27 Thread John Nielsen
> On Jan 26, 2018, at 9:42 PM, John Nielsen  wrote:
> 
>> On Jan 26, 2018, at 10:35 AM, Ian Lepore  wrote:
>> 
>> On Fri, 2018-01-26 at 10:00 -0700, John Nielsen wrote:
 
 On Jan 26, 2018, at 3:37 AM, Maurizio Vairani  wrote:
 
 2018-01-24 17:19 GMT+01:00 Warner Losh :
 
 
 On Wed, Jan 24, 2018 at 3:12 AM, Maurizio Vairani  wrote:
 On this CURRENT snapshot
 # uname -a
 FreeBSD freebsd12 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r327788: Wed
 Jan 10
 22:55:40 UTC 2018
 r...@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENER
 IC
 amd64
 
 I can't compile the kernel module isboot-kmod:
 
 /usr/src/sys/sys/bus.h:726:10: fatal error: 'device_if.h' file not
 found
 #include "device_if.h"
 ^
 
 I think this was fixed in a newer -current.
 
 Warner 
 Thanks Warner, but I have the same error in :
 # uname -a
 FreeBSD  12.0-CURRENT FreeBSD 12.0-CURRENT #0 r328383: Thu Jan 25
 04:48:52 UTC 2018 r...@releng3.nyi.freebsd.org:/usr/obj/usr/src
 /amd64.amd64/sys/GENERIC  amd64
>>> Whatever change broke it happened around the beginning of July 2017.
>>> I started getting (and ignoring, sadly, due to lack of time and
>>> certainty that anyone cared) messages with this error from pkg-
>>> fallout@ on July 11. I'm looking through the revision history but
>>> nothing stands out to me yet. Maybe someone with better svn-foo will
>>> find it faster. :)
>>> 
 In file included from /usr/src/sys/dev/mmc/bridge.h:59:
 /usr/src/sys/sys/bus.h:726:10: fatal error: 'device_if.h' file not
 found
 #include "device_if.h"
 ^
>> 
>> I've never looked into how kernel modules compile when built as a port,
>> but when built as part of the system kernel build, the SRCS= in the
>> module makefile needs to name all of the dynamically generated header
>> files such as device_if.h (basically anything ending in _if.h used by
>> the module needs to be in SRCS=).
>> 
>> So adding device_if.h to SRCS may be all that's needed.  Or maybe
>> that's incremental and you'll find that several others are needed as
>> well.
> 
> Thanks! Patching the Makefile with:
> SRCS+=  device_if.h bus_if.h
> 
> solves the above issue but now there's something else. Anyone have an idea 
> off the top of their head?
> 
> root@freebsd12:/usr/ports/net/isboot-kmod # make
> ===>  Configuring for isboot-kmod-0.2.13_1
> ===>  Building for isboot-kmod-0.2.13_1
> --- machine ---
> --- x86 ---
> --- objwarn ---
> Warning: Object directory not changed from original 
> /usr/ports/net/isboot-kmod/work/isboot-0.2.13/src
> --- x86 ---
> x86 -> /usr/src/sys/x86/include
> --- machine ---
> machine -> /usr/src/sys/amd64/include
> --- opt_cam.h ---
> --- device_if.h ---
> --- bus_if.h ---
> --- opt_cam.h ---
> :> opt_cam.h
> --- device_if.h ---
> awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h
> --- bus_if.h ---
> awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h
> --- isboot.o ---
> --- ibft.o ---
> --- iscsi.o ---
> --- isboot.o ---
> cc  -O2 -pipe -DNO_MALLOC_EXTRAS -fno-strict-aliasing -DNO_MALLOC_EXTRAS  
> -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I/usr/src/sys -fno-common  
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -MD  
> -MF.depend.isboot.o -MTisboot.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 
> isboot.c -o isboot.o
> --- iscsi.o ---
> cc  -O2 -pipe -DNO_MALLOC_EXTRAS -fno-strict-aliasing -DNO_MALLOC_EXTRAS  
> -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I/usr/src/sys -fno-common  
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -MD  
> -MF.depend.iscsi.o -MTiscsi.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 
>