HAWQ installation on Redhat - c

I am installing HAWQ on RedHat servers provisioned on Amazon EC2. I already have HDP 2.3 setup on the cluster.
I have cloned HAWQ from Github.
First I run ./configure --prefix=/opt/hawq.
In the second step, I run make.
The dependencies are compiling correctly when I run make from the root folder of incubator-hawq. The following error occours when make moves to compiling from src folder in the root directory (incubator-hawq):
make[2]: Entering directory `/root/incubator-hawq/src/port'
gcc -O3 -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations -I/usr/include/libxml2 -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/root/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include -I/root/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include -c -o copydir.o copydir.c
In file included from copydir.c:25:0:
../../src/include/storage/fd.h:61:23: fatal error: hdfs/hdfs.h: No such file or directory
#include "hdfs/hdfs.h"
^
compilation terminated.
make[2]: *** [copydir.o] Error 1
make[2]: Leaving directory `/root/incubator-hawq/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/incubator-hawq/src'
make: *** [all] Error 2
I know the compiler cannot find hdfs/hdfs.h, but as the dependencies (libhdfs3) compiled successfully, I don't understand why the particular file isn't found. Please help if somebody has come across the same problem as I am pretty much stuck here.

Could you check file /root/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include/hdfs/hdfs.h exists?
If not, then it should be build defect, please open defect to hawq team or email to: dev#hawq.incubator.apache.org. Thanks.

Do you have a folder in incubator-hawq/depends/libhdfs3/build/installafter make?
The problem seems that libhdfs3 dependency is not successfully built. There are some possible reasons for that: using a old version gcc(<4.7), configuration error of libhdfs3.
To test my words, you could try this:
cd incubator-hawq/depends/libhdfs3
mkdir build_debug && cd build_debug
cmake ..
make
If you could successfully do that, I think there is another reason for your problem. In this case, could you paste the information with more building lines?
Another possible reason is that you use different configuration prefix. In this case, you should run make distclean before another configuration.

Related

How build and run aws-iot-device-sdk-embedded-C sample?

Here is aws-iot-device-sdk-embedded-C sample. But when I invoke make command I got error like:
~/environment/aws-iot-device-sdk-embedded-C/samples/linux/subscribe_publish_sample ((6c99912...)) $ make
make -C ../../../external_libs/mbedTLS
make[1]: Entering directory `/home/ec2-user/environment/aws-iot-device-sdk-embedded-C/external_libs/mbedTLS'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory `/home/ec2-user/environment/aws-iot-device-sdk-embedded-C/external_libs/mbedTLS'
make: *** [all] Error 2
How build and run this sample? (I am not C developer so please provide detailed answer if possible)
The reason is missing mbedTLS library.
Please go to:
/home/ec2-user/environment/aws-iot-device-sdk-embedded-C/external_libs/mbedTLS
and have a look at it's README:
# Copy source code for mbedTLS into this directory
#
# You'll need to download mbedTLS from the official ARMmbed repository and
# place the files here. We recommend that you pick the latest version of 2.16
# LTS release in order to have up-to-date security fixes.

Error when trying to load a module into the kernel

