I am trying to compile the source code for iperf3 on an AIX machine and ran into some compilation problem and thought that you might save me!
So, when i run the configure script I get this output
> checking for a BSD-compatible install... config/install-sh -c checking
> whether build environment is sane... yes checking for a thread-safe
> mkdir -p... config/install-sh -c -d checking for gawk... no checking
> for mawk... no checking for nawk... nawk checking whether make sets
> $(MAKE)... yes checking whether make supports nested variables... yes
> checking whether to enable maintainer-specific portions of
> Makefiles... no checking build system type... powerpc-ibm-aix6.1.0.0
> checking host system type... powerpc-ibm-aix6.1.0.0 checking for
> gcc... gcc checking whether the C compiler works... yes checking for C
> compiler default output file name... a.out checking for suffix of
> executables... checking whether we are cross compiling... no checking
> for suffix of object files... o checking whether we are using the GNU
> C compiler... yes checking whether gcc accepts -g... yes checking for
> gcc option to accept ISO C89... none needed checking whether gcc
> understands -c and -o together... yes checking for style of include
> used by make... GNU checking dependency style of gcc... gcc3 checking
> for ranlib... ranlib checking whether ln -s works... yes checking how
> to print strings... print -r checking for a sed that does not truncate
> output... /opt/freeware/bin/sed checking for grep that handles long
> lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E
> checking for fgrep... /usr/bin/grep -F checking for ld used by gcc...
> /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... no
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm checking
> the maximum length of command line arguments... 786432 checking how to
> convert powerpc-ibm-aix6.1.0.0 file names to powerpc-ibm-aix6.1.0.0
> format... func_convert_file_noop checking how to convert
> powerpc-ibm-aix6.1.0.0 file names to toolchain format...
> func_convert_file_noop checking for /usr/bin/ld option to reload
> object files... -r checking for objdump... no checking how to
> recognize dependent libraries... pass_all checking for dlltool... no
> checking how to associate runtime and link libraries... print -r --
> checking for ar... ar checking for archiver @FILE support... no
> checking for strip... strip checking for ranlib... (cached) ranlib
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for sysroot... no checking for a working dd... /usr/bin/dd
> checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
> checking for mt... mt checking if mt is a manifest tool... no checking
> how to run the C preprocessor... gcc -E checking for ANSI C header
> files... yes checking for sys/types.h... yes checking for
> sys/stat.h... yes checking for stdlib.h... yes checking for
> string.h... yes checking for memory.h... yes checking for strings.h...
> yes checking for inttypes.h... yes checking for stdint.h... yes
> checking for unistd.h... yes checking for dlfcn.h... yes checking
> which variant of shared library versioning to provide... aix checking
> for objdir... .libs checking if gcc supports -fno-rtti
> -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o
> file.o... yes checking if gcc supports -c -o file.o... (cached) yes
> checking whether the gcc linker (/usr/bin/ld) supports shared
> libraries... yes checking dynamic linker characteristics... AIX
> lib.a(lib.so.V) checking how to hardcode library paths into
> programs... immediate checking whether stripping libraries is
> possible... no checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes checking whether to
> build static libraries... no checking for g++... g++ checking whether
> we are using the GNU C++ compiler... yes checking whether g++ accepts
> -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for ld used by g++...
> /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... no
> checking whether the g++ linker (/usr/bin/ld) supports shared
> libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC
> checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++
> static flag -static works... no checking if g++ supports -c -o
> file.o... yes checking if g++ supports -c -o file.o... (cached) yes
> checking whether the g++ linker (/usr/bin/ld) supports shared
> libraries... yes checking dynamic linker characteristics... AIX
> lib.a(lib.so.V) checking how to hardcode library paths into
> programs... immediate checking for gawk... (cached) nawk checking for
> gcc... (cached) gcc checking whether we are using the GNU C
> compiler... (cached) yes checking whether gcc accepts -g... (cached)
> yes checking for gcc option to accept ISO C89... (cached) none needed
> checking whether gcc understands -c and -o together... (cached) yes
> checking dependency style of gcc... (cached) gcc3 checking how to run
> the C preprocessor... gcc -E checking whether ln -s works... yes
> checking whether make sets $(MAKE)... (cached) yes checking for ANSI C
> header files... (cached) yes checking for library containing floor...
> no floor()
And then the compiling fails, I have never seen this kind of compilation error and the configure.log doesn't say anything relevant
EDIT:
in the config.log file this is found
configure:16270: $? = 0
configure:16259: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/4.8.3/lto-wrapper
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-4.8.3/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 4.8.3 (GCC)
configure:16270: $? = 0
configure:16259: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:16270: $? = 1
configure:16259: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:16270: $? = 1
configure:16274: checking whether we are using the GNU C compiler
configure:16302: result: yes
configure:16311: checking whether gcc accepts -g
configure:16372: result: yes
configure:16389: checking for gcc option to accept ISO C89
configure:16465: result: none needed
configure:16490: checking whether gcc understands -c and -o together
configure:16527: result: yes
configure:16546: checking dependency style of gcc
configure:16657: result: gcc3
configure:16677: checking how to run the C preprocessor
configure:16747: result: gcc -E
configure:16767: gcc -E conftest.c
configure:16767: $? = 0
configure:16781: gcc -E conftest.c
conftest.c:23:28: fatal error: ac_nonexistent.h: No such file or directory
#include <ac_nonexistent.h>
^
compilation terminated.
configure:16781: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "iperf"
| #define PACKAGE_TARNAME "iperf"
| #define PACKAGE_VERSION "3.1.3"
| #define PACKAGE_STRING "iperf 3.1.3"
| #define PACKAGE_BUGREPORT "https://github.com/esnet/iperf"
| #define PACKAGE_URL "http://software.es.net/iperf/"
| #define PACKAGE "iperf"
| #define VERSION "3.1.3"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:16810: checking whether ln -s works
configure:16814: result: yes
configure:16821: checking whether make sets $(MAKE)
configure:16843: result: yes
configure:16863: checking for ANSI C header files
configure:16967: result: yes
configure:16980: checking for library containing floor
configure:17011: gcc -o conftest -g -O2 -Wall -lm conftest.c >&5
conftest.c:31:6: warning: conflicting types for built-in function 'floor' [enabled by default]
char floor ();
^
collect2: fatal error: library libm not found
compilation terminated.
configure:17011: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "iperf"
| #define PACKAGE_TARNAME "iperf"
| #define PACKAGE_VERSION "3.1.3"
| #define PACKAGE_STRING "iperf 3.1.3"
| #define PACKAGE_BUGREPORT "https://github.com/esnet/iperf"
| #define PACKAGE_URL "http://software.es.net/iperf/"
| #define PACKAGE "iperf"
| #define VERSION "3.1.3"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char floor ();
| int
| main ()
| {
| return floor ();
| ;
| return 0;
| }
configure:17011: gcc -o conftest -g -O2 -Wall -lm conftest.c -lm >&5
conftest.c:31:6: warning: conflicting types for built-in function 'floor' [enabled by default]
char floor ();
^
collect2: fatal error: library libm not found
compilation terminated.
configure:17011: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "iperf"
| #define PACKAGE_TARNAME "iperf"
| #define PACKAGE_VERSION "3.1.3"
| #define PACKAGE_STRING "iperf 3.1.3"
| #define PACKAGE_BUGREPORT "https://github.com/esnet/iperf"
| #define PACKAGE_URL "http://software.es.net/iperf/"
| #define PACKAGE "iperf"
| #define VERSION "3.1.3"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char floor ();
| int
| main ()
| {
| return floor ();
| ;
| return 0;
| }
configure:17028: result: no
Configuration does not finish it jobs, because some libraries are not found. Install all required libs! – LPs
The configure script insists on having floor(). Without this you cannot start compilation. … For your case the configure.log shows
library libm not found
. – Gerhardh