autoconf: command not found - ruby

I'm trying to install ruby 2.8.0-dev through asdf with asdf install ruby 2.8.0-dev but I get the following error:
Cloning https://github.com/ruby/ruby.git...
Installing ruby-master...
BUILD FAILED (Ubuntu 20.04 using ruby-build 20200401)
Inspect or clean up the working tree at /tmp/ruby-build.20200523221649.37283.rxnWxu
Results logged to /tmp/ruby-build.20200523221649.37283.log
Last 10 log lines:
/tmp/ruby-build.20200523221649.37283.rxnWxu ~
Cloning into 'ruby-master'...
/tmp/ruby-build.20200523221649.37283.rxnWxu/ruby-master /tmp/ruby-build.20200523221649.37283.rxnWxu ~
/home/carlos/.asdf/plugins/ruby/ruby-build/bin/ruby-build: line 622: autoconf: command not found
I'm on Ubuntu 20.04
I've googled this but didn't found any useful info.
Best regards.

First, some general advice how you can solve this issue yourself, without having to come to [so] and waiting for someone else to solve your problem:
Computers are very good at searching. So, in 90% of cases, when a computer tells you that it couldn't find something, it is because that thing isn't there.
So, the first thing I would check, if I were in your situation, is whether the thing the computer tells me it can't find is actually there. In particular, I would check whether I have autoconf installed.
In the other 10% of cases, the thing the computer is looking for is there, but it is not somewhere the computer is looking. So, the second thing I would check is whether autoconf is in the $PATH.
Pretty much always, following those two steps solves the problem for me.
Now, on to your particular problem: when you want to compile some piece of software, you need the corresponding tools. Those tools include, but are not limited to, a compiler for the language the software is written in (in this case C), a build tool (in this case Make), the header files for all the libraries the software uses (in this case for example libyaml, zlib, OpenSSL), maybe some configuration tools (in this case autoconf). YARV also uses Bison to generate its parser.
Often, those required tools are listed in the developer or contributor documentation of the software. Although sometimes, it is just assumed that people who install software by compiling directly from source are clever enough to figure out which tools they need on their own. For YARV, there is documentation about the requirements for running the testsuite, which implicitly also requires building the code in the first place.
Debian-based Linux Distributions (Debian, Ubuntu, Mint, etc.) have a handy meta-package called build-essential that depends on some of the most important tools, e.g. gcc and make as well as the dpkg-dev metapackage (which in turn depend on lots of other packages).
The ASDF Ruby plugin actually uses ruby-build under the hood, and the documentation directly links to the system requirements, which list the following:
apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev

I ran into a similar issue and this fixed it for me.
In short, run:
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev

Related

Boost not finding zlib package on Ubuntu 20.04

I'm trying to compile Boost with the zlib package built into Ubuntu, but it cannot find it and thus gives me a zlib : no upon running ./b2.
I definitely have it installed, as dpkg -L zlib1g-dev and dpkg -L zlib1g give me their locations.
I've tried manually passing in the directories as command-line options as suggested here, and I've also tried creating a user-config.jam file as suggested here, but nothing has worked.
Any ideas as to what might be the problem?
For unclear reasons, the solution was just to get rid of everything in the Boost directory and recompile + reinstall Boost. After that it was able to find zlib (and bzip2) without any problems.

Packages apt-get vs brew?

Im trying to get something running in a lab, and I need to install a whole bunch of packages to compile the code:
sudo apt-get install build-essential libgtk2.0-dev libwxgtk3.0-dev libwx-perl libmodule-build-perl git cpanminus libextutils-cppguess-perl libboost-all-dev libxmu-dev liblocal-lib-perl wx-common libopengl-perl libwx-glcanvas-perl libtbb-dev libxmu-dev freeglut3-dev libwxgtk-media3.0-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libcurl4-openssl-dev libextutils-makemaker-cpanfile-perl
The problem is, I'm working on a Mac; So I only have brew available - and the package names are not equivalent.
Am I trying to do something dumb and impossible, or is there a way to cross reference those apt-get packages to ones available in brew and install those so I can build the app?
For added context, its a modified "slicer" application for generating files that a 3d printer uses to make parts. I could fire up an ubuntu VM and use apt-get, but I'm on an M1 mac at the moment and recompiling experimental QEMU code just so I can fire up an ubuntu VM takes me way more out of my depth than I already am... I'm running brew on a duplicated, rosetta emulation forced terminal.
There is no straightforward way to automatically figure out whether a corresponding Homebrew package exists for each of these packages, no. But you can probably guess the majority, and manually figure out the rest. Each Debian package has a link to the upstream sources, and a home page if one exists, from which you can often find links to packages for other architectures, etc.
From the Debian package search page you can search e.g. for the libxmu-dev package, and discover the corresponding package page for Buster (the current stable Debian release), which in turn has links to the upstream repo, etc. But this is an X11 package, so it's not straightforwardly compatible with macOS, which uses an entirely different GUI architecture.

Installing packages through bash scripting

