On 01/12 08:13, George Koehler wrote:
> On Fri, 11 Jan 2019 19:38:31 +0100
> Jeremie Courreges-Anglas <[email protected]> wrote:
>
> > make test on sparc64:
> >
> > Finished tests in 7349.921578s, 2.7481 tests/s, 310.4749 assertions/s.
> > 20198 tests, 2281966 assertions, 65 failures, 18 errors, 113 skips
> >
> > Lots of errors due to missing symbol '__guard_local' in the JIT tests.
> > Thoughts?
>
> On my powerpc:
>
> Finished tests in 6145.605596s, 3.2864 tests/s, 371.8192 assertions/s.
>
> 20197 tests, 2285054 assertions, 64 failures, 16 errors, 112 skips
>
>
> I built the port with the patch-random_c and MESSAGE-main changes and
> JCA's patch-addr2line_c. The build used base-gcc. There are some
> usual test failures like webrick failing basic auth (no DES crypt in
> crypt(3)) and SSLv3 failing (no SSLv3 in LibreSSL), but most failures
> are from TestJIT because of "undefined symbol '__guard_local'".
>
> The JIT is experimental and I don't need it. I was running Ruby trunk
> on amd64 but not enabling the JIT.
>
> I find that --jit-verbose=2 shows the cc commands. I also need
> --jit-wait, or 'puts 123' would finish without using the JIT. Notice
> that Ruby is running /usr/ports/pobj/ruby-2.6.0/bin/cc, but this cc
> won't exist after I clean the build, or when I pkg_add ruby%2.6
> without using ports.
>
> ghostborough$ arch
> OpenBSD.powerpc
> ghostborough$ ruby26 --jit-verbose=2 --jit-wait -e 'puts 123'
>
> MJIT: CC defaults to /usr/ports/pobj/ruby-2.6.0/bin/cc
>
> MJIT: tmp_dir is /tmp
>
> Creating precompiled header
>
> Starting process: /usr/ports/pobj/ruby-2.6.0/bin/cc
> /usr/ports/pobj/ruby-2.6.0/b
> in/cc -w -Wfatal-errors -fPIC -shared -w -pipe -O3 -o
> /tmp/_ruby_mjit_hp40346u0.
> h.gch /usr/local/include/ruby-2.6/powerpc-openbsd/rb_mjit_min_header-2.6.0.h
>
> start compilation: block in
> <module:RbConfig>@/usr/local/lib/ruby/2.6/powerpc-op
> enbsd/rbconfig.rb:275 -> /tmp/_ruby_mjit_p40346u0.c
>
> Starting process: /usr/ports/pobj/ruby-2.6.0/bin/cc
> /usr/ports/pobj/ruby-2.6.0/b
> in/cc -w -Wfatal-errors -fPIC -shared -w -pipe -O3 -o
> /tmp/_ruby_mjit_p40346u0.o
> /tmp/_ruby_mjit_p40346u0.c -c -L/usr/local/lib -nostartfiles -nodefaultlibs
> -no
> stdlib
>
> Starting process: /usr/ports/pobj/ruby-2.6.0/bin/cc
> /usr/ports/pobj/ruby-2.6.0/b
> in/cc -shared -Wfatal-errors -fPIC -shared -w -pipe -O3 -o
> /tmp/_ruby_mjit_p4034
> 6u0.so /tmp/_ruby_mjit_p40346u0.o -L/usr/local/lib -nostartfiles
> -nodefaultlibs
> -nostdlib
>
> ruby26:/tmp/_ruby_mjit_p40346u0.so: undefined symbol '__guard_local'
>
> MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p40346u0.so':
> Cannot
> load specified object
>
> ...
> (It enters an infinite loop trying to compile the object.)
Thank you very much for the testing and analysis. I can confirm the JIT
compilation problems on amd64 because it uses the cached cc path (before
it would even get to the __guard_local issues on gcc).
Below is a new Makefile that will use dist patches pulled from Ruby's
SVN to handle the random.c and addr2line.c issues, as well as an
additional significant regression. I tested that it also builds with
CC=/usr/bin/gcc.
I will keep working on the JIT issues to see if I can fix them and get
something that works with both base clang and gcc.
Thanks,
Jeremy
# $OpenBSD: Makefile,v 1.4 2018/03/31 21:12:45 jeremy Exp $
VERSION = 2.6.0
DISTNAME = ruby-${VERSION}
SHARED_LIBS = ruby26 0.0
NEXTVER = 2.7
MASTER_SITES0 =
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_2_6/
PATCHFILES =
ruby26-lib-net-protocol.patch{lib/net/protocol.rb?r1=66799\&r2=66798\&pathrev=66799\&view=patch}:0
\
ruby26-addr2line.patch{addr2line.c?r1=66800\&r2=66799\&pathrev=66800\&view=patch}:0
\
ruby26-random.patch{random.c?r1=66729\&r2=66728\&pathrev=66729\&view=patch}:0
PATCH_DIST_STRIP = -p2
PSEUDO_FLAVORS= no_ri_docs bootstrap
# Do not build the RI docs on slow arches
.if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa}
FLAVOR?= no_ri_docs bootstrap
.else
FLAVOR?=
.endif
MULTI_PACKAGES = -main -gdbm -ri_docs
.include <bsd.port.arch.mk>
.if ${BUILD_PACKAGES:M-ri_docs}
ALL_TARGET += rdoc
INSTALL_TARGET += install-doc
.endif
# Remove after 2.6.1
BUILD_DEPENDS = archivers/gtar
TAR = gtar
WANTLIB-main += curses
post-extract:
${POST_EXTRACT}
pre-configure:
${FIX_RIPPER}
pre-install:
${PRE_INSTALL}
post-install:
${FIX_RBCONFIG}
# 20197 tests, 2280714 assertions, 4 failures, 4 errors, 75 skips
do-test:
-cd ${WRKSRC} && make test-sample
-cd ${WRKSRC} && make btest-ruby
-cd ${WRKSRC} && make test-spec SPECOPTS="-f s"
cd ${WRKSRC} && make test-all TESTOPTS="-v -q"
.include <bsd.port.mk>