Problem installing zmq on amazon linux (unable to find uuid) - linux

I'm trying to put together an AMI on EC2, and am currently stalled on building 0mq.
initially, I got this error while running ./configure
checking for uuid_generate in -luuid... no
configure: error: cannot link with -luuid, install uuid-dev.
I installed e2fsprogs-devel and linux-utils via yum, which I believe contained the required library, but still got the error above. I subsequently installed uuid-devel with yum and got no further.
Then, I created a link as below:
sudo ln -s /lib64/libuuid.so.1.3.0 /lib64/libuuid.so
and now ./configure completes happily, but I get an error when I run make
[...]
CXX libzmq_la-signaler.lo
CXX libzmq_la-socket_base.lo
In file included from socket_base.cpp:50:
uuid.hpp:31:23: error: uuid/uuid.h: No such file or directory
In file included from socket_base.cpp:50:
uuid.hpp:92: error: 'uuid_t' in namespace '::' does not name a type
make[2]: *** [libzmq_la-socket_base.lo] Error 1
make[2]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make: *** [all-recursive] Error 1
The following is the beginning of /usr/include/uuid.h, if that's useful.
#ifndef __UUID_H__
#define __UUID_H__
/* workaround conflicts with system headers */
#define uuid_t __vendor_uuid_t
#define uuid_create __vendor_uuid_create
#define uuid_compare __vendor_uuid_compare
#include <sys/types.h>
#include <unistd.h>
#undef uuid_t
#undef uuid_create
#undef uuid_compare
I'm pretty well stumped at this point.

As pointed out on https://bugzilla.redhat.com/show_bug.cgi?id=576296#c0, use libuuid-devel instead of uuid-devel,
$ sudo yum install libuuid-devel
This resolved the missing /usr/include/uuid/uuid.h file for me.

ultimately, I satisfied the dependency by running
$ yum install uuid-devel
also worth noting is that to get libzmq to link into the other programs that needed it down the line (Mongrel2, for example), I had to add the line
/usr/local/lib
to /etc/ldconfig.so.conf and run
$ ldconfig -v | grep zmq
(if you don't see an entry for libzmq.so in the output, something's off)

Alternatively, read the documentation on installing zeromq! :)
i.e.
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
As mentioned, on Amazon Linux, you'd install deps by doing:
sudo yum install uuid uuid-devel
N.B. the instructions also mention the requirement to do:
sudo ldconfig
after install too.

Related

make ARCH=x86_64 CROSS_COMPILE ....... Error 2 while installing rtl8723de wifi drivers

I was trying to install rtl8712de wifi drivers in my Debian 10 PC.
I tried the following code:
sudo apt update
git clone https://github.com/smlinux/rtl8723de.git
cd rtl8723de
make
After I ran the make command, I got the following error:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules//build M=/home/dantu/Downloads/rtl8723de modules
make[1]: *** /lib/modules//build: No such file or directory. Stop.
make: *** [Makefile:1886: modules] Error 2
I tried so many steps online. I installed gcc build tools, updated all my packages, tried other repositories for the wifi drivers. But nothing seems to help.
It might solve the problem to change all occurrences of /lib/modules//build inside the Makefile with /lib/modules/build or /lib/modules/your_kernel_version/build. //build seem like a typo.

Included standard libraries not found by ARM cross-compiler

I'm trying to do cross-compilation for an ARM a8 processor. I'm moving the code base to a new system, and therefore it should be installed using the same compiler and makefiles as the original system.
I know that I'm using a arm-linux-gnueabihf-gcc compiler.
I've installed the following packages:
> sudo apt install gcc-arm-linux-gnueabihf
> sudo apt install binutils-arm-linux-gnueabi
When I compile the following code block:
#include <stdio.h>
// filename: simple.c
int main(void)
{
printf("I'm printing!\n");
return;
}
with this command:
> arm-linux-gnueabihf-gcc simple.c
I expect it to compile at this step. I instead get:
In file included from simple.c:1:0:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
#include <bits/libc-header-start.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Any help would be appreciated! Thank you!
I think what you are missing is the multilib packets, if I'm right, this should do the trick for you.
sudo apt install gcc-multilib g++-multilib

How do I build the ManDVD package from compressed source on Linux?

