how to install from source code on mac terminal - macos

I'm trying to install a software named "pigz" on mac . after downloading the source code, in terminal I go to the folder containing source code then I run make. when I try to install it with sudo make install I get this message
make: *** No rule to make target `install'. Stop.
or when I try to install it with brew
brew install pigz
I get this error
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/pigz-2.4.catalina.bottle.ta
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.
##O=# #
curl: (6) Could not resolve host: homebrew.bintray.com
Error: Failed to download resource "pigz"
Download failed: https://homebrew.bintray.com/bottles/pigz-2.4.catalina.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://zlib.net/pigz/pigz-2.4.tar.gz
######################################################################## 100.0%
==> make CC=clang CFLAGS=
🍺 /usr/local/Cellar/pigz/2.4: 7 files, 154KB, built in 4 seconds
since I'm very new to command line I really don't know what this means and what I should do
I would appreciate your help

In the source code that you're looking at, there is a Makefile. When you run the command make, it executes the first default rule that it sees within that file.
When you run the command sudo make install, it looks inside of the Makefile and looks for the install rule. However, if you look at the Makefile of the software you're looking at, there is no install rule, hence the reason you get the error message:
make: *** No rule to make target `install'. Stop.
This is simply because there is no rule to install anything, so when you run that command, it simply will not do anything.
You can get a better understanding of this stuff by searching online about what Makefiles are, you'll find a bunch of resources. This can be a good starting point.

Related

rJava not installing on new laptop

Just received a new GTX laptop, and for whatever reason, I am simply not able to install rJava. No matter what I do with the Java and JDK installs, I get the following message. I have been uninstalling, rebooting, re-installing, Java (latest versions) and RTools, and yet, I still cannot get rJava to install.
I am using Rstudio as my gui, and I have been able to successfully install rJava on an Ubuntu machine, but for whatever reason, I cannot get this to work on my windows GPU laptop.
I realize this is a question that appears to have been answered in other threads, but I am not seeing the same situation as mine. Something is different, and I can't figure it out.
What else can I provide to help someone help me?
* installing *source* package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked
** using staged installation
Generate Windows-specific files (src/jvm-w32) ...
make: Entering directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/src/jvm-w32'
C:/Rtools/mingw_64/bin/dlltool --as C:/Rtools/mingw_64/bin/as --input-def jvm64.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
C:/Rtools/mingw_64/bin/gcc -O2 -c -o findjava.o findjava.c
C:/Rtools/mingw_64/bin/gcc -s -o findjava.exe findjava.o
make: Leaving directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/src/jvm-w32'
Find Java...
JAVA_HOME=C:/PROGRA~1/Java/jdk-14
=== Building JRI ===
JAVA_HOME=C:/PROGRA~1/Java/jdk-14
R_HOME=C:/PROGRA~1/R/R-36~1.3
JDK has no javah.exe - using javac -h . instead
Creating Makefiles ...
Configuration done.
make -C src JRI.jar
make[1]: Entering directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/jri/src'
C:/PROGRA~1/Java/jdk-14/bin/javac -h . -d . ../RList.java ../RBool.java ../RVector.java ../RMainLoopCallbacks.java ../RConsoleOutputStream.java ../Mutex.java ../Rengine.java ../REXP.java ../RFactor.java ../package-info.java
..\Rengine.java:120: error: invalid use of a restricted identifier 'yield'
while (!alive && !died) yield();
^
(to invoke a method called yield, qualify the yield with a receiver or type name)
1 error
make[1]: *** [Makefile.all:41: org/rosuda/JRI/Rengine.class] Error 1
make[1]: Leaving directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/jri/src'
make: *** [Makefile.all:19: src/JRI.jar] Error 2
**** WARNING: JRI could NOT be built
Set IGNORE=1 if you want to build rJava anyway.
ERROR: configuration failed for package 'rJava'
* removing 'C:/Users/bfcgl/OneDrive/Documents/R/win-library/3.6/rJava'
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
I had the same problem (although installing for the first time on an old laptop) and can confirm that JDK 11 solved the problem
I still looking for the same problem resolution, meanwhile, I tried with Java JDK 11 and I succeed in RStudio. If this helps, try it. I will keep searching for the answer why the new version is not working.
Regards,

Error building latest linux kernel within VirtualBox under 18.04.1-Ubuntu

