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

Failure in installing homebrew-metanorma: ld: library not found for -lgcc_s.10.4 #4

Closed
ronaldtse opened this issue Jan 22, 2019 · 30 comments
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Jan 22, 2019

Failure in installing homebrew-metanorma:

==> gem install metanorma-cli-1.1.0.gem
Last 15 lines from /Users/user/Library/Logs/Homebrew/metanorma/03.gem:
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link:  xcrun clang -dynamiclib  -o .libs/libffi.7.dylib  src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffiw64.o src/x86/.libs/win64.o    -arch x86_64 -arch x86_64 -arch x86_64   -install_name  /usr/local/lib/libffi.7.dylib -compatibility_version 9 -current_version 9.0 -Wl,-single_module
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libffi.la] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** ["/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c"/libffi-x86_64/.libs/libffi_convenience.a] Error 2

make failed, exit code 2

Gem files will remain installed in /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25 for inspection.
Results logged to /usr/local/Cellar/metanorma/1.1.0/libexec/extensions/universal-darwin-18/2.3.0/ffi-1.9.25/gem_make.out

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/riboseinc/homebrew-metanorma/issues
@ronaldtse ronaldtse added the bug Something isn't working label Jan 22, 2019
@ronaldtse
Copy link
Contributor Author

I'm running Mojave 10.14.2 (18C54).

@ronaldtse
Copy link
Contributor Author

Some people say this works:

sudo ln -s /usr/lib/libSystem.B.dylib /usr/local/lib/libgcc_s.10.5.dylib

@ronaldtse
Copy link
Contributor Author

Maybe related to this:
Homebrew/homebrew-core#28817 (comment)
?

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse I'm not sure about previous post but I have found exactly the same issue described here ffi/ffi#647

According to comments there: one of solution is to have preinstalled libffi, I have checked my environment and I have it, so I will provide PR in couple minutes

@ronaldtse
Copy link
Contributor Author

I already have libffi installed through homebrew.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse can you confirm that this didn't helped to solve the problem?

@ronaldtse
Copy link
Contributor Author

Libffi was already installed when the error came out. No it did not help the issue.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse thanks for information, BTW are you have Xcode on your mac?

@ronaldtse
Copy link
Contributor Author

OK: this fixes the issue:

sudo ln -s /usr/lib/libSystem.B.dylib /usr/local/lib/libgcc_s.10.4.dylib

But this isn't something we want?

@ronaldtse
Copy link
Contributor Author

Yes, I have Xcode (the Application) working properly on my Mac.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

sudo ln -s /usr/lib/libSystem.B.dylib /usr/local/lib/libgcc_s.10.4.dylib

@ronaldtse for me it not looks like good solution, on my system (I have Mojave 10.14.2 18C54 too) it works without this, let provide PR with libffi first

May I ask you to check if #5 works for you locally?

@ronaldtse
Copy link
Contributor Author

@CAMOBAP795 can you confirm you don't have this file? /usr/local/lib/libgcc_s.10.4.dylib

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse yep

