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

build fails with ruby 2.5.0 #8

Open
gsar opened this issue Mar 28, 2018 · 2 comments
Open

build fails with ruby 2.5.0 #8

gsar opened this issue Mar 28, 2018 · 2 comments

Comments

@gsar
Copy link

gsar commented Mar 28, 2018

looks like $(AR) changed to libtool -static which doesn't accept -r:

current directory: /Users/gsar/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/triez-1.0.5/ext
/Users/gsar/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180328-53094-1nbp0vx.rb extconf.rb
creating Makefile

current directory: /Users/gsar/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/triez-1.0.5/ext
make "DESTDIR=" clean

current directory: /Users/gsar/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/triez-1.0.5/ext
make "DESTDIR="
compiling triez.cc
mkdir -p build && cd build && clang -O3 -std=c99 -Wall -pedantic -fPIC -c -I.. ../hat-trie/*.c && libtool -static -r libtries.a *.o
../hat-trie/hat-trie.c:250:18: warning: taking the absolute value of unsigned type 'unsigned int' has no effect [-Wabsolute-value]
        if (d <= abs(left_m - right_m) && left_m + cs[j + 1] < all_m) {
                 ^
../hat-trie/hat-trie.c:250:18: note: remove the call to 'abs' since unsigned values cannot be negative
        if (d <= abs(left_m - right_m) && left_m + cs[j + 1] < all_m) {
                 ^~~
1 warning generated.
error: /Library/Developer/CommandLineTools/usr/bin/libtool: unknown option character `r' in: -r
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
make: *** [build/libtries.a] Error 1

make failed, exit code 2
@luikore
Copy link
Owner

luikore commented Mar 29, 2018

Thanks for reporting!

Seems caused by this change: ruby/ruby@bf87195

@gsar Just pushed a new version (1.0.6) to fix building when $(AR) is libtool -static, can you try if it works for you?

@gyfis
Copy link

gyfis commented Jan 16, 2019

FWIW the build worked for me on Ruby 2.4.2

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

3 participants