I am trying to build the latest Linux kernel (GitHub) using a Oracel VM and a 18.04.1-Ubuntu image.
I installed the need packages and probably even more. Here is a part of the packages I installed:
sudo apt-get update
sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc bison flex libelf-def kernel-package
The full list can be found here.
I ran the following commands in the linux folder after cloning the repository from GitHub.
$ cp /boot/config-$(uname -r) .config
$ make menuconfig
scripts/kconfig/mconf Kconfig
.config:1118:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE
.config:1923:warning: symbol value 'm' invalid for NET_DEVLINK
.config:7865:warning: symbol value 'm' invalid for ASHMEM
.config:8724:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC
.config:8725:warning: symbol value 'm' invalid for ANDROID_BINDERFS
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
I save and exited menuconfig. And finally make leads to the following error.
$ make -j2
Makefile:608: include/config/auto.conf: No such file or directory
Makefile:660: include/config/auto.conf.cmd: No such file or directory
HOSTCC scripts/kconfig/conf.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --syncconfig Kconfig
*** Error during sync of the configuration.
scripts/kconfig/Makefile:73: recipe for target 'syncconfig' failed
make[2]: *** [syncconfig] Error 1
Makefile:562: recipe for target 'syncconfig' failed
make[1]: *** [syncconfig] Error 2
Makefile:678: recipe for target 'include/config/auto.conf.cmd' failed
make: *** [include/config/auto.conf.cmd] Error 2
make: *** Deleting file 'include/config/auto.conf.cmd'
Looks like make is expecting some additional configuration files include/config/auto.conf. Does anyone have a clue for me.
Thanks!
Trying to compile kernel 5.6.3 as non-root, I ran into this exact problem.
Running the suggestion from Oandiy's comment
git clean -xdf
revealed that I had files in my source tree that were owned by root and could not be deleted. Looking in my history I found,
sudo make localmodconfig # DO NOT DO THIS
which had installed files, as root, in include/config/* and include/generated/autoconf.h.
To see if you have the same problem, run
sudo find . -uid 0
or just look at the error messages of git clean -xdf (there shouldn't be any).
After deleting all files and directories owned by root, I recovered from this deadlock with:
unset ARCH
cp .config ../config.backup # If you still have this.
git clean -xdf # No errors (this also deletes .config)
cp ../config.backup .config # Or generate a new one *).
make olddefconfig # Printed at the end: 'No change to .config'
Note that I needed to clear ARCH from my environment.
After this I went on as usual,
VERSION=5.6.3 # I have checked out tag v5.6.3 **)
FLAVOUR=lowlatlocxhci # Or whatever you want to call your kernel.
make -j8 deb-pkg LOCALVERSION=-$FLAVOUR
sudo dpkg -i ../linux-headers-$VERSION-${FLAVOUR}_$VERSION-$FLAVOUR-1_amd64.deb ../linux-image-$VERSION-${FLAVOUR}_$VERSION-${FLAVOUR}-1_amd64.deb
The last command fails to compile virtualbox kernel modules at the moment, but I don't care about those, and those errors can be ignored (as long as you don't use virtual box).
*) The .config used was prepared by booting to a kernel with everything (ie, a dist. kernel), copying its config from /boot to the source tree and running make localmodconfig after making sure all kernel modules that I needed where loaded (by running those applications that cause such modules to be loaded). And finally running make menuconfig to turn off CONFIG_DEBUG_INFO in this kernel and to turn a few things that are normally built into the kernel into modules as well (which I needed for some reason).
**) My git tree has been prepared with:
VERSION=5.6.3
FLAVOUR=lowlatlocxhci
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-$VERSION-$FLAVOUR-$VERSION-$FLAVOUR
cd linux-$VERSION-$FLAVOUR-$VERSION-$FLAVOUR
git checkout -b test_$FLAVOUR v$VERSION
# Make manual changes here, and commit as usual.

Smokeping make install error

i try to install newest version smokeping and get error when run "make install". I do everything as written on the official website.
make[1]: Entering directory '/home/artemto/smokeping-2.7.2/thirdparty'
echo "If the moduile install hangs, this may be because one of the modules expects you to press [return] without telling you ... just do it!"
If the moduile install hangs, this may be because one of the modules expects you to press [return] without telling you ... just do it!
GEN touch
! Installing FCGI failed. See /home/artemto/smokeping-2.7.2/thirdparty/work/1533497827.2903/build.log for details. Retry with --force to force install it.
CGI is up to date. (4.38)
CGI::Fast is up to date. (2.13)
Config::Grammar is up to date. (1.12)
! Configure failed for Socket6-0.28. See /home/artemto/smokeping-2.7.2/thirdparty/work/1533497827.2903/build.log for details.
IO::Socket::SSL is up to date. (2.056)
Digest::HMAC_MD5 is up to date. (1.01)
Net::Telnet is up to date. (3.04)
Net::OpenSSH is up to date. (0.77)
Net::SNMP is up to date. (v6.0.1)
! Installing Text::Soundex failed. See /home/artemto/smokeping-2.7.2/thirdparty/work/1533497827.2903/build.log for details. Retry with --force to force install it.
! Couldn't find module or a distribution GSSAPI
! Installing the dependencies failed: Module 'Text::Soundex' is not installed
! Bailing out the installation for perl-ldap-0.65.
Net::DNS is up to date. (1.15)
! Configure failed for IO-Tty-1.12. See /home/artemto/smokeping-2.7.2/thirdparty/work/1533497827.2903/build.log for details.
LWP is up to date. (6.33)
Authen::Radius is up to date. (0.26)
Path::Tiny is up to date. (0.104)
Makefile:410: recipe for target 'touch' failed
make[1]: *** [touch] Error 123
make[1]: Leaving directory '/home/artemto/smokeping-2.7.2/thirdparty'
Makefile:363: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Problem solved, sorry for make this quickly post
apt install gcc
I get similar problem on Debian 9.5 and smokeping-2.7.2.tar.gz .
Installed the following packages prior to compilation and I assume some other package is missing but which?
apt-get install rrdtool curl perl make gcc
curl is already the newest version (7.52.1-5+deb9u6).
gcc is already the newest version (4:6.3.0-4).
make is already the newest version (4.1-9.1).
perl is already the newest version (5.24.1-3+deb9u4).
rrdtool is already the newest version (1.6.0-1+b2).
...
Successfully installed Data-HexDump-0.02
Successfully installed Authen-Radius-0.26
Successfully installed Path-Tiny-0.104
37 distributions installed
Makefile:410: recipe for target 'touch' failed
make[1]: *** [touch] Error 123
make[1]: Leaving directory '/home/cisadmin/smokeping/thirdparty'
Makefile:363: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
root#l-mog-horch:/home/cisadmin/smokeping#
EDIT
It works fine with 2.7.1 so something is wrong in the 2.7.2 package...

Make Julia Installing: it shows hashing.o not found?

I had installed Julia 0.4.5 with sudo apt install julia. Now I want to install the latest version of Julia v0.6.0. First I git clone the source code from the Github, then I install lots of the dependencies following the installing instruction. And all is fine.
When I start to make, waiting a long time, and it show:
Making install in TESTS
Making install in EXAMPLES
Making install in BAND
Making install in COMPLEX
Making install in NONSYM
Making install in SIMPLE
Making install in SVD
Making install in SYM
make[2]: *** No rule to make target '/home/yaoyu/julia/src/support/hashing.o', needed by '/home/yaoyu/julia/src/support/libsupport.a'. Stop.
Makefile:208: recipe for target 'support/libsupport.a' failed
make[1]: *** [support/libsupport.a] Error 2
Makefile:55: recipe for target 'julia_flisp.boot.inc.phony' failed
make: *** [julia_flisp.boot.inc.phony] Error 2
I have searched for answers in this web, while cann't find the way to fix it, I don't know what causes that ? Anyone konws how to correct it? Thanks a lot.

FreeBSD make error File 5.19 supports only version 12 magic files. /usr/share/misc/magic.mgc is version 8

I'm having trouble reinstalling ProFTPD on a FreeBSD 10.1 setup. The server is newly upgraded from 10.0 to 10.1. When I start the make install clean process, these warnings first shows on screen.
===> proftpd-1.3.5_4 depends on shared library: libpcre.so
/usr/share/misc/magic, 93: Warning: Printf format `l' is not valid for type `lelong' in description `, %ld pages'
...
/usr/share/misc/magic, 15118: Warning: Printf format `l' is not valid for type `belong' in description `Volume %ld,'
/usr/share/misc/magic, 15609: Warning: Current entry does not yet have a description for adding a MIME type
file: File 5.19 supports only version 12 magic files. `/usr/share/misc/magic.mgc' is version 8
[: =: unexpected operator
- not found
And after i while, the make process stops with this error:
/bin/ln -s libpcre.so.1 /usr/ports/devel/pcre/work/stage/usr/local/lib/libpcre.so.3
====> Compressing man pages (compress-man)
===> Installing for pcre-8.35_2
===> Checking if pcre already installed
===> pcre-8.35_2 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of pcre
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
Stop.
make[3]: stopped in /usr/ports/devel/pcre
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/devel/pcre
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/ftp/proftpd
*** Error code 1
Stop.
make: stopped in /usr/ports/ftp/proftpd
Seems that the file /usr/share/misc/magic.mgc is of a wrong version?
This might happens when I was upgrading from 10.0-RELEASE-p12 to 10.1-RELESE-p1?
If i run make install clean of the ProFTP port, and disable support for pcre, the process and install is successful.
But I believe that something is still broken?
My programming skills are limited, and also this level of error.
Please let me know if you have any ideas,
Thanks,
First of all, proftpd 1.3.5 is available as a binary package, it's much simpler to install it that way (pkg install proftpd).
Second - at first it looked like a port bug; as Etan said, there is a shell syntax error (something like '[ x == y ]' instead of '[ x = y ]'); those are common, and ports contain patches to fix those. However, there is a binary package, and packages are built from ports ("make package"), so port obviously does work on package build machines. So it's probably something specific to your environment.
If you really want to build from ports, try this: first, reinstall pcre. For some reason it had to be rebuilt, but failed to install, because it's already installed. So, "cd /usr/ports/*/pcre && make clean all deinstall reinstall". That should get rid of the second error. Then go back to "../*/proftpd" and see how far it goes.
But really, I'd try packages first. They have nothing in common with old pkg_add system, and are really nice.
freebsd-update diff for FreeBSD-SA-14:28.file seems wrong, and it breaks file(1).
Therefore simply pkg install file will be a workaround.

Resources