I have never written any bash scripts at this point and my understanding of them is still pretty green. I was curious after reformatting my Mac if it is possible to write a script that does the majority of installs in an automated fashion?
For instance I use homebrew so maybe a portion of the script could verify if this is on the Mac and if not then initiate the install. Then it could proceed with the list of brew install & brew cask installs.
This is something that after realizing how much I had installed and had to remember and still am remembering to install I think would be pretty cool to make...I just don't know if a) it's possible with the macOS or how-to (I'll read up on the how-to). I'm not even too sure if bash-scripts would be the thing to use for something like this or not. Thanks in advance for any information!
on an RPM based system I would eventually list the packages installed, backup the list and then chain it in a yum install command.
For instance:
yum list installed
A
B
C
then to reinstall
yum install A B C -y
Extremely easy and straight forward.
I do believe you can do the same with brew:
brew list
brew install based on the list
I hope this helps

Installing Ruby on AIX

What are some less painful ways to install Ruby on AIX?
I found out that using RVM to install Ruby might be the best option. However, installing RVM itself seems like really maddening. I found an article from IBM website on how to install RVM but there are so many prerequisites for it that I feel like it will take me days to get all that stuff installed and get working:
However, RVM does have some prerequisites. Before you continue, check your system and be sure that you have the bash, git, tar, curl, gunzip, and bunzip2 utilities installed locally. In addition, your system must have the Readline, IConv, zLib, OpenSSL, and Autoconf packages to build the Ruby interpreters. You must have the Bash shell to install RVM, but you can use RVM with the Z shell version 4.3.5 or higher after RVM is installed. git is required to automatically update RVM, and this is explained shortly.
I looked up git and it has at least 10 prerequisites (includes Python which I know has tons of prerequisites as well).
Is there any way I can install all those prerequisites in once?
http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/
I managed to get this done a couple of years ago (ruby 2.0.0).
I installed by compiling it from source as I did not have root access and wanted to install it in an afs directory anyway.
Here is my SO question and the my answer to my own question:
How do I configure ruby to compile in 64 bit mode on AIX
Here are some notes I had on how to do this as well.
if I recall using /usr/bin/ksh93 provided a huge speedup, I for get the details as to why, but using the default ksh installed on our servers was painfully slow.
export LIBPATH=/usr/lib
export CONFIG_SHELL=/usr/bin/ksh93
export OBJECT_MODE=64
./configure --enable-shared --enable-load-relative --disable-install-doc --prefix=your_install_path_here --exec-prefix=your_install_path_here/aix CC="gcc" CFLAGS="-maix64 -mminimal-toc" CXX="g++" CXXFLAGS="-maix64 -mminimal-toc" NM="nm -X64" AR="ar -X64" LDFLAGS="-maix64 -Wl,-bbigtoc" EXTLDFLAGS="-maix64 -Wl,-bbigtoc" DLDFLAGS="-shared -maix64 -Wl,-bbigtoc"
I would like to install a new version but this was really painful at the time.
Update
Another less painful way to use ruby on AIX is to install JRuby. I have done that as well, and make use of it for gui's via SWT. The biggest downside with JRuby is that it has to spin up a JVM, which takes some time. This is not a big deal for long running programs, but for short scripts it can be noticeable

Octave windows binaries including classdef

Are there any octave default branch binaries for windows available somewhere?
If not, is there a simple way of getting a version including classdef for Linux? simple, because usually I do not use Linux.
I don't think there are windows builds from default (aka development) available but you may ask on the help mailinglist. (Some users there build windows binaries with MXE from development sources)
If you want to build on GNU/Linux I would suggest Debian or Ubuntu in a VM. It is as easy as installing the dependencies, clone with hg, bootstrap, configure, make... You'll find instructions on the wiki http://wiki.octave.org/Octave_for_Debian_systems#Compiling_from_source
But always keep in mind that these are development sources which generally aren't suitable for productive use and may break sometime.
Here's how I ended up doing it (approximately and skipp'in all the failed attempts).
Install VirtualBox
Create new machine, mount ubuntu image, chose dynamic HDD size (or at least 10 GB)
Install Ubuntu. If strange mixed color screen appears on first boot:
[right] CTRL+F1
[right] CTRL+F7
Open Terminal (CTRL+ALT+T)
If sceen resolution cannot be made larger 640*480:
sudo apt-get install virtualbox-guest-dkms
sudo reboot
sudo apt-get install mercurial
hg clone http://www.octave.org/hg/octave -r default
sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-serial-dev libblas-dev liblapack-dev libfftw3-dev texi2html less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev desktop-file-utils libfltk1.3-dev libgl2ps-dev libgraphicsmagick++1-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev dh-exec libqt4-dev libqscintilla2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev llvm-3.3 (takes a while)
./bootstrap
mkdir builddir
cd builddir
../configure --enable-jit --prefix=/opt/octave3.8 JAVA_HOME=/usr/lib/jvm/default-java LLVM_CONFIG=/usr/bin/llvm-config-3.2 CFLAGS="-O2 -march=native" CXXFLAGS="-O2 -march=native" (no TargetData.h found...)
make (takes half an hour or more)
make check (takes a while, gave a failed assertion)
make install
./run-octave

Resources