Closed SdotVdot closed 7 months ago
This seems to be an issue with the Ruby environment, not the tool.
Is this during bundle install
? Which OS are you on?
I git cloned and then executed
$ ./ltx2any
I get
/Library/Ruby/Site/2.3.0/bundler/spec_set.rb:91:in block in materialize': Could not find ffi-1.9.25 in any of the sources (Bundler::GemNotFound) from /Library/Ruby/Site/2.3.0/bundler/spec_set.rb:85:in
map!'
from /Library/Ruby/Site/2.3.0/bundler/spec_set.rb:85:in materialize' from /Library/Ruby/Site/2.3.0/bundler/definition.rb:171:in
specs'
from /Library/Ruby/Site/2.3.0/bundler/definition.rb:238:in specs_for' from /Library/Ruby/Site/2.3.0/bundler/runtime.rb:20:in
setup'
from /Library/Ruby/Site/2.3.0/bundler.rb:109:in setup' from /Library/Ruby/Site/2.3.0/bundler.rb:114:in
require'
from ltx2any.rb:39:in `
I am using MAC OX X Mojave. Now I an going to do the same with Debian.
You definitely need to install the necessary gems. The easiest way is to run
gem install bundler
bundle install
FWIW, I'm sorry that the documentation is less than ideal. I'm in the process of migrating the tool to being a gem itself (slow progress, though) which will solve those issues.
That's not working for me on Mojave 10.14:
$ bundle install --path ../vendor/bundle
Fetching gem metadata from https://rubygems.org/............
Using bundler 1.17.2
Fetching ffi 1.9.25
Installing ffi 1.9.25 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
[...cut...]
Somehow the sdk on macOS is set to the wrong math:
$ cat ../vendor/bundle/ruby/2.6.0/extensions/x86_64-darwin-18/2.6.0/ffi-1.9.25/mkmf.log
"pkg-config --exists libffi"
| pkg-config --libs libffi
=> "-L/opt/local/lib -lffi\n"
"/usr/bin/clang -o conftest -I/opt/local/include/ruby-2.6.0/x86_64-darwin18 -I/opt/local/include/ruby-2.6.0/ruby/backward -I/opt/local/include/ruby-2.6.0 -I. -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fno-common conftest.c -L. -L/opt/local/lib -L/opt/local/lib -L. -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fstack-protector-strong -L/opt/local/lib -arch x86_64 -lruby.2.6 "
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
In file included from conftest.c:1:
In file included from /opt/local/include/ruby-2.6.0/ruby.h:33:
In file included from /opt/local/include/ruby-2.6.0/ruby/ruby.h:29:
/opt/local/include/ruby-2.6.0/ruby/defines.h:123:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
Any suggestion how to solve the "-Wmissing-sysroot" problem? I have the 10.15 SDK, but somehow bundle is picking up 10.14:
$ ls -1 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
DriverKit19.0.sdk
MacOSX.sdk
MacOSX10.15.sdk
Found the fix here. TLDR:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
$ sudo ln -s MacOSX.sdk MacOSX10.14.sdk
I get the following message: Could not find ffi-1.9.25 in any of the sources How can I fix this?