Installation using Jekyll fails on OS Mojave 10.14.5 - jekyll

I have an issue installing Jekyll, because ffi is not working:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/ext/ffi_c
/usr/local/opt/ruby/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.6.0 -r ./siteconf20190721-87601-s2b792.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 rb_thread_call_without_gvl()... yes
checking for ruby_native_thread_p()... yes
checking for ruby_thread_has_gvl_p()... yes
creating extconf.h
creating Makefile
current directory: /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/ext/ffi_c
make "DESTDIR=" clean
current directory: /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/ext/ffi_c
make "DESTDIR="
Configuring libffi
configure: error: in `/usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi-x86_64-darwin18':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
make: *** ["/usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1/ext/ffi_c/libffi-x86_64-darwin18"/.libs/libffi_convenience.a] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/lib/ruby/gems/2.6.0/gems/ffi-1.11.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/ffi-1.11.1/gem_make.out
It seems like ffi-1.11.1 is not working with jekyll. Has anyone been successful in installing jekyll? I'm using OS Mojave version 10.14.5.

Please check out this issue in the ffi repo and also this issue on Github which might be helpful, even if the error is slightly different this might be a trace to start for you.
Also, the solution and explanation provided in this issue looks very promising:
Finally I realised that I had a version of Xcode that was not updated because High Sierra is too older to support the lastest version (Thank you Apple...).
So I tried to enter the command gcc -v and I saw this line :
Apple LLVM version 8.0.0 (clang-800.0.38).
That was the problem ! Even If I installed the latest Xcode Command Line Developer Tools, the old gcc provided with Xcode was still used.
I entered the command xcode-select -s /Library/Developer/CommandLineTools/ and the command gcc -v displayed the new version :
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
High Sierra and Mojave might have the same issue with outdated xcode stuff here.

Related

Compile QEMU under Windows 10 (64-bit) for Windows 10 (64-bit)

I managed to compile QEMU (3.0.50) under Windows 10 (64-bit) (basically following these instructions) with these commands:
./configure --enable-gtk --enable-sdl
make
However, when starting qemu-system-x86_64.exe in a console, nothing happens. I expected a window showing up. Shortly after starting the exe, I'm getting back the prompt. Nothing printed out to the console. No necessary DLL is missing. What could be the problem?
Finally I managed to compile and run QEMU under Windows 10 Home 64-bit.
There are a few pitfalls:
Due to a compiler bug in mingw (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832 and https://www.mail-archive.com/qemu-devel#nongnu.org/msg557409.html), you have to configure QEMU with --disable-stack-protector and (one solution) add the function __stack_chk_fail to a source file.
Configure QEMU with --disable-werror.
Remove Capstone project from makefile.
Here's a complete step-by-step guide for compiling qemu-system-x86_64.exe:
Date: 2018-10-31
OS: Microsoft Windows 10 Home 64-bit
Guide based on: https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2
Download and install msys2 to C:\msys64:
http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe
Start C:\msys64\mingw64.exe
Updates (then close window and restart mingw64.exe): pacman -Syu
Updates: pacman -Su
Install basic packets: pacman -S base-devel mingw-w64-x86_64-toolchain git python
Install QEMU specific packets: pacman -S mingw-w64-x86_64-glib2 mingw-w64-x86_64-gtk3 mingw-w64-x86_64-SDL2
Get QEMU sources:
git clone git://git.qemu-project.org/qemu.git
cd qemu
git submodule update --init ui/keycodemapdb
git submodule update --init capstone
git submodule update --init dtc
Insert
void __stack_chk_fail(void);
void __stack_chk_fail(void)
{
}
to qemu\util\oslib-win32.c
e.g. at line 44
Comment out (#) Capstone (line 508) in qemu\Makefile
Build QEMU:
./configure --enable-gtk --enable-sdl --target-list=x86_64-softmmu --disable-werror --disable-stack-protector
make
Run in qemu/x86_64-softmmu
./qemu-system-x86_64 -L ./../pc-bios
Optional (for better performance): Install HAXM according to this guide: https://www.qemu.org/2017/11/22/haxm-usage-windows/ and start QEMU with option -accel hax
I would do know if somebody tried in 2022 i have currently some issues after compiling.
Firt it asks for libzstd.dll, when i go to the project i found by google and dl this dll, i encounter another issue
with x64.dll
with x32.dll (just in case)
i use msys2 minGw x64 on windows 10 pro x64. At the beginning i would compile a patch, but it the same problem with vanilla, i ask myself if it's an environment problem, a missing dll, or if it's always possible to compile directly on windows10, perhaps now it's only possible to compile in cross platform. I'm not habit at all with mingw64 tools.
I looked for the g_spanw... error and found this https://docs.gtk.org/glib/func.spawn_async_with_fds.html
Perhaps i'm wrong but it's only for gnome, isn't it ?

installing the mysqlclient library in mac OS

I'm trying to demo rust database program using diesel.rs library.
I'm following the getting started steps here.
As mentioned in this page, I got below error while running the command cargo install diesel_cli.
note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The solution is given in the next step as well in same page as below.
You can resolve this issue by either installing the library (using the usual way to do this depending on your operating system) or by specifying the backends you want to install the CLI tool with.
But I don't know how to do this in my mac OS. I tried the below commands.
brew install mysqlclient
brew install lmysqlclient
But brew couldn't find any such repo.
Please help me how to resolve this error and install mysqlclient library in my mac OS.
mysql-connector-c seems to be the homebrew package you are looking for. Libmysqlclient should also be installed when installing the mysql brew package.

Can't install json (Ruby doesn't work)

windows 10. ruby 2.2.4. I've tried all the devkit stuff and whatever to fix this. I've looked stuff up for hours and hours with no success. When I try to bundle it doesn't install json. When I try to install json it says
"Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160303-4132-alefq2.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/json-1.8.3/gem_make.out"
I was facing the same problem. The Gemfile.lock in the repo I cloned had a json version older than the one I had already installed. I did not manage to uninstall the newer version, but I did replace the old version number in the Gemfile.lock with the new one and it seems to work now.
You should run the devkit installation scripts.
In particular, pay attention to devkitvars.bat.

error installing caldecott

recently i made web application and want to atatch my database with it ..though i followed steps of doing it but still i am getting error ..i dont know where's problem i did in steps .. please let me know where i am wrong
please help me where i am wrong or what i skipped ..
thankyou..
I had problems install caldecott , i got the
ERROR: Error installing caldecott:
ERROR: Failed to build gem native extension.
"C:/Program Files/ruby-1.9.2/bin/ruby.exe" extconf.rb
*** extconf.rb failed ***
error :
i found this resource : http://www.clausconrad.com/blog/installing-caldecott-on-windows
which was helpfull but my problem was i had multiple ruby installations on my system !
so make sure you are using the right ruby installation and delete the others if needed :
i had :
C:/Program Files/ruby-1.9.2/bin/ruby.exe
and
C:\Ruby193\bin\ruby.exe
i deleted the first one and everything went fine , be sure to install the devkit like the link says , and everything should be allright.
There's an issue installing eventmachine on Windows. Try this instead:
gem install eventmachine --pre
gem install caldecott
To install Caldecott requires Ruby 1.9.2.
Check version by
ruby -v
if not 1.9
update the version and re try to install
first make sure that you installed C compiler in your local computer...
if you are using Linux you can run the following command:
sudo apt-get install g++
if you are in windows you will have find a C compiler from the net.
After installing this C compiler, you can now run
sudo gem install caldecott
If this is not working, try
ruby -v
to see if the version is 1.9.3 or above....
then repeat
hope that helps

error when installing mysql ruby gem on OSX 10.6.3

So I am getting the same issue as mentioned here -
gem install mysql failure in Snow Leopard
But I haven't been able to get it fixed using the answers on this link.
Here's a brief history -
I had MAMP on my machine,
but now I downloaded the latest MySQL from mysql.com and installed version 5.1.46
this new version runs fine and client "mysql" is able to connect
and I also have XCode v3.2.1, since someone mentioned that it can cause issues.
Here's the error -
**Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out**
"can't find header files for ruby" usually means that the system can't locate the header files for Ruby. This happened to me when I upgraded to 10.6 from 10.5. Download the latest XCode from Apple's site and reinstall it. Make sure that you check the box for "UNIX Development" during the install. The header files for Ruby are not in the main package.
Have you installed other versions of Ruby or are you using the standard 1.8.7 that comes with OS X? You can check your version of ruby by typing ruby -v at a terminal prompt.