~/Developers/Projects/riboseinc/homebrew-metanorma(add-libffi-dependency ✔) file /usr/local/lib/libgcc_s.10.4.dylib
/usr/local/lib/libgcc_s.10.4.dylib: cannot open `/usr/local/lib/libgcc_s.10.4.dylib' (No such file or directory)

@ronaldtse
Copy link
Contributor Author

Confirmed, issue is not fixed.

@ronaldtse
Copy link
Contributor Author

brew reinstall libffi and gem pristine ffi, both didn't solve this issue. Only the symlink trick worked.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse could you please run
brew install --verbose --debug https://raw.githubusercontent.com/riboseinc/homebrew-metanorma/c253f0040dd31c2383aee147257ec798c1db67f2/Formula/metanorma.rb 2>&1 | tee metanorma.install.log

And send metanorma.install.log to me

@ronaldtse
Copy link
Contributor Author

It's exactly this issue: ffi/ffi#651

@ronaldtse
Copy link
Contributor Author

I can install the ffi gem versions 1.9.25 and 1.10.0, but in homebrew-metaeorma it seems to bind to 1.9.25.

@ronaldtse
Copy link
Contributor Author

And ffi gem fails to install inside homebrew-metanorma.

2019-01-22 16:17:00 +0800

gem
install
metanorma-cli-1.1.0.gem

Successfully installed asciidoctor-1.5.8
Successfully installed optout-0.0.2
Successfully installed ruby-jing-0.0.1
Successfully installed asciimath-1.0.7
Successfully installed htmlentities-4.3.4
Successfully installed mini_portile2-2.3.0
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.8.5
Building native extensions.  This could take a while...
Successfully installed ruby-xslt-0.9.10
Successfully installed thread_safe-0.3.6
Successfully installed uuidtools-2.1.5
Successfully installed image_size-2.0.0
Successfully installed mime-types-data-3.2018.0812
Successfully installed mime-types-3.2.2
Successfully installed html2doc-0.8.8
Successfully installed liquid-4.0.1
Successfully installed roman-numerals-0.3.0
Building native extensions.  This could take a while...
ERROR:  Error installing metanorma-cli-1.1.0.gem:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190122-1833-ehu279.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/local/Cellar/metanorma/1.1.0/libexec/extensions/universal-darwin-18/2.3.0/ffi-1.9.25/mkmf.log

current directory: /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c
make "DESTDIR=" clean

current directory: /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c
make "DESTDIR="
mkdir -p "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c"/libffi-x86_64; (if [ ! -f "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi"/configure ]; then echo "Running autoreconf for libffi"; cd "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi" && /bin/sh /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/autogen.sh > /dev/null; fi); (if [ ! -f "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c"/libffi-x86_64/Makefile ]; then echo "Configuring libffi for x86_64"; cd "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c"/libffi-x86_64 && env CC=" xcrun clang" CFLAGS="-arch x86_64 " LDFLAGS="-arch x86_64" "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --disable-docs --host=x86_64-apple-darwin > /dev/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 /Applications/Xcode.app/Contents/Developer/usr/bin/make -C "/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c"/libffi-x86_64
Configuring libffi for x86_64
clang: error: unsupported option '-print-multi-os-directory'
clang: error: no input files
/Applications/Xcode.app/Contents/Developer/usr/bin/make 'AR_FLAGS=' 'CC_FOR_BUILD=' 'CFLAGS=-arch x86_64  -Wall -fexceptions' 'CXXFLAGS=-g -Os -pipe  -arch x86_64' 'CFLAGS_FOR_BUILD=' 'CFLAGS_FOR_TARGET=' 'INSTALL=/usr/bin/install -c' 'INSTALL_DATA=/usr/bin/install -c -m 644' 'INSTALL_PROGRAM=/usr/bin/install -c' 'INSTALL_SCRIPT=/usr/bin/install -c' 'JC1FLAGS=' 'LDFLAGS=-arch x86_64' 'LIBCFLAGS=' 'LIBCFLAGS_FOR_TARGET=' 'MAKE=/Applications/Xcode.app/Contents/Developer/usr/bin/make' 'MAKEINFO=/bin/sh /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/missing makeinfo ' 'PICFLAG=' 'PICFLAG_FOR_TARGET=' 'RUNTESTFLAGS=' 'SHELL=/bin/sh' 'exec_prefix=/usr/local' 'infodir=/usr/local/share/info' 'libdir=/usr/local/lib' 'mandir=/usr/local/share/man' 'prefix=/usr/local' 'AR=ar' 'AS=as' 'CC=xcrun clang' 'CXX=xcrun clang++' 'LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' 'NM=nm' 'RANLIB=ranlib' 'DESTDIR=' all-recursive
Making all in include
make[3]: Nothing to be done for `all'.
Making all in testsuite
make[3]: Nothing to be done for `all'.
Making all in man
make[3]: Nothing to be done for `all'.
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/prep_cif.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/prep_cif.c
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/types.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/types.c
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/raw_api.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/raw_api.c
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/java_raw_api.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/java_raw_api.c
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/closures.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/closures.c
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/x86/ffi64.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/ffi64.c
/bin/sh ./libtool    --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64  -c -o src/x86/unix64.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/unix64.S
/bin/sh ./libtool  --tag=CC   --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src   -arch x86_64  -Wall -fexceptions -c -o src/x86/ffiw64.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/ffiw64.c
/bin/sh ./libtool    --mode=compile xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src  -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64  -c -o src/x86/win64.lo /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/win64.S
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/types.c  -fno-common -DPIC -o src/.libs/types.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/java_raw_api.c  -fno-common -DPIC -o src/.libs/java_raw_api.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/ffiw64.c  -fno-common -DPIC -o src/x86/.libs/ffiw64.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/win64.S  -fno-common -DPIC -o src/x86/.libs/win64.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/prep_cif.c  -fno-common -DPIC -o src/.libs/prep_cif.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/raw_api.c  -fno-common -DPIC -o src/.libs/raw_api.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/ffi64.c  -fno-common -DPIC -o src/x86/.libs/ffi64.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/x86/unix64.S  -fno-common -DPIC -o src/x86/.libs/unix64.o
libtool: compile:  xcrun clang -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi -I. -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/include -Iinclude -I/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src -arch x86_64 -Wall -fexceptions -c /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/src/closures.c  -fno-common -DPIC -o src/.libs/closures.o
/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch x86_64  -Wall -fexceptions  -arch x86_64 -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo   src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffiw64.lo src/x86/win64.lo 
/bin/sh ./libtool  --tag=CC   --mode=link xcrun clang  -arch x86_64  -Wall -fexceptions -no-undefined -version-info `grep -v '^#' /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c/libffi/libtool-version`   '-arch' 'x86_64'  -arch x86_64 -o libffi.la -rpath /usr/local/lib src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo  src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffiw64.lo src/x86/win64.lo 
libtool: link: ar cru .libs/libffi_convenience.a src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffiw64.o src/x86/.libs/win64.o 
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link:  xcrun clang -dynamiclib  -o .libs/libffi.7.dylib  src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi64.o src/x86/.libs/unix64.o src/x86/.libs/ffiw64.o src/x86/.libs/win64.o    -arch x86_64 -arch x86_64 -arch x86_64   -install_name  /usr/local/lib/libffi.7.dylib -compatibility_version 9 -current_version 9.0 -Wl,-single_module
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libffi.la] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** ["/usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25/ext/ffi_c"/libffi-x86_64/.libs/libffi_convenience.a] Error 2

