Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot compile on ubuntu 16.04 #144

Open
ahoward opened this issue Jan 4, 2021 · 5 comments
Open

cannot compile on ubuntu 16.04 #144

ahoward opened this issue Jan 4, 2021 · 5 comments

Comments

@ahoward
Copy link

ahoward commented Jan 4, 2021

  • spun up a brand new ubuntu 16.04 machine (linode)
  • installed ruby 2.7.1 via rvm (precompiled binary available)
  • changed https to http in Gemfile (due to ssl / rubygems issue)

and compiled goes a while but then borks with

make[2]: Leaving directory '/tmp/rubyc/build_pass2/ext/openssl'
make[2]: Entering directory '/tmp/rubyc/build_pass2'
/tmp/rubyc/ruby-2.7.1.dev/revision.h unchanged
generating enc.mk
compiling enc/encinit.c
linking ruby
/tmp/rubyc/local/lib/libcrypto.a(threads_pthread.o): In function `fork_once_func':
/tmp/rubyc/openssl/crypto/threads_pthread.c:188: undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
Makefile:275: recipe for target 'ruby' failed
make[2]: *** [ruby] Error 1
make[2]: Leaving directory '/tmp/rubyc/build_pass2'
exts.mk:151: recipe for target 'ruby' failed
make[1]: *** [ruby] Error 2
make[1]: Leaving directory '/tmp/rubyc/build_pass2'
uncommon.mk:317: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
Failed running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"true", "CFLAGS"=>" -DRUBY_DEBUG -fPIC -O3 -fno-fast-math -ggdb3 -Os -fdata-sections -ffunction-sections -pipe  -I/tmp/rubyc/ruby-2.7.1.dev  -I/tmp/rubyc/local/include  -I/tmp/rubyc/local/lib/libffi-3.2.1/include ", "LDFLAGS"=>" -L/tmp/rubyc/local/lib  /tmp/rubyc/local/lib/libz.a ", "ENCLOSE_IO_RUBYC_1ST_PASS"=>nil, "ENCLOSE_IO_RUBYC_2ND_PASS"=>"true"}, "make -j4"]
rake aborted!
Command failed with status (1): [/usr/share/rvm/rubies/ruby-2.7.1/bin/ruby ...]
/home/ahoward/ruby-packer/Rakefile:27:in `block in <top (required)>'
/usr/share/rvm/rubies/ruby-2.7.1/bin/bundle:30:in `load'
/usr/share/rvm/rubies/ruby-2.7.1/bin/bundle:30:in `<main>'
/usr/share/rvm/gems/ruby-2.7.1/bin/ruby_executable_hooks:24:in `eval'
/usr/share/rvm/gems/ruby-2.7.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => rubyc
(See full trace by running task with --trace)

i really want to give rubyc a whirl but can't seem to use the precompiled binaries to produce portable cli programs (hello world) without hitting glibc issues on some of the linuxes i've tried to run the output on. thus, trying to produce a rubyc on ubuntu 16 to link to older symbols. ref: #143

@SwagDevOps
Copy link
Contributor

Ubuntu Linux 16.04 LTS will no longer be supported by April 30, 2021. Ubuntu Linux 16.04 LTS reaches the end of its five-year LTS window on April 30th 2021 and will no longer be supported by its vendor, Canonical. At that time, Ubuntu 16.04 LTS will no longer receive security patches or other software updates.

@ahoward
Copy link
Author

ahoward commented Jan 4, 2021

@SwagDevOps the issue with rubyc attm is that it compiles on too new of a build box, acquiring symbols that are non-portable. it isn't about the OS, it's about getting a set of libraries with symbols that will work across linuxes portably. eg, the current rubyc produces binaries that won't run on newer gnu linux variants, see #143. the solution, proposed by @pmq20 , is to compile on the oldest possible build box which, attm, is ubuntu 16 afaik -> #131

@ahoward
Copy link
Author

ahoward commented Jan 4, 2021

possible solution: wg/wrk#379

@randall-coding
Copy link

randall-coding commented Jan 17, 2021

@ahoward I'm getting the same problem, and looked through the links you've posted but I don't see any answers there for my situation. Any solution for you on this?

I'm on Ubuntu 18.04

@dj4
Copy link

dj4 commented Jan 19, 2021

for the time being, i went with traveling ruby as it 'just worked'. i really think the approaches need to be combined to be useful. rubyc is very compelling in it's approach. however, trying to avoid having a 'holy build box', as traveling ruby does, is never, i think, going to produce portable binaries. fwiw, this is how much code it took me to wrap in tr:

note that all that srubbing of extra files wasn't actually needed, i just wanted to build a reference from the docs that would handle that stuff in the future/projects

the result

however, i really, really, really would prefer to do this with rubyc. i did some work to attempt making rubyc use the ruby version produced by traveling ruby. in otherwords, i was hoping i might be able to take a version of ruby, compiled on a 'holy build box' and, therefore, not having been inadvertently linked to new-ish symbol tables, and to use that as the ruby for rubyc, but it wasn't possible.

cc @randall-coding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants