OPNsense Forum

English Forums => Development and Code Review => Topic started by: Mastah on October 21, 2018, 08:06:20 pm

Title: Error while compiling htop on 18.7.5_1-amd64
Post by: Mastah on October 21, 2018, 08:06:20 pm
I've tryed to compile htop on 18.7.5_1-amd64, but it result in error.

I had already compiled htop on a previous version but since a new freesh reinstall (hdd erase), I can't compile anymore htop.
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: franco on October 21, 2018, 08:16:27 pm
I'm sorry to hear you are running into the not otherwise specified error.


Cheers,
Franco
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: Mastah on October 21, 2018, 08:22:17 pm
Code: [Select]
===>  Building for lsof-4.92.b,8
--- version.h ---
--- lib/liblsof.a ---
--- dmnt.o ---
--- dnode.o ---
--- dnode1.o ---
--- dnode2.o ---
--- version.h ---
Constructing version.h
--- lib/liblsof.a ---
(cd lib; /usr/bin/make DEBUG="-O2" CFGF="-pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"11.1-RELEASE-p14\"")
--- dmnt.o ---
cc  -pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"11.1-RELEASE-p14\" -I/usr/src/sys -O2 -c dmnt.c -o dmnt.o
--- dnode.o ---
cc  -pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"11.1-RELEASE-p14\" -I/usr/src/sys -O2 -c dnode.c -o dnode.o
--- dnode1.o ---
cc  -pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"11.1-RELEASE-p14\" -I/usr/src/sys -O2 -c dnode1.c -o dnode1.o
--- dproc.o ---
cc  -pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"11.1-RELEASE-p14\" -I/usr/src/sys -O2 -c dproc.c -o dproc.o
--- dnode2.o ---
--- dnode2.o ---
--- lib/liblsof.a ---
--- ckkv.o ---
--- dnode2.o ---
cc -pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DFREEBSDV=11000 -DHAS_ZFS -DHAS_CV_TIMEDWAIT_SBT -DHAS_V_LOCKF -D_SOLARIS_C_SOURCE -O2 -I/usr/src/sys/cddl/compat/opensolaris -I/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/usr/src/sys/cddl/contrib/opensolaris/uts/common/zmod -I/usr/src/sys/cddl/contrib/opensolaris/uts/common -I/usr/src/sys/cddl/contrib/opensolaris/common/zfs -I/usr/src/sys/cddl/contrib/opensolaris/common -I/usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd/usr/src/include -I`pwd` -c dnode2.c -o dnode2.o
--- lib/liblsof.a ---
cc  -pipe -fPIE -fPIC -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=11000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR="11.1-RELEASE-p14" -I/usr/src/sys -O2 -c ckkv.c -o ckkv.o
--- dnode.o ---
In file included from dnode.c:39:
--- dmnt.o ---
In file included from dmnt.c:39:
In file included from ./lsof.h:221:
In file included from ./dlsof.h:106:
In file included from /usr/src/sys/sys/conf.h:44:
/usr/src/sys/sys/eventhandler.h:324:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_attach_fn)(void *, device_t);
                                         ^
/usr/src/sys/sys/eventhandler.h:325:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_detach_fn)(void *, device_t, enum evhdev_detach);
                                         ^
--- dnode.o ---
In file included from ./lsof.h:221:
In file included from ./dlsof.h:106:
In file included from /usr/src/sys/sys/conf.h:44:
/usr/src/sys/sys/eventhandler.h:324:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_attach_fn)(void *, device_t);
                                         ^
/usr/src/sys/sys/eventhandler.h:325:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_detach_fn)(void *, device_t, enum evhdev_detach);
                                         ^
--- dnode1.o ---
In file included from dnode1.c:42:
In file included from ./lsof.h:221:
In file included from ./dlsof.h:106:
In file included from /usr/src/sys/sys/conf.h:44:
/usr/src/sys/sys/eventhandler.h:324:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_attach_fn)(void *, device_t);
                                         ^