make failed, exit code 2

Gem files will remain installed in /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25 for inspection.
Results logged to /usr/local/Cellar/metanorma/1.1.0/libexec/extensions/universal-darwin-18/2.3.0/ffi-1.9.25/gem_make.out

HOMEBREW_VERSION: 1.9.2-63-g138c0cb
ORIGIN: https://github.com/Homebrew/brew
HEAD: 138c0cb6b0fe82af01b689b1e9f366ea721b25dc
Last commit: 33 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 56aa09b03c2ebad5e0b0094c0aa310e074b4106a
Core tap last commit: 3 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/user/Library/Caches/Homebrew
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.20.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 11.0.1, 1.8.0_25
macOS: 10.14.2-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1
XQuartz: 2.7.11 => /opt/X11

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
CFLAGS: -I/Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home/include/darwin
CXXFLAGS: -I/Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home/include/darwin
LDFLAGS: -L/usr/local/opt/libffi/lib
MAKEFLAGS: -j12
CMAKE_PREFIX_PATH: /usr/local/opt/icu4c:/usr/local/opt/libffi:/usr/local
CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.14
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home/bin:/usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/icu4c/bin:/usr/local/opt/node/bin:/usr/local/opt/libpng/bin:/usr/local/opt/freetype/bin:/usr/local/opt/fontconfig/bin:/usr/local/opt/jpeg/bin:/usr/local/opt/libtiff/bin:/usr/local/opt/webp/bin:/usr/local/opt/gd/bin:/usr/local/opt/libtool/bin:/usr/local/opt/graphviz/bin:/usr/local/opt/plantuml/bin:/usr/bin:/bin:/usr/sbin:/sbin

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse still thinking on solution

Just to clarify we cannot do sudo ln -s /usr/lib/libSystem.B.dylib /usr/local/lib/libgcc_s.10.4.dylib inside formula

Till suitable solution will be found we just can mention this in documentation, nothing more

Looks like defined variables LDFLAGS and PKG_CONFIG_PATH have no affect on ffi.

I'm looking at gems/ffi code to find how to point it to right libraries

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse one more thing have you installed Xcode CLI tools? xcode-select --install?

@ronaldtse
Copy link
Contributor Author

Yes, I have.

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse may I ask you to zip /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25 from your mac and sent it to me?

@ronaldtse
Copy link
Contributor Author

$ 
open /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25
The file /usr/local/Cellar/metanorma/1.1.0/libexec/gems/ffi-1.9.25 does not exist.

I am unable to get that zip file but the install logs are attached (from ~/Library/Logs/Homebrew/metanorma).

homebrew-metanorma-fail.log.zip

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse thanks for info, and sorry for asking you again (I haven' chance to reproduce it on my end)

I didn't see possibility to resolve this on our end but I saw comments like 1.9.21 works, may I ask you to try these versions ?

  • gem install ffi -v 1.9.21
  • gem install ffi -v 1.10.0

@ronaldtse
Copy link
Contributor Author

The thing is when I run gem install ffi -v 1.9.25 and the other versions directly, they work. It is when 1.9.25 is run within Homebrew, ffi can't get installed.

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse wow, I missed this, thanks for remind, let me do quick research again

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Jan 22, 2019

@ronaldtse just to do comparison, may I ask you to send log for gem install ffi --debug --verbose -v 1.9.25

@ronaldtse
Copy link
Contributor Author

Here you go.

ffi-install.log.zip

@ronaldtse
Copy link
Contributor Author

Fixed in #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants