pmq20 / ruby-packer

Packing your Ruby application into a single executable.
MIT License
1.56k stars 99 forks source link

cannot compile ruby-packer from source in macos majave with Ruby 2.5.3 #80

Open pc-gliu opened 5 years ago

pc-gliu commented 5 years ago

configure: ruby library version = 2.5.0 configure: creating ./config.status config.status: creating GNUmakefile config.status: creating Makefile config.status: creating ruby-2.5.pc

Configuration summary for ruby version 2.5.1


-> CI=true ENCLOSE_IO_USE_ORIGINAL_RUBY=1 CFLAGS=\ -fPIC\ -O3\ -fno-fast-math\ -ggdb3\ -Os\ -fdata-sections\ -ffunction-sections\ -pipe\ \ -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/include\ \ -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/lib/libffi-3.2.1/include\ LDFLAGS='' ENCLOSE_IO_RUBYC_1ST_PASS=1 ENCLOSE_IO_RUBYC_2ND_PASS='' make -j4 CC = clang LD = ld LDSHARED = clang -dynamic -bundle CFLAGS = -fPIC -O3 -fno-fast-math -ggdb3 -Os -fdata-sections -ffunction-sections -pipe -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/include -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/lib/libffi-3.2.1/include
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin18 -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/ruby-2.5.1-0.5.0/include -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/ruby-2.5.1-0.5.0 -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/ruby-2.5.1-0.5.0/enc/unicode/10.0.0 -fPIC -O3 -fno-fast-math -ggdb3 -Os -fdata-sections -ffunction-sections -pipe -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/include -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/lib/libffi-3.2.1/include DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-pie -framework Foundation
SOLIBS = LANG = en_US.UTF-8 LC_ALL = LC_CTYPE = en_US.UTF-8 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin linking miniruby Undefined symbols for architecture x86_64: "_inflate", referenced from: _autoupdate in autoupdate_autoupdate.o "_inflateEnd", referenced from: _autoupdate in autoupdate_autoupdate.o "inflateInit2", referenced from: _autoupdate in autoupdate_autoupdate.o "_uncompress", referenced from: _sqfs_decompressor_zlib in squash_decompress.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [miniruby] Error 1 Failed running [{"CI"=>"true", "ENCLOSE_IO_USE_ORIGINAL_RUBY"=>"1", "CFLAGS"=>" -fPIC -O3 -fno-fast-math -ggdb3 -Os -fdata-sections -ffunction-sections -pipe -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/include -I/var/folders/gj/vgwp8q6s2n7_wxrj05pb1xjxy7dzks/T/rubyc/local/lib/libffi-3.2.1/include ", "LDFLAGS"=>"", "ENCLOSE_IO_RUBYC_1ST_PASS"=>"1", "ENCLOSE_IO_RUBYC_2ND_PASS"=>nil}, "make -j4"] rake aborted! Command failed with status (1): [/Users/gliu/.rbenv/versions/2.5.3/bin/ruby...] /Users/gliu/Documents/ruby-packer/master/ruby-packer/Rakefile:19:in block in <top (required)>' /Users/gliu/.rbenv/versions/2.5.3/bin/bundle:23:inload' /Users/gliu/.rbenv/versions/2.5.3/bin/bundle:23:in `

' Tasks: TOP => rubyc (See full trace by running task with --trace)

did commented 5 years ago

hey @pc-gliu, I was able to get rid of this error by doing 2 things: