OPNsense Forum
English Forums => Development and Code Review => Topic started by: miac60 on August 21, 2015, 07:41:20 am
-
Hi,
I'm trying to build opnsense as per the instructions given here.
https://github.com/opnsense/tools
I tried to "make everything" and got this:
.....
>>> Removing packages set
Creating repository in /usr/local/stage/.pkg-new/: 100%
Packing files for repository: 100%
>>> Creating package mirror set for 15.7.8_35-OpenSSL-amd64... done
......
>>> Setting up stage in /usr/local/stage
>>> Setting up world in /usr/local/stage
>>> Setting up kernel in /usr/local/stage
>>> Extracting packages in /usr/local/stage
>>> Installing packages in /usr/local/stage...
pkg: No packages installed. Nothing to do!
Installing pkg-1.5.6...
Extracting pkg-1.5.6: 100%
Message for pkg-1.5.6:
If you are upgrading from the old package format, first run:
# pkg2ng
Usage: pkg add [-IAfqM] <pkg-name> ...
pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...
For more information see 'pkg help add'.
*** Error code 64
Stop.
make: stopped in /usr/tools
How to fix this?
# uname -a
FreeBSD freebsd 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
-
Do you have the plugins.git installed? Are all repositories up-to-date? They go out of sync sometimes as work is being done that spreads across repositories. The current HEADs all work fine.
I have added a debug flag to the tools repository, try this to see what is the broken script line
# make packages DEBUG=1
Or if that doesn't clear up things go deeper:
# make ports DEBUG=1
# make plugins DEBUG=1
# make core DEBUG=1
-
I try
# make packages DEBUG=1
# make ports DEBUG=1
# make plugins DEBUG=1
# make core DEBUG=1
But still have message:
Message for pkg-1.5.6:
If you are upgrading from the old package format, first run:
pkg self upgrade when i do: pkg install git
What pkg version must be for correct build?
-
Did you update tools.git? I just pushed support for DEBUG. I'll also need more context to debug. The package install code is called from a lot of places. :)
-
I try to downgrade pkg version.
And now i got this:
Installing vim-lite-7.4.826: 100%
Installing libevent2-2.0.22_1: 100%
Installing tmux-2.0_1: 100%
the most recent version of git-2.4.6 is already installed
Failed to install the following 1 package(s): ./.pkg/All/git-2.4.6.txz
*** Error code 70
Stop.
make: stopped in /usr/tools
Also i try clean install.
I create VirtualBox VM, install FreeBSD-10.1-RELEASE-amd64 with default setting.
Auto install pkg tool by running pkg command and press Y.
Than follow instrustion:
# pkg install git
# cd /usr
# rm -rf src ports
# git clone https://github.com/opnsense/plugins
# git clone https://github.com/opnsense/ports
# git clone https://github.com/opnsense/tools
# git clone https://github.com/opnsense/core
# git clone https://github.com/opnsense/src
# cd tools
# make everything
And after some time again got old error:
Installing pkg-1.5.6...
Extracting pkg-1.5.6: 100%
Message for pkg-1.5.6:
If you are upgrading from the old package format, first run:
# pkg2ng
Usage: pkg add [-IAfqM] <pkg-name> ...
pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...
For more information see 'pkg help add'.
*** Error code 64
-
Hi there,
I'll still need the extra lines of DEBUG output before the build step fails. That last message is not an error, just a notice so something else fails. :) Are you using ZFS on root?
Cheers,
Franco
-
No I use UFS... Can you reproduce this issue on VM?
-
No, I'm using UFS VMs all the time to do releases.
Is your disk full maybe? Please paste the output of:
# df -h
-
root@freebsd:~ # df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0p2 27G 6.7G 18G 27% /
devfs 1.0K 1.0K 0B 100% /dev
-
Some error when i try make packages DEBUG=1
===> Checking if opnsense-update already installed
===> Registering installation for opnsense-update-15.7.10
Installing opnsense-update-15.7.10...
pkg-static: opnsense-update-15.7.10 conflicts with os-update-15.7.8 (installs files into the same place). Problematic file: /usr/local/man/man8/opnsense-update.8.gz
*** Error code 70
Stop.
make[2]: stopped in /usr/ports/opnsense/opnsense-update
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/opnsense/opnsense-update
+ PORT_ABORT=1
+ trap - 2
+ echo '>>> Creating binary packages...'
>>> Creating binary packages...
+ chroot /usr/local/stage /bin/sh -es
Nothing to do.
................. SKIP .......
+ [ -n 1 ]
+ echo '>>> The ports build did not finish properly :('
>>> The ports build did not finish properly :(
+ exit 1
*** Error code 1
-
# make core DEBUG=1
Extracting openvpn-2.3.8: .......... done
Message for openvpn-2.3.8:
### ------------------------------------------------------------------------
### Edit /etc/rc.conf[.local] to start OpenVPN automatically at system
### startup. See /usr/local/etc/rc.d/openvpn for details.
### ------------------------------------------------------------------------
### Connect to VPN server as a client with this command to include
### the client.up/down scripts in the initialization:
### openvpn-client <spec>.ovpn
### ------------------------------------------------------------------------
### For compatibility notes when interoperating with older OpenVPN
### versions, please, see <http://openvpn.net/relnotes.html>
### ------------------------------------------------------------------------
+ PKGFOUND=''
+ cd /usr/local/stage
+ find ./.pkg/All -name 'opnsense-update-*.txz'
+ pkg -c /usr/local/stage add
Usage: pkg add [-IAfqM] <pkg-name> ...
pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...
For more information see 'pkg help add'.
*** Error code 64
Stop.
make: stopped in /usr/tools
-
Your last issue looks related to the pkgng version, can you try a clean of all packages and an upgrade on your box?
make clean-packages
pkg upgrade -y
And then try a full build using "make everything DEBUG=1"
-
Got this:
===> libexec/rpc.rusersd (all)
===> libexec/rpc.rwalld (all)
===> libexec/rpc.sprayd (all)
===> libexec/rtld-elf (all)
cc -O2 -pipe -Wall -DFREEBSD_ELF -DIN_RTLD -I/usr/src/libexec/rtld-elf/../../lib/csu/common -I/usr/src/libexec/rtld-elf/amd64 -I/usr/src/libexec/rtld-elf -fpic -DPIC 1 -fvisibility=hidden -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -DNDEBUG -std=gnu99 -Qunused-arguments -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wformat=2 -Wno-format-extra-args -Wno-format-nonliteral -c /usr/src/libexec/rtld-elf/amd64/rtld_start.S -o rtld_start.o
cc: error: no such file or directory: '1'
*** [rtld_start.o] Error code 1
make[5]: stopped in /usr/src/libexec/rtld-elf
1 error
make[5]: stopped in /usr/src/libexec/rtld-elf
*** [_sub.all] Error code 2
make[4]: stopped in /usr/src/libexec
1 error
make[4]: stopped in /usr/src/libexec
*** [libexec.all__D] Error code 2
make[3]: stopped in /usr/src
1 error
-
Weird, I can't seem to reproduce this on my machine and the error doesn't ring a bell on my side.
Maybe Franco has any idea when he has the time to look at it, but if you have the opportunity to do a clean FreeBSD install and do a freebsd-update fetch + install that might be a good idea.
-
===> ata/atapci/chipsets/atavia (depend)
--- depend_subdir_dtrace ---
cc -c -O2 -pipe -DDIS_MEM -DSMP -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/intel -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/x86 -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/compat/opensolaris -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64 -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/common -I/usr/src/sys/modules/dtrace/dtrace/../../../../cddl/contrib/opensolaris/common/util -I/usr/src/sys/modules/dtrace/dtrace/../../.. -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/SMP/opt_global.h -I. -I@ -I@/contrib/altq 1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/src/sys/SMP -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -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 -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-unknown-pragmas -Wno-parentheses -Wno-uninitialized -Wno-cast-qual -Wno-unused -include /usr/src/sys/modules/dtrace/dtrace/../../../cddl/compat/opensolaris/sys/debug_compat.h @/amd64/amd64/genassym.c
cc: error: no such file or directory: '1'
*** [genassym.o] Error code 1
make[6]: stopped in /usr/src/sys/modules/dtrace/dtrace
1 error
make[6]: stopped in /usr/src/sys/modules/dtrace/dtrace
--- depend_subdir_drm2 ---
A failure has been detected in another branch of the parallel make
--- depend_subdir_dtrace ---
*** [_sub.depend] Error code 2
make[5]: stopped in /usr/src/sys/modules/dtrace
1 error
make[5]: stopped in /usr/src/sys/modules/dtrace
Full build log:
http://s000.tinyupload.com/index.php?file_id=55666358271737935014
-
Found problem: when I do make everything DEBUG=1
cc: error: no such file or directory: '1'
when I try make everything DEBUG=7
cc: error: no such file or directory: '7'
"DEBUG=1" cause of the error.
Without "DEBUG=1" got error like in first post.
-
Two more fixes went in. I know this must be tedious for you, it definitely is for us too tracing the subtleties of why an environment variable of DEBUG suddenly clobbers the kernel build. :)
Like in the other thread, can you let me know which build type you are looking for, maybe we can minimise the involved steps and see where it goes wrong.
I've yet to add more debugging, but it must wait for after 15.7.12.
-
Thank you.
I try to build iso image for x64 version of opnSense.
I also try to make regress
and this is result:
>>> Installing packages in /usr/local/stage...
+ BASEDIR=/usr/local/stage
+ shift
+ PKGLIST='opnsense pear-PHP_CodeSniffer'
+ pkg -c /usr/local/stage remove -fya
pkg: No packages installed. Nothing to do!
+ [ -z 'opnsense pear-PHP_CodeSniffer' ]
+ PKGFOUND=''
+ cd /usr/local/stage
+ find ./.pkg/All -name 'pkg-*.txz'
+ pkg -c /usr/local/stage info -F ./.pkg/All/pkg-1.5.6.txz
+ grep ^Name
+ awk '{ print $3; }'
+ PKGINFO=pkg
+ [ pkg = pkg ]
+ PKGFOUND=./.pkg/All/pkg-1.5.6.txz
+ pkg -c /usr/local/stage add ./.pkg/All/pkg-1.5.6.txz
Installing pkg-1.5.6...
Extracting pkg-1.5.6: .......... done
Message for pkg-1.5.6:
If you are upgrading from the old package format, first run:
# pkg2ng
+ PKGFOUND=''
+ cd /usr/local/stage
+ find ./.pkg/All -name 'opnsense-*.txz'
+ pkg -c /usr/local/stage info -F ./.pkg/All/opnsense-update-15.7.10.txz
+ grep ^Name
+ awk '{ print $3; }'
+ PKGINFO=opnsense-update
+ [ opnsense = opnsense-update ]
+ pkg -c /usr/local/stage info -F ./.pkg/All/opnsense-devel-15.7_934.txz
+ grep ^Name
+ awk '{ print $3; }'
+ PKGINFO=opnsense-devel
+ [ opnsense = opnsense-devel ]
+ pkg -c /usr/local/stage add
Usage: pkg add [-IAfqM] <pkg-name> ...
pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...
For more information see 'pkg help add'.
*** Error code 64
Stop.
make: stopped in /usr/tools
No package opnsense was found during install
-
Can you try with the latest commit on tools? It's not supposed to look for "opnsense" by default anymore. "opnsense-devel" is there so the ports are ok. :)
-
make everything DEBUG=1
--- genassym.o ---
cc -c -O2 -pipe -DDIS_MEM -DSMP -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/intel -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/x86 -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/compat/opensolaris -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64 -I/usr/src/sys/modules/dtrace/dtrace/../../../cddl/contrib/opensolaris/uts/common -I/usr/src/sys/modules/dtrace/dtrace/../../../../cddl/contrib/opensolaris/common/util -I/usr/src/sys/modules/dtrace/dtrace/../../.. -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/SMP/opt_global.h -I. -I@ -I@/contrib/altq 1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/src/sys/SMP -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -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 -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-unknown-pragmas -Wno-parentheses -Wno-uninitialized -Wno-cast-qual -Wno-unused -include /usr/src/sys/modules/dtrace/dtrace/../../../cddl/compat/opensolaris/sys/debug_compat.h @/amd64/amd64/genassym.c
cc: error: no such file or directory: '1'
*** [genassym.o] Error code 1
make[6]: stopped in /usr/src/sys/modules/dtrace/dtrace
1 error
make[6]: stopped in /usr/src/sys/modules/dtrace/dtrace
*** [_sub.depend] Error code 2
make[5]: stopped in /usr/src/sys/modules/dtrace
1 error
-
Don't use DEBUG=1 anymore, it crashes the FreeBSD kernel build. ;)
-
Without DEBUG=1
USER=root
VENDOR=amd
VGAIMG=/tmp/images/OPNsense-201509141134-OpenSSL-vga-amd64.img
>>> Setting up stage in /usr/local/stage
>>> Setting up world in /usr/local/stage
>>> Setting up kernel in /usr/local/stage
>>> Extracting packages in /usr/local/stage
>>> Installing packages in /usr/local/stage...
pkg: No packages installed. Nothing to do!
Installing pkg-1.5.6...
Extracting pkg-1.5.6: .......... done
Message for pkg-1.5.6:
If you are upgrading from the old package format, first run:
# pkg2ng
Usage: pkg add [-IAfqM] <pkg-name> ...
pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...
For more information see 'pkg help add'.
*** Error code 64
Stop.
make: stopped in /usr/tools
-
make iso DEBUG=1
>>> Installing packages in /usr/local/stage...
+ BASEDIR=/usr/local/stage
+ shift
+ PKGLIST=opnsense
+ pkg -c /usr/local/stage remove -fya
pkg: No packages installed. Nothing to do!
+ [ -z opnsense ]
+ PKGFOUND=''
+ cd /usr/local/stage
+ find ./.pkg/All -name 'pkg-*.txz'
+ pkg -c /usr/local/stage info -F ./.pkg/All/pkg-1.5.6.txz
+ grep ^Name
+ awk '{ print $3; }'
+ PKGINFO=pkg
+ [ pkg = pkg ]
+ PKGFOUND=./.pkg/All/pkg-1.5.6.txz
+ pkg -c /usr/local/stage add ./.pkg/All/pkg-1.5.6.txz
Installing pkg-1.5.6...
Extracting pkg-1.5.6: 100%
Message for pkg-1.5.6:
If you are upgrading from the old package format, first run:
# pkg2ng
+ PKGFOUND=''
+ cd /usr/local/stage
+ find ./.pkg/All -name 'opnsense-*.txz'
+ pkg -c /usr/local/stage info -F ./.pkg/All/opnsense-update-15.7.10.txz
+ grep ^Name
+ awk '{ print $3; }'
+ PKGINFO=opnsense-update
+ [ opnsense = opnsense-update ]
+ pkg -c /usr/local/stage info -F ./.pkg/All/opnsense-devel-15.7_934.txz
+ grep ^Name
+ awk '{ print $3; }'
+ PKGINFO=opnsense-devel
+ [ opnsense = opnsense-devel ]
+ pkg -c /usr/local/stage add
Usage: pkg add [-IAfqM] <pkg-name> ...
pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...
For more information see 'pkg help add'.
*** Error code 64
Stop.
make: stopped in /usr/tools
-------
Should there be a package of "opnsense"?
-
I try to change /usr/tools/build/iso.sh
setup_packages ${STAGEDIR} opnsense
to
setup_packages ${STAGEDIR} opnsense-devel
Than I do: make iso
And iso succesfuly created in /tmp/images/ dir
-
I fixed this particular issue 5 days ago: https://github.com/opnsense/tools/commit/e093cc884c0c35b6b9d7060dc288b2fbc6bfdca9
Please update your tools.git :)