Cooja Contiki - Mobility plugin - Build failed - cooja

I am trying to add Mobility PLugin in cooja contiki, but getting the below build failed error. Tried adding includeantruntime="false" in build.xml file, but still getting the below error.
compile:
[javac] /home/kayal/contiki/tools/cooja/apps/mobility/build.xml:24: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /home/kayal/contiki/tools/cooja/apps/mobility/build
[javac] /home/kayal/contiki/tools/cooja/apps/mobility/java/Mobility.java:73: error: cannot find symbol
[javac] private MessageListUI log = new MessageList();
[javac] ^
[javac] symbol: class MessageListUI
[javac] location: class Mobility
[javac] /home/kayal/contiki/tools/cooja/apps/mobility/java/Mobility.java:73: error: MessageList is abstract; cannot be instantiated
[javac] private MessageListUI log = new MessageList();
[javac] ^
[javac] /home/kayal/contiki/tools/cooja/apps/mobility/java/Mobility.java:220: error: cannot find symbol
[javac] File file = simulation.getCooja.createPortablePath(filePositions);
[javac] ^
[javac] symbol: variable getCooja
[javac] location: variable simulation of type Simulation
[javac] /home/kayal/contiki/tools/cooja/apps/mobility/java/Mobility.java:234: error: cannot find symbol
[javac] filePositions = simulation.getCooja.restorePortablePath(new File(element.getText()));
[javac] ^
[javac] symbol: variable getCooja
[javac] location: variable simulation of type Simulation
[javac] 4 errors
BUILD FAILED
/home/kayal/contiki/tools/cooja/apps/mobility/build.xml:24: Compile failed; see the compiler error output for details.
Total time: 1 second

Related

R packages installations give a `::std::isxdigit' declared here fatal error`

