Yocto Eclipse ADT plugin fails during configure - linux

I'm trying to use the Yocto Project Eclipse ADT plugin using the manual as a reference with a standalone pre-built toolchain created by running bitbake <recipename> -c populate_sdk, then running poky-glibc-x86_64-<recipename>-x86-toolchain-2.0.sh, specifying default locations. I've sourced the environment-setup in opt/poky/2.0. My Toolchain Root Location is pointing to /opt/poky/2.0 and my sysroot is pointing at /opt/poky/2.0/sysroots/x86-poky-linux.
I was able to compile a "Hello, world" program using this enviromnent, but with a larger project I hit errors during the Build Project step.
Here's the relevant part of my config.log:
Configured with: /home/presslertj/poky/build/tmp/work-shared/gcc-5.2.0-r0/gcc-5.2.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=i586-poky-linux --prefix=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux --sbindir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux --libexecdir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/libexec/i586-poky-linux --datadir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/lib/i586-poky-linux --includedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/presslertj/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=i586-poky-linux- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/5.2.0 --with-build-time-tools=/home/presslertj/poky/build/tmp/sysroots/x86_64-linux/usr/i586-poky-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/home/presslertj/poky/build/tmp/sysroots/piu --enable-targets=all --enable-poison-system-directories --with-mpfr=/home/presslertj/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-mpc=/home/presslertj/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --enable-nls --enable-__cxa_atexit
Thread model: posix
gcc version 5.2.0 (GCC)
configure:2971: $? = 0
configure:2960: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -V >&5
i586-poky-linux-gcc: error: unrecognized command line option '-V'
i586-poky-linux-gcc: fatal error: no input files
compilation terminated.
configure:2971: $? = 1
configure:2960: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -qversion >&5
i586-poky-linux-gcc: error: unrecognized command line option '-qversion'
i586-poky-linux-gcc: fatal error: no input files
compilation terminated.
configure:2971: $? = 1
configure:2991: checking whether the C compiler works
configure:3013: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
configure:3017: $? = 0
configure:3065: result: yes
configure:3068: checking for C compiler default output file name
configure:3070: result: a.out
configure:3076: checking for suffix of executables
configure:3083: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
configure:3087: $? = 0
configure:3109: result:
configure:3131: checking whether we are cross compiling
configure:3139: i586-poky-linux-gcc -m32 -march=pentium-m --sysroot=/opt/poky/2.0/sysroots/x86-poky-linux -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
configure:3143: $? = 0
configure:3150: ./conftest
/home/presslertj/workspace/HMM/configure: ./conftest: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
configure:3154: $? = 126
configure:3161: error: in `/home/presslertj/workspace/HMM':
configure:3163: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
I think the most important line of this might be:
/home/presslertj/workspace/HMM/configure: ./conftest: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Which looks to me like it's looking in the wrong place for ld-linux.so.2.
Also, when running build, Eclipse's terminal spits out the following lines:
ENV key HOST_CC_ARCH is NULL
ENV key TOOLCHAIN_OPTIONS is NULL
ENV key SELECTED_OPTIMIZATION is NULL
ENV key TARGET_ARCH is NULL
ENV key OECMAKE_C_LINK_FLAGS is NULL
ENV key OECMAKE_CXX_LINK_FLAGS is NULL
ENV key STAGING_DIR_HOST is NULL
ENV key STAGING_DIR_NATIVE is NULL
ENV key CROSS_DIR is NULL
ENV key OECMAKE_EXTRA_ROOT_PATH is NULL
ENV key EXTERNAL_TOOLCHAIN is NULL
ENV key STAGING_DATADIR is NULL
I'm guessing that one of these variables needs to be specified so that ld-linux.so.2 is found but I don't know which, and I feel like I might've missed some critical step. What is causing this error? Have I misconfigured my environment?

As read in How to fix /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory:
This will happen only on 64 bit systems, the cause is the fact that 32
bit libraries are missing from the system, so you can easily fix this
issue by installing the 32 bit libraries on your system.
So if you encounter this error /lib/ld-linux.so.2: bad ELF
interpreter: No such file or directory this is how you can fix it:
To fix it:
On any RPM based distribution (CentOS/RedHat/Fedora/Suse/Mandriva):
yum -y install glibc.i686
On any DEB based distribution (Debian/Ubuntu/Mint/Crunchbang):
apt-get update
apt-get install ia32-libs

Related

Unable to cross-compile dropbear for uclibc

I am trying to cross-compile Dropbear for an x86 machine where glibc is missing and instead, uclibc is being used. For that aim, I have cross-compiled zlib for this same instruction set using a custom crosstool-ng toolchain and installed it to a custom location.
msainz#ubuntu:~$ ls Projects/zlib_install/lib
libz.a libz.so libz.so.1 libz.so.1.2.11 pkgconfig
I have copied Projects/zlib_install/include/zlib.h and Projects/zlib/include/zconf.h to Projects/dropbear/zlibincludes/.
I've set my env variables this way:
msainz#ubuntu:~$ echo $PATH
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
/usr/local/games:/snap/bin:/home/msainz/x-tools/x86_64-multilib-linux-uclibc/bin
msainz#ubuntu:~/Projects/dropbear$ echo $LDFLAGS
/home/msainz/Projects/zlib_install/lib/libz.a
msainz#ubuntu:~/Projects/dropbear$ echo $CFLAGS
-Izlibincludes -I../zlibincludes
I launch the configure script this way: ./configure --prefix=/home/msainz/Projects/tmp_top_dir --host=x86
The execution terminates with the following error:
configure:4851: x86_64-multilib-linux-uclibc-gcc -o conftest -Izlibincludes -I../zlibincludes -Wno-
pointer-sign -fno-strict-overflow -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mfunction-
return=thunk -mindirect-branch=thunk /home/msainz/Projects/zlib_install/lib/libz.a -pie -Wl,-z,now -
Wl,-z,relro conftest.c -lz >&5
/home/msainz/x-tools/x86_64-multilib-linux-uclibc/bin/../lib/gcc/x86_64-multilib-linux-
uclibc/8.3.0/../../../../x86_64-multilib-linux-uclibc/bin/ld.bfd: cannot find -lz
collect2: error: ld returned 1 exit status
Any ideas to solve this? Thanks in advance.
Solved the problem adding --with-zlib=/home/msainz/Projects/zlib_install/ to the ./configure call.

When I `make` darknet with CUDA=1, `/usr/bin/ld: cannot find -lcuda`occured. How to fix it without root permission

I'm trying to train YOLOv4 with darknet on a computing cluster. But when I make the darknet, it occured that:
/usr/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
make: *** [darknet] Error 1
This computing cluster can load software with module load. For example, when I need CUDA10.2, just run module load devel/cuda/10.2.
So that means the files of CUDA still locate in the system directory, and I don't have the access to modify any of it.
In this case, how can I fix this problem?
More detail about this error:
[usr#*hpc darknet]$ make
chmod +x *.sh
g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include obj/image_opencv.o obj/http_stream.o obj/gemm.o obj/utils.o obj/dark_cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/gaussian_yolo_layer.o obj/upsample_layer.o obj/lstm_layer.o obj/conv_lstm_layer.o obj/scale_channels_layer.o obj/sam_layer.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread `pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv` -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn/lib64 -lcudnn -lstdc++
/usr/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
make: *** [darknet] Error 1
On a machine with a GPU (and driver) installed, the -lcuda dependency can usually be satisfied because the driver installs the libcuda.so (or equivalent on windows) in the link search path (typically).
However on a machine with no GPU installed (e.g. a login node or build machine in a cluster) the driver won't be installed and therefore libcuda.so won't be in the "usual place".
In these situations, "stub" libraries are provided, usually in the /stubs directory off the CUDA toolkit library install directory (e.g. /usr/local/cuda/lib64).
Therefore, if you change your Makefile at this line to read:
LDFLAGS+= -L/usr/local/cuda/lib64 -lcudart -lcublas -lcurand -L/usr/local/cuda/lib64/stubs -lcuda
it should allow that library to be located.

Error when I compile 'hello-world' example from Contiki

I have installed the Contiki OS sources, and the ARM GCC compiler by doing brew install arm-none-eabi-gcc. However, when I try to run the hello world example in Contiki's example folder using the command make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 hello-world.bin CPU_FAMILY=cc26xx, I get the following error message:
CC ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
arm-none-eabi-gcc: error: unrecognized -march target: core2
arm-none-eabi-gcc: note: valid arguments are: armv4 armv4t armv5t armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2
arm-none-eabi-gcc: error: missing argument to '-march='
arm-none-eabi-gcc: error: unrecognized command line option '-mssse3'
make: *** [obj_srf06-cc26xx/ccfg.o] Error 1
I triple-checked that the ARM GCC compiler is accessible from the terminal by doing arm-none-eabi-gcc --version, and I can see that it is properly installed:
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So I am really not sure what might be wrong here. Can anyone help?
My operating system is macOS Mojave Version 10.14.6.
UPDATE: The makefile is given in the example folder (from contiki):
CONTIKI_PROJECT = hello-world
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
include $(CONTIKI)/Makefile.include
UPDATE 2: By adding V=1 in the command, my output is:
arm-none-eabi-gcc -march=core2 -mtune=haswell -mssse3 -ftree-vectorize
-fPIC -fPIE -fstack-protector-strong -O2 -pipe -DCONTIKI=1
-DCONTIKI_TARGET_SRF06_CC26XX=1 -DNETSTACK_CONF_WITH_IPV6=1
-DUIP_CONF_IPV6_RPL=1 -DBOARD_SENSORTAG=1 -DBACKDOOR_IOID=0x00000000
-I../../cpu/cc26xx-cc13xx/lib/cc26xxware -I../../cpu/cc26xx-cc13xx
/lib/cc26xxware/driverlib -I../../cpu/cc26xx-cc13xx/lib/cc26xxware/inc
-mcpu=cortex-m3 -mthumb -mlittle-endian -ffunction-sections -fdata-sections
-fshort-enums -fomit-frame-pointer -fno-strict-aliasing -Wall -std=c99 -O2
-I. -I../../platform/srf06-cc26xx/. -I../../platform/srf06-cc26xx
/sensortag/cc2650 -I../../platform/srf06-cc26xx/sensortag -I../../platform
/srf06-cc26xx/common -I../../cpu/cc26xx-cc13xx/. -I../../cpu/cc26xx-cc13xx/dev
-I../../cpu/cc26xx-cc13xx/rf-core -I../../cpu/cc26xx-cc13xx/rf-core/api -I../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files -I../..
/cpu/cc26xx-cc13xx/../arm/common/dbg-io -I../../core/dev -I../../core/lib -I../../core/net -I../../core/net/llsec -I../../core/net/mac -I../..
/core/net/rime -I../../core/net/rpl -I../../core/sys -I../../core/cfs
-I../../core/ctk -I../../core/lib/ctk -I../../core/loader -I../../core/. -I../../core/sys -I../../core/dev -I../../core/lib -I../../core/net/ipv6 -I../../core/net/ip -I../../core/net/rpl -I../../cpu/cc26xx-cc13xx
/lib/cc26xxware/driverlib -I../../core/net -I../../core/net/mac -I../..
/core/net/mac/contikimac -I../../core/net/llsec -I../../platform/srf06-
cc26xx/ -I../.. -DCONTIKI_VERSION_STRING=\"Contiki-3.x-3345-g32b5b17\"
-include "contiki-conf.h" -c ../../cpu/cc26xx-cc13xx/lib/cc26xxware
/startup_files/ccfg.c -o obj_srf06-cc26xx/ccfg.o
UPDATE 3: If I do unset CFLAGS, I get a new error message:
/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: hello-world.elf section `.interp' will not fit in region `FLASH_CCFG'
/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: region `FLASH_CCFG' overflowed by 9120 bytes
/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol ad_strip_dylibs; defaulting to 0000000000000000
collect2: error: ld returned 1 exit status
make: *** [hello-world.elf] Error 1
rm obj_srf06-cc26xx/startup_gcc.o hello-world.co obj_srf06-cc26xx/fault-handlers.o
Here's a consolidation of #kfx's solution (which worked like a charm):
unset CFLAGS
unset LDFLAGS
make clean
This is because there may be some other flags which you accidentally set previously, so you have to unset them in order for the compilation to work.

How to Build gcc 4.2.0 in Redhat 7.0 for backward compatibility?

I must compile gcc 4.2.0 as a program dependency to compile (backward compatibility for a Cobol system). I solved some issues, but now is throwing an exception like this:
>/bin/sh ./libtool --tag=GCJ --mode=link /u01/home/app/talka/gcc/gcc-4.2.0/host-x86_64-unknown-linux-gnu/gcc/gcj -B/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava/ -B/u01/home/app/talka/gcc/gcc-4.2.0/host-x86_64-unknown-linux-gnu/gcc/ -L/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava -ffloat-store -fomit-frame-pointer -g -O2 -m32 -m32 -o jv-convert --main=gnu.gcj.convert.Convert -rpath /usr/local/lib/../lib -shared-libgcc >-L/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava/.libs libgcj.la
>
>/u01/home/app/talka/gcc/gcc-4.2.0/host-x86_64-unknown-linux-gnu/gcc/gcj -B/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava/ -B/u01/home/app/talka/gcc/gcc-4.2.0/host-x86_64-unknown-linux-gnu/gcc/ -ffloat-store -fomit-frame-pointer -g -O2 -m32 -m32 -o .libs/jv-convert --main=gnu.gcj.convert.Convert -shared-libgcc -L/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava -L/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava/.libs >./.libs/libgcj.so -L/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -lpthread -lrt -ldl -L/u01/home/app/talka/gcc/gcc-4.2.0/host-x86_64-unknown-linux-gnu/gcc/32 -L/usr/local/lib/../lib -L/lib/../lib -L/usr/lib/../lib -L/u01/home/app/talka/gcc/gcc-4.2.0/host-x86_64-unknown-linux-gnu/gcc -L/usr/local/lib -lgcc_s -lc -lgcc_s -Wl,--rpath -Wl,/usr/local/lib/../lib
>
>./.libs/libgcj.so: undefined reference to `__cxa_call_unexpected'
>
>collect2: ld returned 1 exit status
>
>make[5]: *** [jv-convert] Error 1
>
>make[5]: Leaving directory `/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava'
>
>make[4]: *** [all-recursive] Error 1
>
>make[4]: Leaving directory `/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/32/libjava'
>
>make[3]: *** [multi-do] Error 1
>
>make[3]: Leaving directory `/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/libjava'
>
>make[2]: *** [all-multi] Error 2
>
>make[2]: Leaving directory `/u01/home/app/talka/gcc/gcc-4.2.0/x86_64-unknown-linux-gnu/libjava'
>
>make[1]: *** [all-target-libjava] Error 2
>
>make[1]: Leaving directory `/u01/home/app/talka/gcc/gcc-4.2.0'
>
>make: *** [all] Error 2
If we see this log, we can figure out that behavior is about a java lib (gcj) dependecy compilation. I've tried to avoid this java feature compilation with these settings:
sudo ./configure --program-suffix=4.2.0 --without-libjava --without-gcj --disable-libgcj
but it is still compiling GCJ library yet and the problem is still happening.
Our Linux Distribution is Redhat 7.0, and default gcc is 4.8.2 20140120 (Red Hat 4.3.2-16)
I will thank you any help.
GCC-4.2.0 : The bug fix version is gcc-4.2.4 ... Old gcc requires an oldish OS for the build : RHEL 6 → CentOS 6.9 ... But no chance building these old versions on RHEL 7.
Build gcc-4.2.4 :
$ tar xvf gcc-4.2.4.tar.bz2
$ mkdir build-gcc42 && cd build-gcc42/
$ export CC=gcc34 CXX=g++34 && ../gcc-4.2.4/configure --prefix=/usr/local/gcc424 --program-suffix=42 --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit -disable-checking --with-gnu-ld
$ make
Package : gcc42-c++-4.2.4-1.el6.x86_64.rpm (14.9MB) https://drive.google.com/file/d/1eYWk6Nd63xeqqAUoJldNWRuwEGO6cAyv/view?usp=sharing → provides /usr/bin/{ gcc42, g++42 }.
Download, and install: # cd Downloads/ && yum install ./gcc42-c++-4.2.4-1.el6.x86_64.rpm. ... Works perfect with CentOS 7 (RHEL 7).
Other old extra compilers for EL7 are {gcc34, g++34} https://drive.google.com/drive/folders/0B7S255p3kFXNSXBic2V4ekN0Slk?usp=sharing

Could not determine size of CHARACTER while installing openmpi

I am trying to install openmpi on Amazon ec2 instance. I have uninstalled the openmpi installations present in the system using -
yum remove -y openmpi.x86_64 openmpi-devel.x86_64
This removes 2.1.1-1.31.amzn1 version of openmpi and openmpi devel.
I have downloaded the tar file from official openmpi site. When I try running configure, I get the following error -
checking if C and Fortran are link compatible... yes
checking to see if Fortran compiler likes the C++ exception flags... skipped (no C++ exceptions flags)
checking to see if mpifort compiler needs additional linker flags... none
checking if Fortran compiler supports CHARACTER... yes
checking size of Fortran CHARACTER... configure: WARNING: Could not determine size of CHARACTER
configure: WARNING: See config.log for details
configure: error: Cannot continue
Errors in config.log file -
configure:37098: $? = 0
configure:37111: result: yes
configure:37146: checking size of Fortran CHARACTER
configure:37214: /usr/lib/a-4.2.0-py-3.5.3-dl-gpu-full/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -finline-functions -fno-strict-aliasing -I. -c conftest.c
configure:37221: $? = 0
configure:37231: gfortran conftestf.f90 conftest.o -o conftest -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
/usr/bin/ld: conftest.o: unrecognized relocation (0x29) in section .text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
configure:37238: $? = 1
configure:37259: here is the Fortran program:
program fsize
I have tried with ./configure —disable-fortran as well but I am getting the same error.
Any help will be appreciated.

Resources