I'm trying to load a kernel module into the kernel by running the following command,
`anthony#ubuntu:~/Desktop/kmaldetect/loadable_kernel_module$ make -C /lib/modules/$(uname -r)/build
This is the error that i get:
make: Entering directory /usr/src/linux-headers-3.19.0-25-generic'
arch/x86/Makefile:129: CONFIG_X86_X32 enabled but no binutils support
Makefile:669: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
make[1]: *** No rule to make target `arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/asm/syscalls_32.h'. Stop.
make: *** [archheaders] Error 2
make: Leaving directory `/usr/src/linux-headers-3.19.0-25-generic'
Maybe someone could help me out.
All help is appreciated.
The Makefile in kmaldetect/loadable_kernel_module seems correct, doesn't simply running make there work?

make can't find sys/signal.h

I’m trying to install m4 in MINGW
After ./configure ended normally I tried make but error was occurred.
make[1]: Entering directory `/c/src/autotools/build_m4/src'
gcc -c -DHAVE_CONFIG_H -I.. -I../../m4-1.4/src -I../../m4-1.4/src/../lib -g -O
../../m4-1.4/src/m4.c
../../m4-1.4/src/m4.c:22:24: fatal error: sys/signal.h: No such file or director
y
#include <sys/signal.h>
^
compilation terminated.
make[1]: *** [m4.o] Error 1
make[1]: Leaving directory `/c/src/autotools/build_m4/src'
make: *** [all] Error 1
signal.h is in \c\mingw\include that is set in PATH environment.
How can I tell make where signal.h is?
Converting a comment into an answer:
On most Unix systems, the file /usr/include/signal.h contains #include <sys/signal.h>. It seems that m4 is assuming that there will be a <sys/signal.h> — presumably without having autoconf check that it exists. This could be a bug in (the configuration process for) m4, or it could be a problem with your setup.
Have you been able to compile other GNU programs before? Is there a directory /c/mingw/include/sys (or \c\mingw\include\sys)? If not, you may be able to get going by creating a sys subdirectory in \c\mingw\include (if it is missing) and copying signal.h into it. But it is a hack workaround for a probable bug.
If this works — as it seems to — check whether your MinGW installation was correct and up to date. If so, report the problem to the maintainers of m4 (email bug-m4 at gnu.org), but check the web site for instructions on how to do that.
Consider removing the copied signal.h as it wasn't there originally. OTOH, you may need it again in the future — but personally, I'd feel happier if the installation were in its pristine state normally and the hack was only made when absolutely necessary.

u-boot cross compile, fatal error: stdint.h

There is a strange error here, trying to cross compile for ARM on Linux Mint. I used:
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_config
make ARCH=arm CROSS_COMPILE=${CC}
make[1]: Leaving directory `/root/bbb/u-boot/arch/arm/cpu/armv7'
make[1]: Entering directory `/root/bbb/u-boot/board/ti/am335x'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/bbb/u-boot/board/ti/am335x'
make -C tools all
make[1]: Entering directory `/root/bbb/u-boot/tools'
gcc -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include /root/bbb/u-boot/include/libfdt_env.h -idirafter /root/bbb/u-boot/include -idirafter /root/bbb/u-boot/include2 -idirafter /root/bbb/u-boot/include -I /root/bbb/u-boot/lib/libfdt -I /root/bbb/u-boot/tools -DCONFIG_SYS_TEXT_BASE=0x80800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE -pedantic -c -o crc32.o /root/bbb/u-boot/lib/crc32.c
In file included from /root/bbb/u-boot/include/compiler.h:19:0,
from /root/bbb/u-boot/include/libfdt_env.h:12,
from <command-line>:0:
/usr/lib/gcc/i686-linux-gnu/4.8/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
# include_next <stdint.h>
^
compilation terminated.
I also have exported ARCH and CROSS_COMPILE but I compiled u_boot without last week on other machine without a problem Seems to be a cross compiler problem but it is the same Linaro un-tar-ed in some location.
Any idea? Thanks very much.
Why is your u-boot source tree in /root/ ? Are you logged as root when executing make?
Are you sure you want to compile u-boot as a root ? because you don't need to.
As I was trying to understand what is going wrong here, I recognized some lines here http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-ARMCrossCompiler:GCC
I hope you understood each line you executed because you need to execute them one after the other to have the compilation working.
Regarding the wiki, try this way :
export CROSS_COMPILE=/path/to/the/directory/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-
Then you can just :
make ARCH=arm distclean
make ARCH=arm am335x_evm_config
make ARCH=arm
Note that you will have to export the CROSS_COMPILE variable each time you open a new console.
I hope I helped you.
Try installing libc6-dev with all dependency. It solved the problem for me.
$ sudo apt-get install libc6-dev
sudo apt-get install libnewlib-arm-none-eabi

Building binutils with debugging mode

I'm trying to build binutils 2.21 source code with debugging on. My main aim is to debug objdump actually. But in order to build it I think I have to build whole package.
Unfortunately there is no debugging option on the configure file. I tried adding -g and -ggdb to CFLAGS before I configure it. However the error was:
Configuring in ./intl
configure: loading cache ./config.cache
configure: error: `CFLAGS' has changed since the previous run:
configure: former value: `-g -O2 -D__USE_MINGW_ACCESS'
configure: current value: `-g -D__USE_MINGW_ACCESS'
configure: error: in `/c/binutils-2.21/intl':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-intl] Error 1
make[1]: Leaving directory `/c/binutils-2.21'
make: *** [all] Error 2
I tried "make clean" and "make distclean" but I'm receiving the same error. Actually according to former CFLAGS it had -g option on before but when I try to open objdump.exe in gdb it says
Reading symbols from c:\binutils-2.21\binutils/objdump.exe...
(no debugging symbols found)...done.
Thank you in advance.
Yes I've tried a lot. As I said -g tag was on to gcc. However makefile saves all debugging enabled binaries to binutils.libs\ directory. So when I run binutils.libs\objdump.exe under gdb it was fine. Thanks for your answer though.

Resources