Compile an old project using autotools - c++

I have been struggling with this error when I try to run the configure script. It is a 12 years old library. First I tried to generate the configure script by using modern version of all the autotools and GCC.
Then, I tried to generate it by using tools versions of that time but when I run the configure file I still get the same errors which is always the broken variable CPPFLAGS
Here is the configure error:
checking for GMP library... checking for gmp.h...
configure: error: Could not find gmp.h header
Here is the config.log section which describe the error:
configure:22748: gcc34 -c -g -O2 -I/home/vicente/build/chord/../sfslite -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/async -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/arpc -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/crypt -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/sfsmisc -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/libsfs -I/home/vicente/build/chord/../sfslite/svc -I/usr/include conftest.c >&5
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
configure:22754: $? = 1
configure: failed program was:
I wonder if there is someone who went through a similar problem.
Thanks!
Version of tools:
GCC 3.4, 4.4, 4.7.2
Autoconf/aclocal/autoheader 2.59, 2.69
Automake 1.9.6, 1.15
OS: Centos 5.9, Ubuntu 12.04 all of them 64bits
Link of the program:
https://github.com/sit/dht
EDITED:
Here is the section of the configure script around the line 22754:
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "gmp.h"
int
main ()
{
0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 # line 22754
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
sfs_cv_gmp_h="${iflags}"; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi

Related

how to configure bazel toolchain for cross compile use rules_foreign_cc

my project need cross compile for arm aarch64 on ubuntu x86_64, but failed at configure stage, below is log
log
# Execution platform: //platforms:linux_gcc9_aarch64
SUBCOMMAND: # #boost//:filesystem [action 'Linking external/boost/libfilesystem.so', configuration: fc89852de14da3c51e8226c7c5e3087929e4f56710d05ed9ab86ed21b8eb16d4, execution platform: //platforms:linux_gcc9_aarch64]
(cd /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo && \
exec env - \
PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/root/src/go/bin:/usr/local/jdk-11.0.15/bin:/root/.ft:/data/.cache/npm/global/bin \
PWD=/proc/self/cwd \
external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -shared -o bazel-out/k8-fastbuild/bin/external/boost/libfilesystem.so bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/codecvt_error_category.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/directory.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/exception.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/operations.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/path.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/path_traits.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/portability.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/unique_path.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/utf8_codecvt_facet.o bazel-out/k8-fastbuild/bin/external/boost/_objs/filesystem/windows_file_codecvt.o -Wl,-S -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes '-fuse-ld=gold')
# Configuration: fc89852de14da3c51e8226c7c5e3087929e4f56710d05ed9ab86ed21b8eb16d4
# Execution platform: //platforms:linux_gcc9_aarch64
ERROR: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/external/rules_foreign_cc/toolchains/BUILD.bazel:130:10: BootstrapGNUMake external/rules_foreign_cc/toolchains/make failed: (Exit 1): bash failed: error executing command
(cd /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo && \
exec env - \
PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/root/src/go/bin:/usr/local/jdk-11.0.15/bin:/root/.ft:/data/.cache/npm/global/bin \
/bin/bash -c bazel-out/k8-opt-exec-277332AD/bin/external/rules_foreign_cc/toolchains/make_tool_foreign_cc/wrapper_build_script.sh)
# Configuration: 920514b75167e08aaf5b08b6fc5ff1721a7e3be841d2c442cd3624a15e568e52
# Execution platform: //platforms:linux_gcc9_aarch64
rules_foreign_cc: Build failed!
rules_foreign_cc: Keeping temp build directory and dependencies directory for debug.
rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag.
rules_foreign_cc: Printing build logs:
_____ BEGIN BUILD LOGS _____
+ AR=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc-ar
+ ARFLAGS=rcsD
+ CC=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
+ CFLAGS='-fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -march=armv8-a -g0 -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -ffunction-sections -fdata-sections -funsafe-math-optimizations -ftree-vectorize -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted'
+ LD=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
+ LDFLAGS='-lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -Wl,--gc-sections'
+ ./configure --without-guile --with-guile=no --disable-dependency-tracking --prefix=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-277332AD/bin/external/rules_foreign_cc/toolchains/make
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-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... configure: error: in `/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-277332AD/bin/external/rules_foreign_cc/toolchains/make.build_tmpdir':
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gperftools configure 2.9.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/com_github_gperftools_gperftools/configure --prefix=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.build_tmpdir/gperftools_build --enable-shared=no --enable-frame-pointers --disable-libunwind
## --------- ##
## Platform. ##
## --------- ##
hostname = ubuntu
uname -m = x86_64
uname -r = 5.4.0-109-generic
uname -s = Linux
uname -v = #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.ext_build_deps/bin
PATH: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo
PATH: /root/.cargo/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin
PATH: /usr/local/go/bin
PATH: /root/src/go/bin
PATH: /usr/local/jdk-11.0.15/bin
PATH: /root/.ft
PATH: /data/.cache/npm/global/bin
PATH: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.ext_build_deps/bin/toolchains
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2617: checking build system type
configure:2631: result: x86_64-pc-linux-gnu
configure:2651: checking host system type
configure:2664: result: x86_64-pc-linux-gnu
configure:2700: checking for a BSD-compatible install
configure:2768: result: /usr/bin/install -c
configure:2779: checking whether build environment is sane
configure:2834: result: yes
configure:2978: checking for a thread-safe mkdir -p
configure:3017: result: /bin/mkdir -p
configure:3024: checking for gawk
configure:3040: found /usr/bin/gawk
configure:3051: result: gawk
configure:3062: checking whether /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make sets $(MAKE)
configure:3084: result: yes
configure:3113: checking whether /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make supports nested variables
configure:3130: result: yes
configure:3260: checking whether to enable maintainer-specific portions of Makefiles
configure:3269: result: no
configure:3296: checking for git
configure:3314: found /usr/local/bin/git
configure:3327: result: /usr/local/bin/git
configure:3400: checking whether /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make supports the include directive
configure:3415: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_foreign_cc/toolchains/make/bin/make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:3418: $? = 0
configure:3437: result: yes (GNU style)
configure:3507: checking for gcc
configure:3534: result: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
configure:3763: checking for C compiler version
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc --version >&5
aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025
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.
configure:3783: $? = 0
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/external/gcc9_arm_aarch64/bin/../libexec/gcc/aarch64-none-linux-gnu/9.2.1/lto-wrapper
Target: aarch64-none-linux-gnu
Configured with: /tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/src/gcc/configure --target=aarch64-none-linux-gnu --prefix= --with-sysroot=/aarch64-none-linux-gnu/libc --with-build-sysroot=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/install//aarch64-none-linux-gnu/libc --with-bugurl=https://bugs.linaro.org/ --enable-gnu-indirect-function --enable-shared --disable-libssp --disable-libmudflap --enable-checking=release --enable-languages=c,c++,fortran --with-gmp=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --with-mpfr=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --with-mpc=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --with-isl=/tmp/dgboter/bbs/rhev-vm2--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools --enable-fix-cortex-a53-843419 --with-pkgversion='GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)'
Thread model: posix
gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))
configure:3783: $? = 0
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -V >&5
aarch64-none-linux-gnu-gcc: error: unrecognized command line option '-V'
aarch64-none-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3783: $? = 1
configure:3772: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -qversion >&5
aarch64-none-linux-gnu-gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
aarch64-none-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:3783: $? = 1
configure:3803: checking whether the C compiler works
configure:3825: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -lpthread conftest.c >&5
configure:3829: $? = 0
configure:3877: result: yes
configure:3880: checking for C compiler default output file name
configure:3882: result: a.out
configure:3888: checking for suffix of executables
configure:3895: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -o conftest -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -lpthread conftest.c >&5
configure:3899: $? = 0
configure:3921: result:
configure:3943: checking whether we are cross compiling
configure:3951: /root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/gcc9_arm_aarch64/bin/aarch64-none-linux-gnu-gcc -o conftest -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -std=c99 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -lstdc++ -lm -Wl,-no-as-needed -Wl,-z,relro,-z,now -Wall -pass-exit-codes -fuse-ld=gold -lpthread conftest.c >&5
configure:3955: $? = 0
configure:3962: ./conftest
/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/external/com_github_gperftools_gperftools/configure: line 3964: ./conftest: cannot execute binary file: Exec format error
configure:3966: $? = 126
configure:3973: error: in `/root/.cache/bazel/_bazel_root/dbf178c3b436e7b271af34e78939cab5/execroot/bazel_simple_demo/bazel-out/k8-fastbuild/bin/external/com_github_gperftools_gperftools/gperftools_build.build_tmpdir':
configure:3975: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
bazel toolchain configuration:
toolchain:
http_archive(
name = "gcc9_arm_aarch64",
build_file = "#bazel_build_file_repo//bazel:gcc_arm_aarch64.BUILD",
sha256 = "8dfe681531f0bd04fb9c53cf3c0a3368c616aa85d48938eebe2b516376e06a66",
strip_prefix = "gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu",
#urls = ["https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz"],
urls = ["file:///root/src/cpp/toolchains/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz"],
)
platform config
constraint_setting(name = "gcc_version")
constraint_value(
name = "gcc_9",
constraint_setting = ":gcc_version",
)
constraint_value(
name = "gcc_10",
constraint_setting = ":gcc_version",
)
constraint_value(
name = "gcc_11",
constraint_setting = ":gcc_version",
)
platform(
name = "linux_gcc9_aarch64",
constraint_values = [
"#platforms//cpu:aarch64",
"#platforms//os:linux",
":gcc_9",
],
)
toolchain config
toolchain(
name = "gcc9_arm_aarch64_xcompile_toolchain",
exec_compatible_with = [
"#platforms//cpu:x86_64",
"#platforms//os:linux",
],
target_compatible_with = [
"#platforms//cpu:aarch64",
"#platforms//os:linux",
"//platforms:gcc_9",
],
toolchain = "#gcc9_arm_aarch64//:cc_toolchain",
toolchain_type = "#bazel_tools//tools/cpp:toolchain_type",
)
here is a very tiny demo to reproduce it:
[enter link description here][https://github.com/xiedeacc/bazel_simple_demo.git]

./configure cannot not find a working compiler while building gmp library with MSYS2

I'm trying to build gmp-6.1.2 on Windows using MSYS2 with ./configure --enable-cxx command. I get the following error:
configure: error: could not find a working compiler, see config.log for details
Below is the content of config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU MP configure 6.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --enable-cxx
## --------- ##
## Platform. ##
## --------- ##
hostname = computer-name
uname -m = x86_64
uname -r = 2.11.1(0.329/5/3)
uname -s = MINGW64_NT-10.0
uname -v = 2018-09-10 14:19
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /mingw64/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /c/Windows/System32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2885: loading site script /mingw64/etc/config.site
| # This file is in public domain.
| # Original author: Karlson2k (Evgeny Grin)
| # Written for MSys2/MinGW64 to help running 'configure' scripts
|
| # Defaults for MinGW64-targeted programs
|
| # Set proper selfname on bash and fallback to default name on other shells
| test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site
|
| # Set default 'host' to speedup configure
| if test -z "$build_alias"; then
| build_alias="${MSYSTEM_CHOST-x86_64-w64-mingw32}" && \
| $as_echo "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5
| fi
|
| # Set default 'prefix' to "/mingw64"
| if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \
| ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then
| prefix="${MSYSTEM_PREFIX-/mingw64}" && \
| $as_echo "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5
| fi
config.site:13: default build_alias set to x86_64-w64-mingw32
config.site:20: default prefix set to /mingw64
configure:3055: checking build system type
configure:3069: result: x86_64-w64-mingw32
configure:3089: checking host system type
configure:3102: result: x86_64-w64-mingw32
configure:3139: checking for a BSD-compatible install
configure:3207: result: /usr/bin/install -c
configure:3218: checking whether build environment is sane
configure:3273: result: yes
configure:3424: checking for a thread-safe mkdir -p
configure:3463: result: /usr/bin/mkdir -p
configure:3470: checking for gawk
configure:3486: found /usr/bin/gawk
configure:3497: result: gawk
configure:3508: checking whether make sets $(MAKE)
configure:3534: result: no
configure:3559: checking whether make supports nested variables
configure:3576: result: no
configure:3705: checking whether to enable maintainer-specific portions of Makefiles
configure:3714: result: no
User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=64 x32 32
cclist=gcc icc cc
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer -m64 conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc -O
Test compile:
configure:5872: cc -O conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer -mx32 conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc
Test compile:
configure:5872: cc conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5801: gcc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5872: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5858: checking compiler gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5872: gcc -O2 -pedantic -fomit-frame-pointer conftest.c >&5
./configure: line 5873: gcc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: icc -c conftest.c >&5
./configure: line 5780: icc: command not found
configure:5782: $? = 127
configure:5801: icc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler icc -no-gcc
Test compile:
configure:5872: icc -no-gcc conftest.c >&5
./configure: line 5873: icc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:5779: cc -c conftest.c >&5
./configure: line 5780: cc: command not found
configure:5782: $? = 127
configure:5801: cc 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler cc -O
Test compile:
configure:5872: cc -O conftest.c >&5
./configure: line 5873: cc: command not found
configure:5875: $? = 127
failed program was:
int main () { return 0; }
configure:6962: result: no
configure:7200: error: could not find a working compiler, see config.log for details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-w64-mingw32
ac_cv_env_ABI_set=
ac_cv_env_ABI_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_BUILD_set=
ac_cv_env_CC_FOR_BUILD_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_FOR_BUILD_set=
ac_cv_env_CPP_FOR_BUILD_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_M4_set=
ac_cv_env_M4_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-w64-mingw32
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=no
am_cv_make_support_nested_variables=no
## ----------------- ##
## Output variables. ##
## ----------------- ##
ABI=''
ACLOCAL='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing aclocal-1.15'
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='1'
AM_DEFAULT_VERBOSITY='1'
AM_V='1'
AR=''
AS=''
ASMFLAGS=''
AUTOCONF='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing autoconf'
AUTOHEADER='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing autoheader'
AUTOMAKE='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing automake-1.15'
AWK='gawk'
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC=''
CCAS=''
CC_FOR_BUILD=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CPP_FOR_BUILD=''
CXX=''
CXXCPP=''
CXXFLAGS=''
CYGPATH_W='cygpath -w'
DEFN_LONG_LONG_LIMB=''
DEFS=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_STATIC_FALSE=''
ENABLE_STATIC_TRUE=''
EXEEXT=''
EXEEXT_FOR_BUILD=''
FGREP=''
GMP_LDFLAGS=''
GMP_LIMB_BITS=''
GMP_NAIL_BITS='0'
GREP=''
HAVE_CLOCK_01=''
HAVE_CPUTIME_01=''
HAVE_GETRUSAGE_01=''
HAVE_GETTIMEOFDAY_01=''
HAVE_HOST_CPU_FAMILY_power='0'
HAVE_HOST_CPU_FAMILY_powerpc='0'
HAVE_SIGACTION_01=''
HAVE_SIGALTSTACK_01=''
HAVE_SIGSTACK_01=''
HAVE_STACK_T_01=''
HAVE_SYS_RESOURCE_H_01=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBCURSES=''
LIBGMPXX_LDFLAGS=''
LIBGMP_DLL=''
LIBGMP_LDFLAGS=''
LIBM=''
LIBM_FOR_BUILD=''
LIBOBJS=''
LIBREADLINE=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
M4=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='gmp-bugs#gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 6.1.2'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='6.1.2'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_LIBS=''
TUNE_SQR_OBJ=''
U_FOR_BUILD=''
VERSION='6.1.2'
WANT_CXX_FALSE=''
WANT_CXX_TRUE=''
WITH_READLINE_01=''
YACC=''
YFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__isrc=''
am__leading_dot='.'
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-w64-mingw32'
build_alias='x86_64-w64-mingw32'
build_cpu='x86_64'
build_os='mingw32'
build_vendor='w64'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='x86_64-w64-mingw32'
host_alias=''
host_cpu='x86_64'
host_os='mingw32'
host_vendor='w64'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /c/Users/x/Desktop/gmp-6.1.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
mpn_objects=''
mpn_objs_in_libgmp=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/mingw64'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "GNU MP"
#define PACKAGE_TARNAME "gmp"
#define PACKAGE_VERSION "6.1.2"
#define PACKAGE_STRING "GNU MP 6.1.2"
#define PACKAGE_BUGREPORT "gmp-bugs#gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
#define PACKAGE "gmp"
#define VERSION "6.1.2"
#define WANT_FFT 1
#define HAVE_HOST_CPU_x86_64 1
#define HOST_DOS64 1
configure: exit 1
Definitely, $CC is empty. I have gcc installed with MinGW so I tried to assign /c/MinGW/bin/gcc.exe to $CC but that didn't work either.
I know there are similar questions but none of those solutions solves my problem.

Sr Programming Language Install On Ubuntu 14.04 Compiler Errors

The SR Programming language is no longer being maintained, so I realize my chances of finding help on this issue might be slim. However, I need the language installed for classroom purposes and can't think of how to proceed.
Here's the seemingly sole source of information on the web about the language
http://www.cs.arizona.edu/sr/
The install package provides a Makefile for installation. However, running the following:
mkdir /usr/local/src/sr
cd /usr/local/src/sr
wget ftp://ftp.cs.arizona.edu/sr/sr.tar.Z
tar xzf sr.tar.Z
make
results in these errors
echo "#" >paths.sh
echo "# Created mechanically; DO NOT EDIT THIS FILE." >>paths.sh
echo "#" >>paths.sh
sed -n >>paths.sh <Configuration \
-e 's/#.*//' -e 's/[ ]*$//' -e 's/ *= */=/' \
-e 's/="*\(.* [^"]*\)"*$/="\1"/' -e '/^[A-Z0-9_]* *=/p'
echo "" >>paths.sh
echo >paths.tmp '/*'
echo >>paths.tmp ' * Created mechanically; DO NOT EDIT THIS FILE.'
echo >>paths.tmp ' */'
sed >>paths.tmp <paths.sh \
-n -e 's/"//g' -e 's/.*/#define &"/' -e 's/= */ "/p'
if cmp -s paths.tmp paths.h; then :; else cp paths.tmp paths.h; fi
cc -g -c -o util.o util.c
util.c: In function ‘salloc’:
util.c:79:27: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
return strcpy (alloc (strlen (s) + 1), s);
^
util.c: In function ‘strtail’:
util.c:94:14: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
int ls = strlen (s);
^
util.c: In function ‘setpath’:
util.c:221:25: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
searchpath = alloc (strlen (evpath) + strlen (ifdir) + 100);
^
cmp -s multi/uni.h srmulti.h || cp multi/uni.h srmulti.h
cmp -s multi/uni.c srmulti.c || cp multi/uni.c srmulti.c
cd sr; make CC="cc" CFLAGS="-g "
make[1]: Entering directory `/usr/local/src/sr/sr'
cc -g -c -o main.o main.c
In file included from main.c:7:0:
../arch.h:147:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘--’ token
ERROR -- no architecture selected
^
main.c:114:1: warning: conflicting types for ‘options’ [enabled by default]
options (argc, argv)
^
main.c:114:1: error: static declaration of ‘options’ follows non-static declaration
main.c:53:5: note: previous implicit declaration of ‘options’ was here
options (argc, argv); /* process options */
^
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/src/sr/sr'
make: *** [all] Error 2
I figured that this might be a problem with the compiler version I was using. gcc -v returns gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04), and the install files seem to be made to compile on earlier versions. I tried installing an earlier version of gcc such that gcc -v yields gcc version 3.4.6 (Debian 3.4.6-5), but ran into similar yet different compiler errors. Perhaps I did something wrong with the downgraded install because it seems weird that it says Debian 3.4.6-5.
The package also provides a install.sh file. Trying
chmod +x /usr/local/src/sr/install.sh
/usr/local/src/sr/install.sh
returns the following:
+ cp sr/sr /usr/local/bin
cp: cannot stat ‘sr/sr’: No such file or directory
+ strip /usr/local/bin/sr
strip: Warning: '/usr/local/bin/sr' is not an ordinary file
+ cp srl/srl /usr/local/bin
cp: cannot stat ‘srl/srl’: No such file or directory
+ strip /usr/local/bin/srl
strip: Warning: '/usr/local/bin/srl' is not an ordinary file
+ cp srm/srm /usr/local/bin
cp: cannot stat ‘srm/srm’: No such file or directory
+ strip /usr/local/bin/srm
strip: Warning: '/usr/local/bin/srm' is not an ordinary file
+ cp srprof/srprof /usr/local/bin
cp: cannot stat ‘srprof/srprof’: No such file or directory
+ strip /usr/local/bin/srprof
strip: Warning: '/usr/local/bin/srprof' is not an ordinary file
+ cp srtex/srtex /usr/local/bin
cp: cannot stat ‘srtex/srtex’: No such file or directory
+ strip /usr/local/bin/srtex
strip: Warning: '/usr/local/bin/srtex' is not an ordinary file
+ cp srlatex/srlatex /usr/local/bin
cp: cannot stat ‘srlatex/srlatex’: No such file or directory
+ strip /usr/local/bin/srlatex
strip: Warning: '/usr/local/bin/srlatex' is not an ordinary file
+ cp srgrind/srgrind /usr/local/bin
cp: cannot stat ‘srgrind/srgrind’: No such file or directory
+ cp preproc/*2sr /usr/local/bin
cp: cannot stat ‘preproc/*2sr’: No such file or directory
+ cp sr.h /usr/local/lib/sr
+ cp srmulti.h /usr/local/lib/sr
+ cp rts/srlib.a /usr/local/lib/sr
cp: cannot stat ‘rts/srlib.a’: No such file or directory
+ [ -f /bin/ranlib -o -f /usr/bin/ranlib ]
+ ranlib /usr/local/lib/sr/srlib.a
ranlib: '/usr/local/lib/sr/srlib.a': No such file
+ cp library/*.o /usr/local/lib/sr
cp: cannot stat ‘library/*.o’: No such file or directory
+ cp library/*.spec /usr/local/lib/sr
cp: cannot stat ‘library/*.spec’: No such file or directory
+ cp library/*.impl /usr/local/lib/sr
cp: cannot stat ‘library/*.impl’: No such file or directory
+ cp srmap /usr/local/lib/sr
+ cp rts/srx /usr/local/lib/sr
cp: cannot stat ‘rts/srx’: No such file or directory
+ strip /usr/local/lib/sr/srx
strip: '/usr/local/lib/sr/srx': No such file
+ cp srlatex/srlatex.sty /usr/local/lib/sr
+ cp preproc/ccr2sr.h preproc/csp2sr.h preproc/m2sr.h /usr/local/lib/sr
+ cp sr-mode.el /usr/local/lib/sr
+ [ ! -z /usr/man/manl -a -d /usr/man/manl -a ! -z l ]
+ echo not installing man pages for commands
not installing man pages for commands
+ [ ! -z /usr/man/manl -a -d /usr/man/manl -a ! -z l ]
+ echo not installing sranimator/srgetopt/srwin man pages
not installing sranimator/srgetopt/srwin man pages
+ [ ! -z /usr/man/manl -a -d /usr/man/manl -a ! -z l ]
+ echo not installing srmap/srtrace man pages
not installing srmap/srtrace man pages
+ exit 0
and nothing happens.
Can anyone make sense of these errors or at least give advice on how to proceed? It might seem futile because the language hasn't been maintained in a decade, but any advice would help me out tremendously.
Thank you
Update:
My Colleague provided these changes to the ./Configuration file:
sed -i -e "s:/usr/local:/usr:" -e "s:/usr/X11/lib:/usr/lib:" \
-e "s:CCPATH = /bin/cc:CCPATH = /usr/bin/gcc" \
-e "s:RSHPATH = /usr/ucb/rsh:RSHPATH = /usr/bin/ssh:" \
-e "s:VFPATH = /usr/lib/vfontedpr:VFPATH = :" Configuration
Running make on gcc 4.8.4 after this gives
cmp -s multi/uni.h srmulti.h || cp multi/uni.h srmulti.h
cmp -s multi/uni.c srmulti.c || cp multi/uni.c srmulti.c
cd sr; make CC="cc" CFLAGS="-g "
make[1]: Entering directory `/usr/local/src/sr/sr'
cc -g -c -o main.o main.c
In file included from main.c:7:0:
../arch.h:147:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘--’ token
ERROR -- no architecture selected
^
main.c:114:1: warning: conflicting types for ‘options’ [enabled by default]
options (argc, argv)
^
main.c:114:1: error: static declaration of ‘options’ follows non-static declaration
main.c:53:5: note: previous implicit declaration of ‘options’ was here
options (argc, argv); /* process options */
^
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/src/sr/sr'
make: *** [all] Error 2
It gets rid of the initial pathing issues, but the compiler issues are still there.
With gcc 3.4 it gives
cmp -s multi/uni.h srmulti.h || cp multi/uni.h srmulti.h
cmp -s multi/uni.c srmulti.c || cp multi/uni.c srmulti.c
cd sr; make CC="cc" CFLAGS="-g "
make[1]: Entering directory `/usr/local/src/sr/sr'
cc -g -c -o main.o main.c
In file included from main.c:7:
../arch.h:147: error: syntax error before '--' token
main.c:115: error: conflicting types for 'options'
main.c:53: error: previous implicit declaration of 'options' was here
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/src/sr/sr'
make: *** [all] Error 2
"SR" : Old files → → year 2001 !
"SR" compiles OK with gcc version 3.2.3 or gcc version 3.4.6 (
Edit the file 'Configuration'. (
No gcc32 for Ubuntu 14.04 ).)
# make install : Provides /usr/local/bin/sr
P.S. : gcc34 is available for Ubuntu 14.04 :
compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb, or compat-gcc34_3.4.6-ubuntu15_i386.deb

gcc soname unrecognized command line

I'm compiling sipXtapi and I need to compile with this line
gcc -shared -DPIC .libs/codec_pcmapcmu_la-CodecPcmaWrapper.o .libs/codec_pcmapcmu_la-CodecPcmuWrapper.o .libs/codec_pcmapcmu_la-G711.o .libs/codec_pcmapcmu_la-PlgPcmaPcmu.o -lc -W1,-soname=codec_pcmapcmu.so -o .libs/codec_pcmapcmu.so
gcc: error: unrecognized command line option ‘-W1,-soname=codec_pcmapcmu.so’
and this is the Makefile.am:
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/../sipXportLib/include -I$(top_srcdir)/contrib/libspandsp/src
pkgdata_LTLIBRARIES = codec_pcmapcmu.la
codec_pcmapcmu_la_SOURCES = \
CodecPcmaWrapper.c \
CodecPcmuWrapper.c \
G711.c \
PlgPcmaPcmu.c
if PCMAPCMU_STATIC
codec_pcmapcmu_la_CFLAGS = -DCODEC_STATIC
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version -static else
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version
all-local: codec_pcmapcmu.la
echo "Installing plugin codec_pcmapcmu.so ..."
cp -f .libs/codec_pcmapcmu.so #DEFAULT_CODECS_PATH#
clean-local:
rm -f #DEFAULT_CODECS_PATH#/codec_pcmapcmu.so endif
how can I solve the problem?
There's a spelling error there -W1 should be -Wl (that's a lower case L instead of the digit 1)

Compiling error with Facebook flow using Ubuntu 14.04 64bit?

When compiling facebook flow, with Ubuntu 14.04 64 bit, I get an error. Does anyone know what the problem is?
ubuntu#ubuntu:~/Downloads/flow-0.18.1$ make
mkdir -p bin
tar czf bin/flowlib.tar.gz -C lib .
echo "const char* const BuildInfo_kRevision = \"$(git rev-parse HEAD 2>/dev/null || hg identify -i)\";" > hack/utils/get_build_id.gen.c
abort: there is no Mercurial repository here (.hg not found)
ocamlbuild -ocamlc "ocamlopt -ccopt -DNO_LZ4"\
hack/third-party/inotify/inotify_stubs.o hack/heap/hh_shared.o hack/hhi/hhi_elf.o hack/utils/files.o hack/utils/get_build_id.gen.o hack/utils/get_build_id.o hack/utils/handle_stubs.o hack/utils/nproc.o hack/utils/realpath.o hack/utils/sysinfo.o src/embedded/flowlib_elf.o
+ ocamlopt -ccopt -DNO_LZ4 -c hack/hhi/hhi_elf.c
hack/hhi/hhi_elf.c: In function ‘get_embedded_hhi_data’:
hack/hhi/hhi_elf.c:116:3: warning: ‘elf_getshstrndx’ is deprecated (declared at /usr/include/libelf.h:260) [-Wdeprecated-declarations]
int stat = elf_getshstrndx(e, &shstrndx);
^
+ ocamlopt -ccopt -DNO_LZ4 -c src/embedded/flowlib_elf.c
src/embedded/flowlib_elf.c: In function ‘get_embedded_flowlib_data’:
src/embedded/flowlib_elf.c:65:3: warning: ‘elf_getshstrndx’ is deprecated (declared at /usr/include/libelf.h:260) [-Wdeprecated-declarations]
int stat = elf_getshstrndx(e, &shstrndx);
^
Finished, 22 targets (0 cached) in 00:00:01.
ocamlbuild -no-links -I src/commands -I src/common -I src/dts -I src/embedded -I src/parser -I src/parsing -I src/server -I src/stubs -I src/typing -I hack/deps -I hack/dfind -I hack/find -I hack/globals -I hack/heap -I hack/parsing -I hack/procs -I hack/search -I hack/socket -I hack/stubs -I hack/third-party/avl -I hack/third-party/core -I hack/utils -I hack/third-party/inotify -I hack/fsnotify_linux -lib unix -lib str -lflags "hack/third-party/inotify/inotify_stubs.o hack/heap/hh_shared.o hack/hhi/hhi_elf.o hack/utils/files.o hack/utils/get_build_id.gen.o hack/utils/get_build_id.o hack/utils/handle_stubs.o hack/utils/nproc.o hack/utils/realpath.o hack/utils/sysinfo.o src/embedded/flowlib_elf.o -cclib -l -cclib elf " src/flow.native
Here's the error:
+ /usr/bin/ocamlc -c -w A -warn-error A -w -27-32-34-45 -w -4-6-29-35-44-48-50 -I src/server -I hack/find -I hack/procs -I hack/fsnotify_linux -I hack/heap -I hack/deps -I hack/globals -I hack/dfind -I hack/parsing -I hack/stubs -I hack/search -I hack/utils -I hack/socket -I hack/third-party/inotify -I hack/third-party/avl -I hack/third-party/core -I src/commands -I src/dts -I src/typing -I src/parsing -I src/stubs -I src/common -I src/parser -I src/embedded -o src/server/autocompleteService_js.cmo src/server/autocompleteService_js.ml
And specifics:
File "src/server/autocompleteService_js.ml", line 128, characters 14-29:
Error: Unbound value Debug.json_of_t
Command exited with code 2.
Compilation unsuccessful after building 114 targets (0 cached) in 00:00:05.
make: *** [build-flow] Error 10