I recently updated the Homebrew on my Mac (10.14.6 (18G6020)), and went ahead to recompile the development version of R. I built an installation script to make sure the same steps are taken every time (see below). R compiles successfully and passes all checks. However, when I begin to install packages, such as Rcpp, devtools, ape, lme4, among others, I get a ::std::isxdigit declared here during the compilation, and installation fails.
I'm posting here the error message for Rcpp, installation script, sessionInfo(), and brew version. Any help to resolve this will be much appreciated,
Thank you !
Error message for Rcpp:
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks//R.framework/Resources/include" -DNDEBUG -I../inst/include/ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr\
/local/opt/icu4c/include -I/usr/local/opt/gettext/include -I/usr/local/opt/curl/include -I/usr/local/include -I/usr/local/opt/cairo/include -I/usr/local/opt/pango/include/pa\
ngo-1.0/pango -I/usr/local/opt/tcl-tk/include -fPIC -Wall -g -O3 -c api.cpp -o api.o
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios:216:
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:116:20: error: use
of undeclared identifier 'LC_COLLATE_MASK'
collate = LC_COLLATE_MASK,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:117:20: error: use
of undeclared identifier 'LC_CTYPE_MASK'
ctype = LC_CTYPE_MASK,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:118:20: error: use
of undeclared identifier 'LC_MONETARY_MASK'
monetary = LC_MONETARY_MASK,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:119:20: error: use
of undeclared identifier 'LC_NUMERIC_MASK'
numeric = LC_NUMERIC_MASK,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:120:20: error: use
of undeclared identifier 'LC_TIME_MASK'
time = LC_TIME_MASK,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:121:20: error: use
of undeclared identifier 'LC_MESSAGES_MASK'
messages = LC_MESSAGES_MASK,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:330:5: error:
unknown type name 'locale_t'; did you mean 'locale'?
locale_t __l;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:105:24: note:
'locale' declared here
class _LIBCPP_TYPE_VIS locale
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:349:5: error:
unknown type name 'locale_t'; did you mean 'locale'?
locale_t __l;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:105:24: note:
'locale' declared here
class _LIBCPP_TYPE_VIS locale
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:708:5: error:
unknown type name 'locale_t'; did you mean 'locale'?
locale_t __l;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:105:24: note:
'locale' declared here
class _LIBCPP_TYPE_VIS locale
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:726:5: error:
unknown type name 'locale_t'; did you mean 'locale'?
locale_t __l;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:105:24: note:
'locale' declared here
class _LIBCPP_TYPE_VIS locale
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:958:5: error:
unknown type name 'locale_t'; did you mean 'locale'?
locale_t __l;
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__locale:105:24: note:
'locale' declared here
class _LIBCPP_TYPE_VIS locale
^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:739:26: error: use of
undeclared identifier 'strtoll_l'
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:779:35: error: use of
undeclared identifier 'strtoull_l'
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET...
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:808:12: error: use of
undeclared identifier 'strtof_l'
return strtof_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:814:12: error: use of
undeclared identifier 'strtod_l'
return strtod_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:820:12: error: use of
undeclared identifier 'strtold_l'; did you mean 'strtoll'?
return strtold_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdlib:117:9: note:
'strtoll' declared here
using ::strtoll;
^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:1094:9: error: use of
undeclared identifier 'sscanf_l'
if (__libcpp_sscanf_l(__buf.c_str(), _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/__bsd_locale_defaults.h:35:61: note:
expanded from macro '__libcpp_sscanf_l'
#define __libcpp_sscanf_l(...) sscanf_l(__VA_ARGS__)
^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:1199:18: error: use of
undeclared identifier 'isxdigit_l'; did you mean 'isxdigit'?
if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cctype:115:9: note:
'isxdigit' declared here
using ::isxdigit;
^
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:51:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream:40:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/ostream:140:
/Library/Developer/CommandLineTools/usr/include/c++/v1/locale:1199:18: error: too
many arguments to function call, expected 1, have 2; did you mean
'::std::isxdigit'?
if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
^~~~~~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/cctype:115:9: note:
'::std::isxdigit' declared here
using ::isxdigit;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [api.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp’
ERROR: dependency ‘Rcpp’ is not available for package ‘minqa’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/minqa’
ERROR: dependency ‘Rcpp’ is not available for package ‘RcppEigen’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppEigen’
ERROR: dependencies ‘minqa’, ‘nloptr’, ‘Rcpp’, ‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/lme4’
The downloaded source packages are in
‘/private/var/folders/f7/v_vt_5bn07z9tljnh56n9crnrzdbg9/T/RtmpuouQQU/downloaded_packages’
Warning messages:
1: In install.packages("lme4") :
installation of package ‘nloptr’ had non-zero exit status
2: In install.packages("lme4") :
installation of package ‘Rcpp’ had non-zero exit status
3: In install.packages("lme4") :
installation of package ‘minqa’ had non-zero exit status
4: In install.packages("lme4") :
installation of package ‘RcppEigen’ had non-zero exit status
5: In install.packages("lme4") :
installation of package ‘lme4’ had non-zero exit status
Installation script
## remove binaries, etc
make distclean
## update
svn update
## get recommended tools
./tools/rsync-recommended
## other variables
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-15.jdk/Contents/Home/
JAVA_CPPFLAGS="-I/${JAVA_HOME}/include -I/${JAVA_HOME}/include/darwin"
JAVA_LD_LIBRARY_PATH="${JAVA_HOME}/jre/lib/server"
JAVA_LIBS="-L/${JAVA_HOME}/jre/lib/server -ljvm"
export LDFLAGS="-L/usr/local/opt/curl/lib -L/usr/local/opt/tcl-tk/lib"
export CPPFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/opt/icu4c/include -I/usr/local/opt/gettext/include -I/usr/local/opt/curl/include -\
I/usr/local/include -I/usr/local/opt/cairo/include -I/usr/local/opt/pango/include/pango-1.0/pango -I/usr/local/opt/tcl-tk/include"
export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig:$PKG_CONFIG_PATH"
export CC=clang
export CXX=clang++
export FC=/usr/local/bin/gfortran
export OBJC=clang
export CFLAGS='-Wall -g -O3'
export CXXFLAGS='-Wall -g -O3'
export OBJCFLAGS='-Wall -g -O3'
export FFLAGS='-Wall -g -O3 -mtune=generic'
export LC_ALL='C'
./configure --enable-R-framework=/Library/Frameworks/ \
--with-blas="-framework Accelerate" --with-lapack \
--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib \
--with-internal-tzcode --with-cairo=yes
make
make install
R session
> sessionInfo()
R Under development (unstable) (2020-09-29 r79274)
Platform: x86_64-apple-darwin18.7.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 tcltk_4.1.0
Hombrew Version
bash-3.2$ brew --version
Homebrew 2.5.2
Homebrew/homebrew-core (git revision f5bfb; last commit 2020-09-25)
Homebrew/homebrew-cask (git revision a5844b; last commit 2020-09-25)

Bazel Build Permission denied

Recently, I'm trying to learn the NVidia Isaac which is built by Bazel.
While I was following the document here:
https://docs.nvidia.com/isaac/isaac/doc/getting_started.html#running-an-application
I encountered an error kept saying the cpp files Bazel need to build is "Permission denied".
The error message looks like below:
Use --sandbox_debug to see verbose messages from the sandbox
gcc: error: engine/alice/components/Subprocess.cpp: Permission denied
gcc: fatal error: no input files
compilation terminated.
ERROR: /home/acas/HDD/CatDog/Isaak/engine/alice/BUILD:23:1: Couldn't build file engine/alice/_objs/impl/ReplayBridge.o: C++ compilation of rule '//engine/alice:impl' faed (Exit 1) crosstool_wrapper_driver_is_not_gcc_host.py failed: error executing command external/toolchain/crosstool/scripts/crosstool_wrapper_driver_is_not_gcc_host.pyD_DEFAULT_SOURCE -U_FORTIFY_SOURCE -fstack-protector -Wall -Werror -B/usr/bin -Wunused-but-set-parameter ... (remaining 183 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
gcc: error: engine/alice/components/ReplayBridge.cpp: Permission denied
gcc: fatal error: no input files
compilation terminated.
ERROR: /home/acas/HDD/CatDog/Isaak/engine/gems/image/BUILD:42:1: Couldn't build file engine/gems/image/_objs/cuda_conversions/yuv2rgb.cu.o: error while parsing .d file:root/.cache/bazel/_bazel_root/6ab44b9a455585caa8f9f5f55ddd002b/execroot/com_nvidia_isaac/bazel-out/k8-opt/bin/engine/gems/image/_objs/cuda_conversions/yuv2rgb.cu.d (No ch file or directory)
gcc: error: engine/gems/image/cuda/yuv2rgb.cu.cpp: Permission denied
gcc: warning: '-x c++' after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
Target //apps/samples/stereo_dummy:stereo_dummy failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.627s, Critical Path: 0.62s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
FAILED: Build did NOT complete successfully
And so much the same "Permission denied" error.
I've tried root, sudo, but none of that works.
Is anyone has the same Bazel problem (I think this problem is not about NVidia Isaac but Bazel)?

fatal error: features.h: No such file or directory compilation terminated

I am just running the code build.sh. However, I got the error message:
/mnt/storage/easybuild/software/GCCcore/5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include-fixed/limits.h:168:61:
fatal error: limits.h: No such file or directory compilation
terminated.
and also this error:
/mnt/storage/software/libraries/nvidia/cuda-9.0/bin/..//include/crt/host_config.h:179:40:
fatal error: features.h: No such file or directory compilation
terminated.
I have checked the path: /mnt/storage/easybuild/software/GCCcore/5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include-fixed/, there is a file "limits.sh", but the error still occurs.

error: ‘shared_mutex’ is not a member of ‘std’ using ReaderLock = std::shared_lock<std::shared_mutex>;

i'm trying to use microsoft SEAL library for homomorphic encryption and following the steps from the below link https://github.com/cyberweapons/SEAL/blob/master/INSTALL.txt
when i use command cmake .
terminal shows below result
-- SEAL detected (version 2.3.1)
-- SEAL build type: Release
-- SEAL debug mode: OFF
-- SEAL using Microsoft GSL: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ravindra/Desktop/../../MiSEAL/SEAL/SEALExamples
after that when i give make command it should generate a file main.cpp.o instead it is giving the following errors.
[ 50%] Building CXX object CMakeFiles/sealexamples.dir/main.cpp.o
In file included from /usr/local/include/seal/util/mempool.h:12:0,
from /usr/local/include/seal/memorypoolhandle.h:6,
from /usr/local/include/seal/biguint.h:6,
from /usr/local/include/seal/bigpoly.h:9,
from /usr/local/include/seal/seal.h:3,
from /home/ravindra/Desktop/SakhaProjects/S20_AI/MiSEAL/SEAL/SEALExamples/main.cpp:12:
/usr/local/include/seal/util/locks.h:12:45: error: ‘shared_mutex’ is not a member of ‘std’
using ReaderLock = std::shared_lock<std::shared_mutex>;
^~~
/usr/local/include/seal/util/locks.h:12:45: error: ‘shared_mutex’ is not a member of ‘std’
/usr/local/include/seal/util/locks.h:12:62: error: template argument 1 is invalid
using ReaderLock = std::shared_lock<std::shared_mutex>;
^
/usr/local/include/seal/util/locks.h:14:45: error: ‘shared_mutex’ is not a member of ‘std’
using WriterLock = std::unique_lock<std::shared_mutex>;
^~~
/usr/local/include/seal/util/locks.h:14:45: error: ‘shared_mutex’ is not a member of ‘std’
/usr/local/include/seal/util/locks.h:14:62: error: template argument 1 is invalid
using WriterLock = std::unique_lock<std::shared_mutex>;
^
/usr/local/include/seal/util/locks.h:21:20: error: ‘ReaderLock’ does not name a type
inline ReaderLock acquire_read()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:26:20: error: ‘WriterLock’ does not name a type
inline WriterLock acquire_write()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:31:20: error: ‘ReaderLock’ does not name a type
inline ReaderLock try_acquire_read()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:36:20: error: ‘WriterLock’ does not name a type
inline WriterLock try_acquire_write()
^~~~~~~~~~
/usr/local/include/seal/util/locks.h:46:18: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
std::shared_mutex rw_lock_mutex_;
^~~~~~~~~~~~
In file included from /usr/local/include/seal/memorypoolhandle.h:6:0,
from /usr/local/include/seal/biguint.h:6,
from /usr/local/include/seal/bigpoly.h:9,
from /usr/local/include/seal/seal.h:3,
from /home/ravindra/Desktop/SakhaProjects/S20_AI/MiSEAL/SEAL/SEALExamples/main.cpp:12:
/usr/local/include/seal/util/mempool.h: In member function ‘virtual int64_t seal::util::MemoryPoolMT::pool_count() const’:
/usr/local/include/seal/util/mempool.h:561:17: error: ‘ReaderLock’ was not declared in this scope
ReaderLock lock(pools_locker_.acquire_read());
^~~~~~~~~~
CMakeFiles/sealexamples.dir/build.make:62: recipe for target 'CMakeFiles/sealexamples.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/sealexamples.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/sealexamples.dir/all' failed
make[1]: *** [CMakeFiles/sealexamples.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
i am new to SEAL library also i am a beginner to c++ programming, please someone help me to fix this issues.
Hi i found the solution,
i have included following commands in CMakeLists.txt file continued with the steps
`
# Below is TFHE START
export TFHE_PREFIX=/usr/local
export CPLUS_INCLUDE_PATH=${TFHE_PREFIX}/include:${CPLUS_INCLUDE_PATH}
export C_INCLUDE_PATH=${TFHE_PREFIX}/include:${C_INCLUDE_PATH}
export LIBRARY_PATH=${TFHE_PREFIX}/lib:${LIBRARY_PATH}
export LD_LIBRARY_PATH=${TFHE_PREFIX}/lib:${LD_LIBRARY_PATH}
# Below is TFHE END
`

How can I understand these dreadful errors when building gcc-4.8.2?

I am trying to install the gcc-4.8.2 compiler on a remote Debian 7 system, to which I have no root privileges, but only a ssh access. I figured out that the simplest way would be to compile the compiler from source.
I am following this short installation manual from the GCC webpage.
Basically I did the most simple installation, which is summarized at the bottom of the page:
tar xzf gcc-4.8.2.tar.gz
cd gcc-4.8.2
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.2/configure --prefix=$HOME/gcc-4.8.2 --enable-languages=c++
make
with the small exception that I did not run the ./contrib/download_prerequisites script on the remote machine because of firewall restrictions. Instead I ran it on my local machine, then compressed the entire folder back into gcc-4.8.2.tar.gz and scp'd it to the remote machine. There I re-created the symbolic links to the prerequisite libraries (gmp,...) and ran make. After several seconds I receive incredible errors:
In file included from ./tm.h:19:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:24:
./options.h:4078:2: error: #error too many masks for ix86_isa_flags
In file included from ../../gcc-4.8.2/gcc/tree.h:26:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:25:
../../gcc-4.8.2/gcc/statistics.h:25:2: error: #error GATHER_STATISTICS must be defined
In file included from ../../gcc-4.8.2/gcc/system.h:268:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:22:
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
../../gcc-4.8.2/gcc/hwint.h:16:39: error: division by zero in #if
In file included from ../../gcc-4.8.2/gcc/tree.h:29:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:25:
../../gcc-4.8.2/gcc/real.h:103:9: error: #error "REAL_WIDTH > 6 not supported"
In file included from ../../gcc-4.8.2/gcc/c-family/c-common.h:24:0,
from ../../gcc-4.8.2/gcc/c/c-tree.h:23,
from ../../gcc-4.8.2/gcc/c/c-lang.c:26:
../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:265:3: error: #error "Cannot find a least-32-bit signed integer type"
In file included from ../../gcc-4.8.2/gcc/c/c-lang.c:22:0:
../../gcc-4.8.2/gcc/system.h:500:34: error: declaration of C function ‘const char* strsignal(int)’ conflicts with
In file included from /usr/include/c++/4.7/cstring:44:0,
from ../../gcc-4.8.2/gcc/system.h:205,
from ../../gcc-4.8.2/gcc/c/c-lang.c:22:
/usr/include/string.h:566:14: error: previous declaration ‘char* strsignal(int)’ here
In file included from ../../gcc-4.8.2/gcc/system.h:645:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:22:
../../gcc-4.8.2/gcc/../include/libiberty.h:110:36: error: new declaration ‘char* basename(const char*)’
In file included from /usr/include/c++/4.7/cstring:44:0,
from ../../gcc-4.8.2/gcc/system.h:205,
from ../../gcc-4.8.2/gcc/c/c-lang.c:22:
/usr/include/string.h:603:28: error: ambiguates old declaration ‘const char* basename(const char*)’
In file included from ../../gcc-4.8.2/gcc/tree.h:27:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:25:
../../gcc-4.8.2/gcc/vec.h: In static member function ‘static void va_heap::reserve(vec<T, va_heap, vl_embed>*&, unsigned int, bool)’:
../../gcc-4.8.2/gcc/vec.h:295:7: error: ‘GATHER_STATISTICS’ was not declared in this scope
../../gcc-4.8.2/gcc/vec.h:303:7: error: ‘GATHER_STATISTICS’ was not declared in this scope
../../gcc-4.8.2/gcc/vec.h: In static member function ‘static void va_heap::release(vec<T, va_heap, vl_embed>*&)’:
../../gcc-4.8.2/gcc/vec.h:317:7: error: ‘GATHER_STATISTICS’ was not declared in this scope
In file included from ../../gcc-4.8.2/gcc/tree.h:29:0,
from ../../gcc-4.8.2/gcc/c/c-lang.c:25:
../../gcc-4.8.2/gcc/real.h: At global scope:
../../gcc-4.8.2/gcc/real.h:51:21: error: ‘SIZEOF_LONG’ was not declared in this scope
../../gcc-4.8.2/gcc/real.h:51:21: error: ‘SIZEOF_LONG’ was not declared in this scope
../../gcc-4.8.2/gcc/real.h:76:31: error: ‘SIZEOF_LONG’ was not declared in this scope
../../gcc-4.8.2/gcc/real.h:76:31: error: ‘SIZEOF_LONG’ was not declared in this scope
../../gcc-4.8.2/gcc/real.h:76:31: error: ‘SIZEOF_LONG’ was not declared in this scope
../../gcc-4.8.2/gcc/real.h:76:31: error: ‘SIZEOF_LONG’ was not declared in this scope
In file included from ../../gcc-4.8.2/gcc/c-family/c-common.h:24:0,
from ../../gcc-4.8.2/gcc/c/c-tree.h:23,
from ../../gcc-4.8.2/gcc/c/c-lang.c:26:
../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:267:35: error: expected initializer before ‘cppchar_t’
../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:268:9: error: ‘CPPCHAR_SIGNED_T’ does not name a type
../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:777:8: error: ‘cppchar_t’ does not name a type
../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:788:8: error: ‘cppchar_t’ does not name a type
../../gcc-4.8.2/gcc/../libcpp/include/cpplib.h:966:8: error: ‘cppchar_t’ does not name a type
make[3]: *** [c/c-lang.o] Error 1
make[3]: Leaving directory `/home/mdrozdik/gccbuild/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/mdrozdik/gccbuild'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/mdrozdik/gccbuild'
make: *** [all] Error 2
I am compiling with gcc 4.7.2-5 on Debian.
On the local machine there is Ubuntu 13.10 with gcc 4.7.3 and the build seems fine so far (still running).
Please, what could be the cause of these errors?
EDIT:
I checked the /home/mdrozdik/gccbuild/libcpp/config.log file. It is very longm but in two places there are these errors:
configure:3086: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3097: $? = 4
configure:3086: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3097: $? = 4
But the log continues for several pages nevertheless.
I had a similar problem (gcc 4.8.3) and this solved it: g++ 4.7.1 compilation error : conflicting types for ‘strsignal’
The solution was to unset a bunch of C compiler flags (CPATH, etc.)
https://stackoverflow.com/users/1224886/tsbertalan reported this worked for him (and it's what I used):
unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE