[#87847] undefined symbol: mjit_init_p — Leam Hall <leamhall@...>

I pulled Ruby trunk on 3 Jul and am now getting errors similar to the

10 messages 2018/07/07

[#88088] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — normalperson@...

Issue #14937 has been reported by normalperson (Eric Wong).

9 messages 2018/07/24

[ruby-core:87753] [Ruby trunk Bug#14883] Ruby 2.5 Fails to Build on PowerPC 32-bit (BE)

From: lion@...
Date: 2018-07-02 15:51:56 UTC
List: ruby-core #87753
Issue #14883 has been updated by lion (Daming Yang).


contd.

When it comes to a glibc function `getcontext()`, 'the root issue' of the bug, we can check it in this way:

~~~c
// cat lion_getcontext.c
#include <ucontext.h>
#include <errno.h>
int main() {
    ucontext_t c;
    if (getcontext(&c) < 0)
        return errno;
    return 0;
}
// gcc lion_getcontext.c && ./a.out; echo $?
~~~

Note that the 'host' Bai has, is 32-bit (PPC32) userspace container(systemd-nspawn) on a 64-bit (PPC64) kernel.

Although the container is a kind of virtualisation, I think it does matter when it comes to glibc and syscall.

After running the test program, I got
- 0 on my amd64 laptop,
- 0 on Bai's PPC64 machine,
- 1(EPERM) on the PPC32-over-PPC64 container. This is why Ruby SEGV'ed on here.

Use `strace ./a.out` to trace syscalls. Interesting, the underlying syscalls are different.
~~~
AMD64: rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
PPC64: rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
PPC32-over-PPC64: swapcontext(0xfffa8dc8, 0) = -1 EPERM (Operation not permitted)
~~~

But it was weird.
It seems that neither https://github.com/torvalds/linux/blob/v4.8/arch/powerpc/kernel/signal_64.c#L588
nor https://github.com/torvalds/linux/blob/v4.8/arch/powerpc/kernel/signal_32.c#L1121
has `return -EPERM;` or does likewise.

Why was the errno `EPERM`? SELinux is disabled.
Is it a Linux *capability* issue only if programs run in a systemd-nspawn container?

----------------------------------------
Bug #14883: Ruby 2.5 Fails to Build on PowerPC 32-bit (BE)
https://bugs.ruby-lang.org/issues/14883#change-72778

* Author: mingcongbai (Mingcong Bai)
* Status: Feedback
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
When building Ruby 2.5.1 on a PowerPC 32-bit (Big Endian) host, the build fails as it generates rdoc - segmentation fault. The build log is as follows:

https://pastebin.aosc.io/paste/jJWjWPadcmJeLEkvpgnMqQ

Configure parameters...

... \
    --enable-shared \
    --disable-rpath \
    --with-dbm-type=gdbm_compat

On the same host with the same build environment, Ruby 2.4 builds just fine. The current Git master exhibits the same issue.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next