reitzig / ltx2any

Yet another LaTeX build wrapper, with one or two nifty features
GNU General Public License v3.0
59 stars 4 forks source link

ffi-1.9.25 #118

Closed SdotVdot closed 7 months ago

SdotVdot commented 5 years ago

I get the following message: Could not find ffi-1.9.25 in any of the sources How can I fix this?

reitzig commented 5 years ago

This seems to be an issue with the Ruby environment, not the tool.

Is this during bundle install? Which OS are you on?

SdotVdot commented 5 years ago

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:inmap!' 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:inspecs' 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:insetup' from /Library/Ruby/Site/2.3.0/bundler.rb:109:in setup' from /Library/Ruby/Site/2.3.0/bundler.rb:114:inrequire' from ltx2any.rb:39:in `

'

I am using MAC OX X Mojave. Now I an going to do the same with Debian.

reitzig commented 5 years ago

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.

mcmara commented 4 years ago

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
mcmara commented 4 years ago

Found the fix here. TLDR:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
$ sudo ln -s MacOSX.sdk MacOSX10.14.sdk
reitzig commented 4 years ago

@mcmara Thanks for adding this here! For GNU/Linux, I'd have said "install build-essentials, then it should work" -- no idea how macOS works, mostly!

If you think the information is of general use, please consider adding a note to the wiki.

Foadsf commented 8 months ago

I am encountering relevant issues on Windows, as I have reported here and here.