- edited description
Errors building Ruby
I’m trying to compile Ruby on IBM i. However, when it gets to link the miniruby
binary, I get the following error:
linking miniruby
ld: 0711-317 ERROR: Undefined symbol: .libutil_flock
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
make: The error code from the last command is 1.
I have installed the last version of libutil
available:
$ yum install libutil2 libutil-devel
Setting up Install Process
Package libutil2-0.10.0-1.ppc64 already installed and latest version
Package libutil-devel-0.10.0-1.ppc64 already installed and latest version
Comments (8)
-
reporter -
libutil_flock is part of libutil as you have suspected. You can usually fix this when using autotools-based packages by adding
-lutil
to LIBS or LDFLAGS or another environment variable that ruby uses during its configure step, since it’s not a library that is linked with by default. You may find more info by looking at the output of./configure --help
. -
reporter You are right, I was not passing
-lutil
in myLDFLAGS
, that got me forward a bit but now I’m facing a completely different problem:linking miniruby ./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp generating encdb.h /bin/sh[3]: 51135 Illegal instruction(coredump) /bin/sh: 51134 Illegal instruction(coredump) make: The error code from the last command is 132.
The binary that crashes is the
miniruby
it just built:$ ./miniruby Illegal instruction (core dumped)
As far as I know Ruby can be made to compile on IBM i… do you know if there are instructions somewhere on how to compile it, or even a pre-built version?
-
reporter - changed title to Errors building Ruby
-
Usually illegal instructions are due to it trying to call unimplemented syscalls in PASE, though it is unhelpful in letting you know which syscall it is choking on.
This isn’t really the forum for asking these kinds of questions, though. You’d be much better served in one of our community groups like Ryver: https://ibmi-oss-docs.readthedocs.io/en/latest/README.html#collaboration
-
You may be interested in the pre-built version documented here:
-
reporter - changed status to resolved
-
reporter Thanks folks, I will keep trying with the resources you gave me :)
- Log in to comment