When I try to install any compressed file into Linux I never can, because:
When I execute ./configure the system says bash: ./configure: No such file or directory.
When I execute sudo ./configure the system says sudo: ./configure: command not found.
Worst , when I execute make the system says make: *** No rule to make target '/usr/lib64/qt-3.3/mkspecs/default/qmake.conf', needed by 'Makefile'. Stop.
With make install the system says make: *** No rule to make target '/usr/lib64/qt-3.3/mkspecs/default/qmake.conf', needed by 'Makefile'. Stop.
Completion: I can't install nothing that is not in the repository into my system.
Note: I use Linux Mint XFCE 13 (Maya).
What can I do to solve this unpleasant problem?
As ManDVD's Makefile says:
#############################################################################
# Makefile for building: mandvd
# Generated by qmake (1.07a) (Qt 3.3.8b) on: Sun Mar 8 18:32:50 2009
# Project: mandvd.pro
# Template: app
# Command: $(QMAKE) -o Makefile mandvd.pro
#############################################################################
Makefile was autogenerated by qmake.
I'm no expert at using qmake, but I think executing qmake will re-generate Makefile, so then you can run make && sudo make install as INSTALL file says.
You should've already discovered project is kind of messy (if not discontinued at all), so take care, and may the force be with you :)

lfs 7.2 compilation of glibc 2.16.0

I am making an linux system following the procedure in lfs. But while i was following the fifth step(i.e. the one before make) on this page, i get an error at the last.
configure: error: linker with -z relro support required
Now after this if i call make i get an error
make: *** No targets specified and no makefile found. Stop.
I am running this on a ubuntu 12.04 machine.
How to fix this error?
Do the following:-
sudo apt-get install gawk
and then retry. This worked for me.

Error while building glibc

I'm trying to install glibc to debug a C-framework I'm working on. But, I'm getting an error in the build process. Here's the error msg:
make[3]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
/usr/bin/install -c /root/glibc-2.14-build/elf/ld.so /usr/local/myglibc/lib/ld-2.14.so.new
mv -f /usr/local/myglibc/lib/ld-2.14.so.new /usr/local/myglibc/lib/ld-2.14.so
/usr/bin/install -c /root/glibc-2.14-build/libc.so /usr/local/myglibc/lib/libc-2.14.so.new
mv -f /usr/local/myglibc/lib/libc-2.14.so.new /usr/local/myglibc/lib/libc-2.14.so
echo ld-2.14.so /usr/local/myglibc/lib/ld-linux-x86-64.so.2 >> /root/glibc-2.14-build/elf/symlink.list
/usr/bin/install -c /root/glibc-2.14-build/elf/sotruss-lib.so /usr/local/myglibc/lib/audit/sotruss-lib.so.new
mv -f /usr/local/myglibc/lib/audit/sotruss-lib.so.new /usr/local/myglibc/lib/audit/sotruss-lib.so
make[2]: *** No rule to make target `/root/glibc-2.14-build/dlfcn/libdl.so.2', needed by `/root/glibc-2.14-build/elf/sprof'. Stop.
make[2]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/root/glibc-source/glibc-2.14'
make: *** [install] Error 2
Is this a known problem?
I had built glibc on the same machine earlier last week without any errors. I'm rebuilding it because glibc is compiled with optimization level 2(-O2) by default and I'm unable to look into the values of a few variables inside the library functions from the code dump as they've been optimized out. I'm currently trying to compile with optimization level 1.
Thanks
It looks like you are trying to make install, without first doing a successful make all.
This is for the benefit of anyone who might be trying to build glibc on their ubuntu box.
I went through the following problems and resolved them the following way.
These problems were encountered in ubuntu 12.04
I created a directory glib-build on the same level as the glib-VERSION and ran the following command
$> ../glibc-2.16.0/configure --prefix=/home/gugovind/tsapp/glibc/glibc-build/
that gave me the following error that makeinfo is missing.
for that
$>sudo apt-get install texinfo
will resolve the problem.
It threw and error about LD_LIBRARY_PATH having the current directory (even if it does not exist)
for that run the following in your command prompt
$>set LD_LIBRARY_PATH
this will clear the LD_LIBRARY_PATH only for that console temporarily. Then run the configure again.
You might encounter another problem with configure..
"function strtonum never defined"
look at the config.log file and it might be missing mawk or gawk. install them using
sudo apt-get install gawk
This should get you through the configure part.
now run
make all
if in case you encounter a particular file not compiling.. just copy the gcc ... before that and paste it in the command prompt again after you have cd to that directory (the command lines before the error should tell you where to go.)
make install
You might get a warning about not able to find etc/ld.config... file. ignore that..
you are all set now.

Resources