/usr/src/sys/sys/eventhandler.h:325:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_detach_fn)(void *, device_t, enum evhdev_detach);
                                         ^
--- dproc.o ---
In file included from dproc.c:38:
In file included from ./lsof.h:221:
In file included from ./dlsof.h:106:
In file included from /usr/src/sys/sys/conf.h:44:
/usr/src/sys/sys/eventhandler.h:324:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_attach_fn)(void *, device_t);
                                         ^
/usr/src/sys/sys/eventhandler.h:325:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_detach_fn)(void *, device_t, enum evhdev_detach);
                                         ^
--- dnode.o ---
In file included from dnode.c:39:
--- lib/liblsof.a ---
In file included from ckkv.c:43:
In file included from ./../lsof.h:221:
In file included from ./../dlsof.h:106:
In file included from /usr/src/sys/sys/conf.h:44:
/usr/src/sys/sys/eventhandler.h:324:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_attach_fn)(void *, device_t);
                                         ^
/usr/src/sys/sys/eventhandler.h:325:42: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef void (*device_detach_fn)(void *, device_t, enum evhdev_detach);
                                         ^
--- dmnt.o ---
In file included from dmnt.c:39:
In file included from ./lsof.h:221:
In file included from ./dlsof.h:276:
/usr/src/sys/sys/proc.h:350:22: error: field has incomplete type 'struct syscall_args'
        struct syscall_args td_sa;      /* (kx) Syscall parameters. Copied on
                            ^
/usr/src/sys/sys/proc.h:180:8: note: forward declaration of 'struct syscall_args'
struct syscall_args;
       ^
--- dnode.o ---
In file included from ./lsof.h:221:
In file included from ./dlsof.h:276:
/usr/src/sys/sys/proc.h:350:22: error: field has incomplete type 'struct syscall_args'
        struct syscall_args td_sa;      /* (kx) Syscall parameters. Copied on
                            ^
/usr/src/sys/sys/proc.h:180:8: note: forward declaration of 'struct syscall_args'
struct syscall_args;
       ^
--- dnode1.o ---
In file included from dnode1.c:42:
In file included from ./lsof.h:221:
In file included from ./dlsof.h:276:
/usr/src/sys/sys/proc.h:350:22: error: field has incomplete type 'struct syscall_args'
        struct syscall_args td_sa;      /* (kx) Syscall parameters. Copied on
                            ^
/usr/src/sys/sys/proc.h:180:8: note: forward declaration of 'struct syscall_args'
struct syscall_args;
       ^
--- dproc.o ---
In file included from dproc.c:38:
In file included from ./lsof.h:221:
In file included from ./dlsof.h:276:
/usr/src/sys/sys/proc.h:350:22: error: field has incomplete type 'struct syscall_args'
        struct syscall_args td_sa;      /* (kx) Syscall parameters. Copied on
                            ^
/usr/src/sys/sys/proc.h:180:8: note: forward declaration of 'struct syscall_args'
struct syscall_args;
       ^
--- dnode2.o ---
In file included from dnode2.c:56:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h:33:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:47:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:54:
/usr/src/sys/cddl/compat/opensolaris/sys/kcondvar.h:67:36: warning: implicit declaration of function 'nstosbt' is invalid in C99 [-Wimplicit-function-declaration]
        return (cv_timedwait_sbt(cvp, mp, nstosbt(tim), nstosbt(res), 0));
                                          ^
--- dnode1.o ---
2 warnings and 1 error generated.
*** [dnode1.o] Error code 1

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
--- dmnt.o ---
2 warnings and 1 error generated.
*** [dmnt.o] Error code 1

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
--- dnode.o ---
2 warnings and 1 error generated.
*** [dnode.o] Error code 1

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
--- lib/liblsof.a ---
In file included from ckkv.c:43:
In file included from ./../lsof.h:221:
In file included from ./../dlsof.h:276:
/usr/src/sys/sys/proc.h:350:22: error: field has incomplete type 'struct syscall_args'
        struct syscall_args td_sa;      /* (kx) Syscall parameters. Copied on
                            ^
/usr/src/sys/sys/proc.h:180:8: note: forward declaration of 'struct syscall_args'
struct syscall_args;
       ^
--- dproc.o ---
2 warnings and 1 error generated.
*** [dproc.o] Error code 1

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
--- dnode2.o ---
In file included from dnode2.c:56:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h:33:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:47:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:73:
In file included from /usr/src/sys/cddl/compat/opensolaris/sys/vfs.h:37:
/usr/src/sys/cddl/compat/opensolaris/sys/vnode.h:243:10: warning: implicit declaration of function 'VOP_FSYNC' is invalid in C99 [-Wimplicit-function-declaration]
        error = VOP_FSYNC(vp, MNT_WAIT, curthread);
                ^
--- lib/liblsof.a ---
2 warnings and 1 error generated.
*** [ckkv.o] Error code 1

make[3]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd/lib
1 error

make[3]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd/lib
*** [lib/liblsof.a] Error code 2

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
--- dnode2.o ---
2 warnings generated.
A failure has been detected in another branch of the parallel make

make[3]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
*** [dnode2.o] Error code 2

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
6 errors

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/lsof
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/htop
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: franco on October 21, 2018, 08:24:21 pm
This is breakage relating to lsof, a dependency of htop.

It could be breakage related to 11.1 being "end of life" now in FreeBSD.

Are you using our ports tree?


Cheers,
Franco
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: Mastah on October 21, 2018, 08:25:29 pm
Are you using our ports tree?

Can you be more specific, I dont really understand the "Are you using our ports tree?" ^^

I just did "opnsense-code tools ports src" to checkout the sources and try compiling.
So I would guest, yes probably using ports.
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: franco on October 21, 2018, 08:28:16 pm
That actually answers my question :)

Try this:

# cd /usr/ports && git checkout --hard 18.7

And build htop again. If it's not working it's probably an issue on FreeBSD 11.1 so we'd have to look more closely in that direction.


Cheers,
Franco
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: Mastah on October 21, 2018, 09:27:07 pm
Code: [Select]
root@******:/usr/ports # git status
HEAD detached at 18.7
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        distfiles/

nothing added to commit but untracked files present (use "git add" to track)

Code: [Select]
--- dnode2.o ---
In file included from dnode2.c:56:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h:33:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:47:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:73:
In file included from /usr/src/sys/cddl/compat/opensolaris/sys/vfs.h:37:
/usr/src/sys/cddl/compat/opensolaris/sys/vnode.h:243:10: warning: implicit declaration of function 'VOP_FSYNC' is invalid in C99 [-Wimplicit-function-declaration]
        error = VOP_FSYNC(vp, MNT_WAIT, curthread);
                ^
--- lib/liblsof.a ---
2 warnings and 1 error generated.
*** [ckkv.o] Error code 1

make[3]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd/lib
1 error

make[3]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd/lib
*** [lib/liblsof.a] Error code 2

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
--- dnode2.o ---
2 warnings generated.
A failure has been detected in another branch of the parallel make

make[3]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
*** [dnode2.o] Error code 2

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
6 errors

make[2]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.92B.freebsd
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/lsof
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/htop

I do remember that the first try (compilation) I did, i had some error on lsof trying to download something but with a timeout.
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: franco on October 22, 2018, 11:59:40 am
Sorry, I know what the issue is...

# opnsense-update ports
# cd /usr/src
# git checkout stable/18.7

After that it should work. :)

Our src master branch changed to HardenedBSD 11.2 but 18.7 is FreeBSD 11.1.


Cheers,
Franco
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: Mastah on October 22, 2018, 09:30:56 pm
Code: [Select]
===>  Installing for htop-2.2.0
===>  Checking if htop already installed
===>   Registering installation for htop-2.2.0
Installing htop-2.2.0...

Cheers, thanks for the help !
Title: Re: Error while compiling htop on 18.7.5_1-amd64
Post by: franco on October 23, 2018, 05:47:31 pm
Yay, great.  8)