Installing Nokogiri with a modified Makefile - ruby

When I try to create a new rails project on my PowerPC Mac OS X with ruby-2.4.2 and rails-5.1, it started to download and install various gems and during the build step of nokogiri-1.10 I got
cc1: error: unrecognized command line option "-Wno-array-bounds"
during the compilation of libxml2.9.9. I modified the
~/.chefdk/gem/ruby/2.1.0/gems/nokogiri-1.10.1/ext/nokogiri/tmp/powerpc-apple-darwin9.8.0/ports/libxml2/2.9.9/libxml2-2.9.9/Makefile
to comment out the error causing -Wno-array-bounds option and remade the project but it gave the same error again. I guess it's reverting back the original Makefile. How can I install nokogiri with a modified Makefile?

Related

./configure doesn't find Qt5Core, QT5GUI, QT5Widgets

I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files.
I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev package.
sudo apt install build-essential qtbase5-dev qtchooser

During Openssl build: How to fix "fatal error: apps/app_rand.d: no such file or directory, compilation terminated"

I am attempting to update openssl to 1.1.1 on centos 7 in order to start building OpenLDAP.
After pulling the openssl installation package and unzipping it in /usr/local/src/ I ran ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib. This command successfully configured openssl.
I then ran the make command to build openssl and got the following error:
cc1: fatal error: apps/app_rand.d: no such file or directory
compilation terminated
make(1): *** (apps/app.rand.o) Error 1
make(1): Leaving directory '/usr/local/src/openssl-1.1.1d'
make: *** (all) Error 2
The apps directory was created and does exist, but the app_rand.d file is not present inside of the apps directory.
I have downloaded all dependencies (i believe)
I am decent in linux, I have my rhcsa, but am not familiar with manually building software libraries like openssl. I have tried to do some research online but have not come up with any solutions. Any advice would be very much appreciated!

error installing ruby old version 2.0.0-p247

I am trying to run command
rbenv install 2.0.0-p247
I tried to follow several steps by googling the errors that I faced but I am still not able to resolve the error
I got this error
BUILD FAILED (macOS 11.4 using ruby-build 20210804)
Inspect or clean up the working tree at /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.F4rCnt
Results logged to /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.log
Last 10 log lines:
compiling ancdata.c
compiling raddrinfo.c
installing default socket libraries
compiling constants.c
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
make: *** [build-ext] Error 2
The log file mentioned above has content:
https://easyupload.io/gygw5y
Ruby 2.0.0 is very much past its end of life, so I'm assuming you have a specific reason you need install it. Otherwise, you are much better off installing a modern, supported version such as 2.7.x or 3.0.x.
Older versions of ruby were built with openssl#1.0. After 1.0 went end of life, ruby-build had a breaking change to require openssl#1.1. This means that ruby versions < 2.4 can no longer be installed/built directly using ruby-build (i.e., rbenv). This GitHub issue has details.
Homebrew has removed its openssl#1.0 formula, but you can still install it via an rbenv tap. The following might work for you, though the comments in the issue report mixed results depending on the version of Command Line Tools being used.
brew install rbenv/tap/openssl#1.0
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.0)" 2.0.0-p247
Note: if you are running on an M1 (Apple Silicon) Mac, you might be out of luck. AFIK, there's no intention of getting openssl#1.0 to to work on Apple Silicon.

Flutter ios Build not working on MacOS Big Sur 11.0 Beta

On MacOS BigSur Beta, I am trying to generate the build of iOS, but that is always giving me the following error.
I tried re-installing flutter, sitching to beta, dev or master and use of Xcode beta as well but nothing worked.
help me if anyone faced same issue and resolve that.
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.3.1/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200926-66152-11vu3z5.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.3.1/ext/json/ext/generator
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.6.0/gems/json-2.3.1/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/json-2.3.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/json-2.3.1/gem_make.out
Let's try installing old version cocoapods.
Uninstall cocoapods
install old version cocoapods (e.g. 1.8.0)sudo gem install cocoapods --version '=1.8.0' -n /usr/local/bin
flutter clean
pub get
run your project (iOS simulator)
I resolved the error using this procedure.

Help Installing psycopg2 on snow leopard : command '/usr/bin/gcc-4.0' failed with exit status 1

This has been driving me crazy for 2 days.
I have been trying to install psycopg2 using easy_install and no matter what I try (i.e using gcc-4.0 instead of the snow leopard default one) I always get the same error:
error: Setup script exited with error: command '/usr/bin/gcc-4.0' failed with exit status 1
Please see: http://dpaste.com/hold/228252/
I have googled that error so many times and nothing I have found seem to help.
Looks like you're missing a dependency, the development files for libpq. The relevant log part is here:
In file included from psycopg/psycopgmodule.c:32In file included from psycopg/psycopgmodule.c:32:
./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory
Try installing libpq development files and then rerun easy_install. You may hit another missing dependency; pay attention to the first error that GCC spits out.
Link http://dpaste.com/hold/228252/ seems to be dead, this is how I solved this problem (Mac OS X 10.6, virtualenv).
If pip fails with this message, just take a look to build folder in your virtual environment. You should edit setup.cfg file there, particularly include_dirs and library_dirs. In first one set your include folders, my option was:
include_dirs=/opt/local/include/postgresql84:/opt/local/include/postgresql84/server
and most likely you will need to set library_dirs to correct location as well:
library_dirs=/opt/local/lib/postgresql84.
probably you should install postgresql-devel first
yum -y install postgresql-devel

Resources