Redis installation error on CentOS 5.8 - compilation

I was trying to compile Redis 2.6.4 on CentOS 5.8 but I was getting the following error after running make
zmalloc.o: In function zmalloc_used_memory':
/root/redis-2.6.4/src/zmalloc.c:223: undefined reference to
__sync_add_and_fetch_4' collect2: ld returned 1 exit status make[1]:
* [redis-server] Error 1 make[1]: Leaving directory `/root/redis-2.6.4/src' make: * [all] Error 2
I also tried CFLAGS= -march=i686 in the src/Makefile but did not work. Actually, I don't know where to put it. I put at the top of the file.

1 add CFLAGS= -march=i686 to src/Makefile top
2 change src/.make_settings OPT=-O2 into OPT=-O2 -march=i686
3 then make 32bit
4 make test
That works for me.
Ps. maybe you would got tcl problem
1 rpm -qa | grep tcl to see whether tcl version is blow 8.5
2 if so yum remove tcl
3 go to http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html to got a newest one and install
4 go to redis directory make test

Ok, I got it done. I run the following command which seems worked correctly (though later I need to install tcl8.5).
make 32bit

As #HungryCoder said, simple "make 32bit" command would work.
But sometimes, if your have already run into error, you'd better remove files named .make* before running it.
make distclean
make
If it didn't help, try to figure out your CPU arch manually by run the following:
export CFLAGS=`uname -m`
make distclean
make

I had some issues compiling it and I solved by first installing the following dependencies:
sudo yum -y install libstdc++*
sudo yum -y install libstdc++*.i686
Then I could run the proper make without any problem
make 32bit
I hope this helps someone.

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,

How to install unison from source on macOS

I was wondering whether somebody managed to install unison's latest version from source, on its macOS machine (Here I am trying with Catalina). I followed the steps here :
I verified that I had XCode installed (otherwise forget about compiling anything :)
I cloned the official Git repository by running
git clone https://github.com/bcpierce00/unison.git
I moved to the newly created directory unison
cd unison
As mentionned in the documentation I then ran the make command telling it to build the text UI:
make UISTYLE=text
Result should have been an executable file called unisonbut instead of this I got the following error :
Blablabla$ make UISTYLE=text
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src UISTYLE=text
UISTYLE = text
Building for Unix
NATIVE = true
THREADS = false
STATIC = false
OSTYPE =
OSARCH = osx
ocamlopt: ubase/rx.mli ---> ubase/rx.cmi
ocamlopt -g -unsafe-string -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -ccopt -mmacosx-version-min=10.6 -c /Users/Shared/unison/src/ubase/rx.mli
make[1]: ocamlopt: No such file or directory
make[1]: *** [ubase/rx.cmi] Error 1
make: *** [text] Error 2
I then wondered whether XCode might not carry with him an OCaml compiler. So I installed the official one using MacPort therefore running:
sudo port install ocaml
sudo port install opam
I then rerun the same make command
make UISTYLE=text
This time the result looked better and ended with:
/Applications/Xcode.app/Contents/Developer/usr/bin/make tags
if [ -f "`which etags`" ]; then \
etags *.mli */*.mli *.ml */*.ml */*.m *.c */*.c *.txt \
*Makefile* \
; fi
However, still no unison file visible anywhere.
Question is ... since there is no error message, where is this executable?
Re-hello people from the Internet,
I managed to help myself here and got a nice and fresh unison executable on my macOS Catalina computer.
Basically, the base make tries to move the compilation product into /Users/<your_user>/bin/. which makes sense I guess, but is rarely used by us macOS users. So here is what I did to fix the issue :
Create the bin directory into your home
mkdir ~/bin
Re run the make by doing
make UISTYLE=text
Verify you have the executable by asking its version:
~/bin/unison -version
Happy me, I got the expected message back from my terminal:
unison version 2.51.3 (ocaml 4.08.1)
Hope it can help somebody.

ERROR (make: *** No rule to make target `check'. Stop.)

I want to download an API called libtrading, the process to download it in terminal is as the follows,
OSX
$ brew install libevent glib pkgconfig
$ pip install pyyaml
Then run:
$ make install
You can also run the test harness:
$ make check
I have successfully processed the first two steps, but when I put 'make install' and 'make check', it always says (make: *** No rule to make target `check'. Stop. )
Does anyone know how can I solve the problem? Is it because some file path is needed here? but I don't know what is it.
Thanks in advance!

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