Created attachment 158608 [details] Patch to update the arm code The attached patch updates the arm code to match arm64, powerpc, and x86. With this I can build www/w3m, which is broken with the message: GC Warning: Out of memory - trying to allocate less Insufficient memory for GC_all_nils
I expect mips will need a similar change, but I don't have hardware or a VM setup to test.
(In reply to Andrew Turner from comment #1) This was our initial attempt at getting mips support. From looking at the diff for ARM, it looks like we were insufficient? https://svnweb.freebsd.org/ports?view=revision&revision=374308
Next week I will test@work via poudriere and commit this code into the mainline.
Created attachment 158743 [details] boehm-gc build log on 11armv6232 It passed all tests :)
(In reply to Sean Bruno from comment #2) We can open a new PR for MIPS support.
Created attachment 158795 [details] add support for arm and mips This patch updates the arm and mips code
Created attachment 158796 [details] boehm-gc build log on 11mips32
Does www/w3m build with this patch? It has been what finds issues in this port on other architectures.
(In reply to Andrew Turner from comment #8) I hope so :) I will attach poudriere build logs when done.
Created attachment 158933 [details] w3m build log on 11mips32 It works fine as expected.
(In reply to Carlos Jacobo Puga Medina from comment #10) Do you need a committer to push this into the tree?
(In reply to Sean Bruno from comment #11) Yes. The patch is ready to be committed.
Report upstream: https://github.com/ivmai/bdwgc/issues/76
I did some tests of www/w3m to verify the original problem and I still get the same errors as before. I'm only using the patch you attached to the bug. Am I missing something? # svn stat /usr/local/poudriere/ports/default/ M /usr/local/poudriere/ports/default/devel/boehm-gc/Makefile M /usr/local/poudriere/ports/default/devel/boehm-gc/files/patch-doc_gc.man M /usr/local/poudriere/ports/default/devel/boehm-gc/files/patch-include_private_gc__priv.h M /usr/local/poudriere/ports/default/devel/boehm-gc/files/patch-include_private_gcconfig.h M /usr/local/poudriere/ports/default/devel/boehm-gc/files/patch-os__dep.c
(In reply to Sean Bruno from comment #14) Sean, It builds fine for me. Can you show the errors?
(In reply to Carlos Jacobo Puga Medina from comment #15) Yeah, its the same as before. I'm not sure what I'm doing wrong here. http://tasty.ysv.freebsd.org/build.html?mastername=11mips-default&build=2015-07-20_01h54m57s
(In reply to Sean Bruno from comment #16) Add CFLAGS= -DNO_INCREMENTAL to boehm-gc/Makefile Rebuild boehm-gc port and try again.
(In reply to Carlos Jacobo Puga Medina from comment #17) no, don't see any change here. I've done a clean poudriere run "poudriere bulk -c -j 11mips www/w3m" http://tasty.ysv.freebsd.org/build.html?mastername=11mips-default&build=2015-07-20_01h54m57s
(In reply to Sean Bruno from comment #18) Hmmm... you didn't add -DNO_INCREMENTAL flag as you can see. -MAKE_ENV-- XDG_DATA_HOME=/wrkdirs/usr/ports/devel/boehm-gc/work XDG_CONFIG_HOME=/wrkdirs/usr/ports/devel/boehm-gc/work HOME=/wrkdirs/usr/ports/devel/boehm-gc/work TMPDIR="/tmp" NO_PIE=yes SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local LIBDIR="/usr/lib" CC="/nxb-bin/usr/bin/cc" CFLAGS="-O2 -pipe -G0 -fno-strict-aliasing" CPP="/nxb-bin/usr/bin/cpp" CPPFLAGS="" LDFLAGS="" LIBS="" CXX="/nxb-bin/usr/bin/c++" CXXFLAGS="-O2 -pipe -G0 -fno-strict-aliasing " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 444" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" --End MAKE_ENV--
(In reply to Carlos Jacobo Puga Medina from comment #19) http://tasty.ysv.freebsd.org/build.html?mastername=11mips-default&build=2015-07-20_23h41m48s This still looks broken, even with the -DNO_INCREMENTAL flag.
(In reply to Sean Bruno from comment #20) Run into devel/boehm-gc # make test Does it pass all tests?
Looks like a qemu regression as it builds fine on real hw but not with poudriere/qemu-arm-static. I'm also seeing that in Carlos' log: Host OSVERSION: 1001000 Jail OSVERSION: 1100077 build log on real hw: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/w3m-0.5.3_4.log strace log: http://mikael.urankar.free.fr/FreeBSD/arm/build_logs/w3m_mktable_qemu.log
(In reply to mikael.urankar from comment #22) Mikael, Did you have any problem to build graphics/cairo and print/harfbuzz ports on MIPS? I had some problems related to atomic operations support. See bugs 201683 and 201618.
(In reply to Carlos Jacobo Puga Medina from comment #23) Sorry, The bugs are 201683 and 201681.
(In reply to Sean Bruno from comment #20) I don't know how to interpret that but the build failure happens with src@283998 https://svnweb.freebsd.org/base?view=revision&revision=283998
(In reply to mikael.urankar from comment #25) Hrm ... w3m used to build under emulation too. http://chips.ysv.freebsd.org/data/11armv6-default/2015-05-30_20h01m28s/logs/w3m-0.5.3_4.log I think a syscall structure has changed ... let me see if I can bisect a change.
(In reply to Sean Bruno from comment #26) ok, confirmed that I can build with a head jail + latest qemu-user-static when the host revision is at: [11mips-default] [1/1] Deinstalling w3m-0.5.3_4... [11mips-default] [1/1] Deleting files for w3m-0.5.3_4: .......... done =========================================================================== ====>> Checking for extra files and directories =======================<phase: Interactive >============================ [00:11:07] ====>> Installing packages [00:11:07] ====>> Installing run-depends for www/w3m ===> w3m-0.5.3_4 depends on file: /usr/local/bin/perl5.20.2 - found [00:11:08] ====>> Installing www/w3m [11mips-default] Installing w3m-0.5.3_4... [11mips-default] Extracting w3m-0.5.3_4: 100% [00:11:09] ====>> Installing local Pkg repository to /usr/local/etc/pkg/repos [00:11:09] ====>> Leaving jail 11mips-default-n running, mounted at /usr/local/poudriere/data/.m/11mips-default/ref for interactive run testing [00:11:09] ====>> To enter jail: jexec 11mips-default-n env -i TERM=$TERM /usr/bin/login -fp root [00:11:09] ====>> To stop jail: poudriere jail -k -j 11mips root@tasty.ysv:/home/sbruno # uname -a FreeBSD tasty.ysv.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r282703: Sun May 10 08:39:18 UTC 2015 peter@build-11.freebsd.org:/usr/obj/usr/src/sys/CLUSTER11 amd64
same jail, same qemu, host system upgraded a bit and it fails. sort funcname.tab | /usr/bin/awk -f ./functable.awk > functable.tab ./mktable 100 functable.tab > functable.c GC Warning: Out of memory - trying to allocate less Insufficient memory for GC_all_nils *** Error code 1 Stop. make[1]: stopped in /wrkdirs/usr/ports/www/w3m/work/w3m-0.5.3 *** Error code 1 Stop. make: stopped in /usr/ports/www/w3m =======================<phase: Interactive >============================ [00:08:09] ====>> Installing packages [00:08:09] ====>> Installing run-depends for www/w3m ===> w3m-0.5.3_4 depends on file: /usr/local/bin/perl5.20.2 - found [00:08:09] ====>> Installing www/w3m pkg-static: /tmp/pkgs/w3m-0.5.3_4.txz: No such file or directory pkg-static: Was 'pkg install /tmp/pkgs/w3m-0.5.3_4.txz' meant? Failed to install the following 1 package(s): /tmp/pkgs/w3m-0.5.3_4.txz *** Error code 70 Stop. make: stopped in /usr/ports/www/w3m [00:08:10] ====>> Warning: Failed to install www/w3m [00:08:10] ====>> Installing local Pkg repository to /usr/local/etc/pkg/repos [00:08:10] ====>> Leaving jail 11mips-default-n running, mounted at /usr/local/poudriere/data/.m/11mips-default/ref for interactive run testing [00:08:10] ====>> To enter jail: jexec 11mips-default-n env -i TERM=$TERM /usr/bin/login -fp root [00:08:10] ====>> To stop jail: poudriere jail -k -j 11mips root@tasty.ysv:/home/sbruno # uname -a FreeBSD tasty.ysv.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284533: Thu Jun 18 01:25:08 UTC 2015 peter@build-11.freebsd.org:/usr/obj/usr/src/sys/CLUSTER11 amd64
fails here, bisecting again. /nxb-bin/usr/bin/cc -I. -I. -O2 -pipe -G0 -fno-strict-aliasing -I./libwc -I/usr/include/openssl -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/local/libexec/w3m\" -DCGIBIN_DIR=\"/usr/local/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/usr/local/share/w3m\" -DETC_DIR=\"/usr/local/etc\" -DCONF_DIR=\"/usr/local/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/local/share/locale\" -o mktable mktable.o dummy.o Str.o hash.o myctype.o -L/usr/local/lib -lm -L/usr/local/lib -lgc sort funcname.tab | /usr/bin/awk -f ./functable.awk > functable.tab ./mktable 100 functable.tab > functable.c GC Warning: Out of memory - trying to allocate less Insufficient memory for GC_all_nils *** Error code 1 Stop. make[1]: stopped in /wrkdirs/usr/ports/www/w3m/work/w3m-0.5.3 *** Error code 1 Stop. make: stopped in /usr/ports/www/w3m =======================<phase: Interactive >============================ [00:08:06] ====>> Installing packages [00:08:06] ====>> Installing run-depends for www/w3m ===> w3m-0.5.3_4 depends on file: /usr/local/bin/perl5.20.2 - found [00:08:07] ====>> Installing www/w3m pkg-static: /tmp/pkgs/w3m-0.5.3_4.txz: No such file or directory pkg-static: Was 'pkg install /tmp/pkgs/w3m-0.5.3_4.txz' meant? Failed to install the following 1 package(s): /tmp/pkgs/w3m-0.5.3_4.txz *** Error code 70 Stop. make: stopped in /usr/ports/www/w3m [00:08:07] ====>> Warning: Failed to install www/w3m [00:08:07] ====>> Installing local Pkg repository to /usr/local/etc/pkg/repos [00:08:07] ====>> Leaving jail 11mips-default-n running, mounted at /usr/local/poudriere/data/.m/11mips-default/ref for interactive run testing [00:08:07] ====>> To enter jail: jexec 11mips-default-n env -i TERM=$TERM /usr/bin/login -fp root [00:08:07] ====>> To stop jail: poudriere jail -k -j 11mips root@tasty.ysv:/home/sbruno # /etc root@tasty.ysv:/home/sbruno # uname -a FreeBSD tasty.ysv.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284045: Fri Jun 5 22:44:49 UTC 2015 peter@build-11.freebsd.org:/usr/obj/usr/src/sys/CLUSTER11 amd64
and ... works here. I need to build kernels now as all my prebuilt cluster images are now exhausted. Will bisect revisions 283584 <-> 284045 =======================<phase: deinstall >============================ ===> Deinstalling for w3m ===> Deinstalling w3m-0.5.3_4 Updating database digests format: .... done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: w3m-0.5.3_4 The operation will free 2 MiB. [11mips-default] [1/1] Deinstalling w3m-0.5.3_4... [11mips-default] [1/1] Deleting files for w3m-0.5.3_4: .......... done =========================================================================== ====>> Checking for extra files and directories =======================<phase: Interactive >============================ [00:11:07] ====>> Installing packages [00:11:07] ====>> Installing run-depends for www/w3m ===> w3m-0.5.3_4 depends on file: /usr/local/bin/perl5.20.2 - found [00:11:07] ====>> Installing www/w3m [11mips-default] Installing w3m-0.5.3_4... [11mips-default] Extracting w3m-0.5.3_4: 100% [00:11:09] ====>> Installing local Pkg repository to /usr/local/etc/pkg/repos [00:11:09] ====>> Leaving jail 11mips-default-n running, mounted at /usr/local/poudriere/data/.m/11mips-default/ref for interactive run testing [00:11:09] ====>> To enter jail: jexec 11mips-default-n env -i TERM=$TERM /usr/bin/login -fp root [00:11:09] ====>> To stop jail: poudriere jail -k -j 11mips root@tasty.ysv:/home/sbruno # uname -a FreeBSD tasty.ysv.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r283584: Tue May 26 23:18:46 UTC 2015 peter@build-11.freebsd.org:/usr/obj/usr/src/sys/CLUSTER11 amd64
Sorry Sean if I wasn't clear enough in my previous comment (#25), I've done the bissecting work and r283998 is the culprit.
In my case, w3m port builds fine only if I add -DNO_INCREMENTAL flag to boehm-gc/Makefile. This little tweak is also needed for aarch64 and armv6. Tested on armv6, aarch64 and mips32.
Created attachment 159604 [details] boehm-gc add support for armv6 and mips - Added -DNO_INCREMENTAL flag for aarch64, armv6 and mips
Carlos: Currently, devel/boehm-gc builds on mips/armv6 just fine. Should I close this out or is there something further that you'd like done. http://beefy7.nyi.freebsd.org/build.html?mastername=head-mips-default&build=p400328_s290048 http://beefy8.nyi.freebsd.org/build.html?mastername=head-armv6-default&build=p400328_s290048
(In reply to Sean Bruno from comment #34) Hi Sean, I think that we can close this PR. Thanks for your help.
Over to sbruno to resolve as necessary
We resolved this in the qemu-sbruno/qemu-user-static port.