Unable to build wxWidgets on Cygwin - xlocale.h - build

I've been attempting to build wxWidgets 3.1.0 in Cygwin. I followed the process described in the install.txt, summarized below:
cd $WXWIN
mkdir build-debug
cd build-debug
../configure --enable-debug
make -j4
I have also tried a couple other flags for configure such as --with-X11, as suggest by this guide. The error I keep receiving, however, is the following:
/home/acohen8/wxWidgets-3.1.0/build-debug/bk-deps g++ -c -o basedll_strvararg.o -D__WXMSW__ -DWXBUILDING -I../src/regex -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/home/acohen8/wxWidgets-3.1.0/build-debug/lib/wx/include/msw-unicode-3.1 -I../include -g -O0 ../src/common/strvararg.cpp
In file included from ../src/common/string.cpp:39:0:
../include/wx/xlocale.h: In function ‘double wxStrtod_lA(const char*, char**, const wxXLocale&)’:
../include/wx/xlocale.h:243:54: error: ‘strtod_l’ was not declared in this scope
{ return wxCRT_Strtod_lA(c, endptr, loc.Get()); }
^
../include/wx/xlocale.h: In function ‘long int wxStrtol_lA(const char*, char**, int, const wxXLocale&)’:
../include/wx/xlocale.h:245:60: error: ‘strtol_l’ was not declared in this scope
{ return wxCRT_Strtol_lA(c, endptr, base, loc.Get()); }
^
../include/wx/xlocale.h: In function ‘long unsigned int wxStrtoul_lA(const char*, char**, int, const wxXLocale&)’:
../include/wx/xlocale.h:247:61: error: ‘strtoul_l’ was not declared in this scope
{ return wxCRT_Strtoul_lA(c, endptr, base, loc.Get()); }
^
../include/wx/xlocale.h: In function ‘double wxStrtod_l(const wchar_t*, wchar_t**, const wxXLocale&)’:
../include/wx/xlocale.h:301:58: error: ‘wcstod_l’ was not declared in this scope
{ return wxCRT_Strtod_lW(c, endptr, loc.Get()); }
^
../include/wx/xlocale.h: In function ‘long int wxStrtol_l(const wchar_t*, wchar_t**, int, const wxXLocale&)’:
../include/wx/xlocale.h:303:64: error: ‘wcstol_l’ was not declared in this scope
{ return wxCRT_Strtol_lW(c, endptr, base, loc.Get()); }
^
../include/wx/xlocale.h: In function ‘long unsigned int wxStrtoul_l(const wchar_t*, wchar_t**, int, const wxXLocale&)’:
../include/wx/xlocale.h:305:65: error: ‘wcstoul_l’ was not declared in this scope
{ return wxCRT_Strtoul_lW(c, endptr, base, loc.Get()); }
^
/home/acohen8/wxWidgets-3.1.0/build-debug/bk-deps g++ -c -o basedll_sysopt.o -D__WXMSW__ -DWXBUILDING -I../src/regex -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/home/acohen8/wxWidgets-3.1.0/build-debug/lib/wx/include/msw-unicode-3.1 -I../include -g -O0 ../src/common/sysopt.cpp
make: *** [Makefile:25366: basedll_string.o] Error 1
make: *** Waiting for unfinished jobs....
I would very much appreciate some suggestions on this!

This is most likely already fixed in wx's git master by this commit. But you can work around the problem by using configure --disable-xlocale.

Related

bash: ./main.o cannot execute binary file Exec format error

I have set up a ubuntu virtual machine on windows using virtual box.
I am trying to run a C++ project. The make file looks like this
CC = g++ -O2 -Wno-deprecated
tag = -i
ifdef linux
tag = -n
endif
test.out: Record.o Comparison.o ComparisonEngine.o Schema.o File.o DBFile.o y.tab.o lex.yy.o test.o
$(CC) -o test.out Record.o Comparison.o ComparisonEngine.o Schema.o File.o DBFile.o y.tab.o lex.yy.o test.o -lfl
main: Record.o Comparison.o ComparisonEngine.o Schema.o File.o y.tab.o lex.yy.o main.o
$(CC) -o main Record.o Comparison.o ComparisonEngine.o Schema.o File.o y.tab.o lex.yy.o main.o -lfl
test.o: test.cc
$(CC) -g -c test.cc
main.o: main.cc
$(CC) -g -c main.cc
Comparison.o: Comparison.cc
$(CC) -g -c Comparison.cc
ComparisonEngine.o: ComparisonEngine.cc
$(CC) -g -c ComparisonEngine.cc
DBFile.o: DBFile.cc
$(CC) -g -c DBFile.cc
File.o: File.cc
$(CC) -g -c File.cc
Record.o: Record.cc
$(CC) -g -c Record.cc
Schema.o: Schema.cc
$(CC) -g -c Schema.cc
y.tab.o: Parser.y
yacc -d Parser.y
sed $(tag) y.tab.c -e "s/ __attribute__ ((__unused__))$$/# ifndef __cplusplus\n __attribute__ ((__unused__));\n# endif/"
g++ -c y.tab.c
lex.yy.o: Lexer.l
lex Lexer.l
gcc -c lex.yy.c
clean:
rm -f *.o
rm -f *.out
rm -f y.tab.c
rm -f lex.yy.c
rm -f y.tab.h
After running the make command I get a bunch of warnings like
g++ -O2 -Wno-deprecated -g -c Record.cc
g++ -O2 -Wno-deprecated -g -c Comparison.cc
g++ -O2 -Wno-deprecated -g -c ComparisonEngine.cc
g++ -O2 -Wno-deprecated -g -c Schema.cc
Schema.cc: In constructor ‘Schema::Schema(const char*, const char*)’:
Schema.cc:46:9: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:58:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:84:9: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:91:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:95:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:106:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:114:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
Schema.cc:118:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf (foo, "%s", space);
~~~~~~~^~~~~~~~~~~~~~~~~~
g++ -O2 -Wno-deprecated -g -c File.cc
File.cc: In member function ‘void File::GetPage(Page*, off_t)’:
File.cc:186:7: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read (myFilDes, bits, PAGE_SIZE);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
File.cc: In member function ‘void File::AddPage(Page*, off_t)’:
File.cc:206:10: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
write (myFilDes, &foo, sizeof (int));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
File.cc:223:8: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
write (myFilDes, bits, PAGE_SIZE);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
File.cc: In member function ‘void File::Open(int, char*)’:
File.cc:258:8: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read (myFilDes, &curLength, sizeof (off_t));
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
File.cc: In member function ‘int File::Close()’:
File.cc:276:8: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
write (myFilDes, &curLength, sizeof (off_t));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -O2 -Wno-deprecated -g -c DBFile.cc
yacc -d Parser.y
sed -i y.tab.c -e "s/ __attribute__ ((__unused__))$/# ifndef __cplusplus\n __attribute__ ((__unused__));\n# endif/"
g++ -c y.tab.c
y.tab.c: In function ‘int yyparse()’:
y.tab.c:1427:35: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
yyerror (YY_("syntax error"));
^
y.tab.c:1571:35: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
yyerror (YY_("memory exhausted"));
^
lex Lexer.l
gcc -c lex.yy.c
g++ -O2 -Wno-deprecated -g -c test.cc
g++ -O2 -Wno-deprecated -o test.out Record.o Comparison.o ComparisonEngine.o Schema.o File.o DBFile.o y.tab.o lex.yy.o test.o -lfl
All files compile generating respective .o files except the main.cc. So I compile it using this command
g++ -O2 -Wno-deprecated -g -c -o main.o main.cc
Now the main.o file compiles and main.o is generated
I then run it using ./main.o and get Permission denied
So I get rid of this error by chmod 755 ./*
Now running the main.o gives this error
bash: ./main.o cannot execute binary file Exec format error
Through my research I found out that this error is because of the mismatch in arhitecture and file type.
file main.o outputs x86-64 and uname -m outputs x86_64
I cannot figure out the problem.
Any help would be greatly appreciated! Thank you!
You are trying to execute an object file. Object files like main.o are not executable. They only contain part of the code required to form an exectuable.
You need to run main (or maybe test.out), which is the actual executable.
The permission warnings were telling you the same thing (that main.o is not executable), but you overwrote that with chmod.
main should be created by make assuming there are no compilation/linking errors if you use make main or test.out if you use make or make test.out. The linker invocation is given in the main:/test.out: target of the Makefile. If make generates compiler or linker errors, then repeating the same commands manually is not going to fix it. Fix the code or Makefile instead.
Also note that the warnings/errors are there for a reason. Since C++11, you are not allowed to cast string literals to char*, only to const char*. This was deprecated already in C++03. Circumventing that rule is only going to cause you trouble in the future. Fix your code instead of adding -Wno-deprecated.

error: can't convert between vector values of different size return (__m64) __builtin_ia32_vec_init_v2si (__i, 0);

I'm trying to build an R package which wraps around OpenPano (https://github.com/ppwwyyxx/OpenPano) in order to perform image stitching directly from R.
The package works fine on Linux already. I'm now trying to make sure it also builds on Windows. When I do this, it shows me these compilation issues. Can someone assist in trying to fix these, I have no idea where they come from.
The R package is available at https://github.com/bnosac/image/tree/master/image.OpenPano and contains the following make elements in the R Makevars file:
CXX_STD=CXX11
PKG_LIBS = -ljpeg $(SHLIB_OPENMP_CFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_CPPFLAGS = -I. -isystem third-party -DDEBUG -Wnon-virtual-dtor
SOURCES = lib/polygon.cc lib/debugutils.cc lib/color.cc lib/config.cc lib/timer.cc lib/imgproc.cc lib/kdtree.cc lib/imgio.cc lib/planedrawer.cc lib/matrix.cc lib/utils.cc feature/dist.cc feature/orientation.cc feature/sift.cc feature/gaussian.cc feature/feature.cc feature/dog.cc feature/matcher.cc feature/extrema.cc feature/brief.cc stitch/homography.cc stitch/warp.cc stitch/camera_estimator.cc stitch/debug.cc stitch/multiband.cc stitch/transform_estimate.cc stitch/cylstitcher.cc stitch/stitcherbase.cc stitch/camera.cc stitch/stitcher.cc stitch/blender.cc stitch/stitcher_image.cc stitch/incremental_bundle_adjuster.cc third-party/lodepng/lodepng.cc
SOURCES += rcpp-openpano.cpp
SOURCES += RcppExports.cpp
OBJ = $(SOURCES:.cc=.o)
OBJECTS = $(OBJ:.cpp=.o)
This is the compiling information from the R package on Windows
* installing *source* package 'image.OpenPano' ...
** libs
*** arch - i386
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++ -std=gnu++11 -I"D:/RCompile/recent/R-3.4.4/include" -DNDEBUG -I. -isystem third-party --std=gnu++11 -DDEBUG -Wnon-virtual-dtor -I"d:/RCompile/CRANpkg/lib/3.4/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.4/RcppEigen/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -fopenmp -O2 -Wall -mtune=core2 -c lib/polygon.cc -o lib/polygon.o
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++ -std=gnu++11 -I"D:/RCompile/recent/R-3.4.4/include" -DNDEBUG -I. -isystem third-party --std=gnu++11 -DDEBUG -Wnon-virtual-dtor -I"d:/RCompile/CRANpkg/lib/3.4/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.4/RcppEigen/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -fopenmp -O2 -Wall -mtune=core2 -c lib/debugutils.cc -o lib/debugutils.o
In file included from D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/x86intrin.h:29:0,
from D:/Compiler/gcc-4.9.3/mingw_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/opt_random.h:33,
from D:/Compiler/gcc-4.9.3/mingw_32/i686-w64-mingw32/include/c++/random:50,
from D:/Compiler/gcc-4.9.3/mingw_32/i686-w64-mingw32/include/c++/bits/stl_algo.h:66,
from D:/Compiler/gcc-4.9.3/mingw_32/i686-w64-mingw32/include/c++/algorithm:62,
from d:/RCompile/CRANpkg/lib/3.4/Rcpp/include/RcppCommon.h:72,
from d:/RCompile/CRANpkg/lib/3.4/Rcpp/include/Rcpp.h:27,
from lib/debugutils.cc:62:
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_cvtsi32_si64(int)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:64:54: error: can't convert between vector values of different size
return (__m64) __builtin_ia32_vec_init_v2si (__i, 0);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function 'int _mm_cvtsi64_si32(__m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:107:53: error: cannot convert '__m64 {aka int}' to '__vector(2) int' for argument '1' to 'int __builtin_ia32_vec_ext_v2si(__vector(2) int, int)'
return __builtin_ia32_vec_ext_v2si ((__v2si)__i, 0);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_packs_pi16(__m64, __m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:146:69: error: cannot convert '__v4hi {aka short int}' to '__vector(4) short int' for argument '1' to '__vector(8) char __builtin_ia32_packsswb(__vector(4) short int, __vector(4) short int)'
return (__m64) __builtin_ia32_packsswb ((__v4hi)__m1, (__v4hi)__m2);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_packs_pi32(__m64, __m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:161:69: error: cannot convert '__m64 {aka int}' to '__vector(2) int' for argument '1' to '__vector(4) short int __builtin_ia32_packssdw(__vector(2) int, __vector(2) int)'
return (__m64) __builtin_ia32_packssdw ((__v2si)__m1, (__v2si)__m2);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_packs_pu16(__m64, __m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:176:69: error: cannot convert '__v4hi {aka short int}' to '__vector(4) short int' for argument '1' to '__vector(8) char __builtin_ia32_packuswb(__vector(4) short int, __vector(4) short int)'
return (__m64) __builtin_ia32_packuswb ((__v4hi)__m1, (__v4hi)__m2);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_unpackhi_pi8(__m64, __m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:190:70: error: cannot convert '__v8qi {aka char}' to '__vector(8) char' for argument '1' to '__vector(8) char __builtin_ia32_punpckhbw(__vector(8) char, __vector(8) char)'
return (__m64) __builtin_ia32_punpckhbw ((__v8qi)__m1, (__v8qi)__m2);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_unpackhi_pi16(__m64, __m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:204:70: error: cannot convert '__v4hi {aka short int}' to '__vector(4) short int' for argument '1' to '__vector(4) short int __builtin_ia32_punpckhwd(__vector(4) short int, __vector(4) short int)'
return (__m64) __builtin_ia32_punpckhwd ((__v4hi)__m1, (__v4hi)__m2);
^
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h: In function '__m64 _mm_unpackhi_pi32(__m64, __m64)':
D:/Compiler/gcc-4.9.3/mingw_32/lib/gcc/i686-w64-mingw32/4.9.3/include/mmintrin.h:218:70: error: cannot convert '__m64 {aka int}' to '__vector(2) int' for argument '1' to '__vector(2) int __builtin_ia32_punpckhdq(__vector(2) int, __vector(2) int)'
return (__m64) __builtin_ia32_punpckhdq ((__v2si)__m1, (__v2si)__m2);
^
........
In file included from d:/RCompile/CRANpkg/lib/3.4/Rcpp/include/Rcpp.h:66:0,
from lib/debugutils.cc:62:
d:/RCompile/CRANpkg/lib/3.4/Rcpp/include/Rcpp/Module.h: At global scope:
d:/RCompile/CRANpkg/lib/3.4/Rcpp/include/Rcpp/Module.h:448:34: warning: 'moduleSym' defined but not used [-Wunused-variable]
static VARIABLE_IS_NOT_USED SEXP moduleSym = NULL;
^
make: *** [lib/debugutils.o] Error 1
Warning: running command 'make -f "Makevars" -f "D:/RCompile/recent/R-3.4.4/etc/i386/Makeconf" -f "D:/RCompile/recent/R-3.4.4/etc/i386/Makevars.site" -f "D:/RCompile/recent/R-3.4.4/share/make/winshlib.mk" CXX='$(CXX11) $(CXX11STD)' CXXFLAGS='$(CXX11FLAGS)' CXXPICFLAGS='$(CXX11PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX11LDFLAGS)' SHLIB_LD='$(SHLIB_CXX11LD)' SHLIB="image.OpenPano.dll" ' had status 2
ERROR: compilation failed for package 'image.OpenPano'
* removing 'd:/RCompile/CRANguest/R-release/lib/image.OpenPano'
In R CMD INSTALL

Build of nixos.avrgcclibc fails on NixOS

I am trying to install avr-gcc-libc on NixOS, but run into a build error.
I try to install with the command
nix-env -iA nixos.avrgcclibc
The output this produces is very long and terminates with
g++ -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Icp -I../../gcc -I../../gcc/cp -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace -o cp/except.o
-MT cp/except.o -MMD -MP -MF cp/.deps/except.TPo ../../gcc/cp/except.c
In file included from ./tm.h:18:0,
from ../../gcc/cp/except.c:27:
../../gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
^
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from ../../gcc/cp/except.c:1023:0:
cfns.gperf: In function 'const char* libc_name_p(const char*, unsigned int)':
cfns.gperf:101:1: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline' attribute
cfns.gperf:26:14: note: 'const char* libc_name_p(const char*, unsigned int)' previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function 'const char* libc_name_p(const char*, unsigned int)' used but never defined
make[2]: *** [Makefile:1064: cp/except.o] Error 1
make[2]: Leaving directory '/tmp/nix-build-avr-gcc-libc.drv-0/gcc-5.3.0/obj-avr/gcc'
make[1]: *** [Makefile:4094: all-gcc] Error 2
make[1]: Leaving directory '/tmp/nix-build-avr-gcc-libc.drv-0/gcc-5.3.0/obj-avr'
make: *** [Makefile:852: all] Error 2
builder for ‘/nix/store/0ypaa4x9x0lsyygciasw9m1v4jswgm49-avr-gcc-libc.drv’ failed with exit code 2
error: build of ‘/nix/store/0ypaa4x9x0lsyygciasw9m1v4jswgm49-avr-gcc-libc.drv’ failed
What might the problem be? What can I do to get avr-gcc-libc to install successfully?

Qt + iperf3 = lconv has not been declared

Sorry for my english.
I try to add iperf3 (like static link library) to my Qt project (Qt version 4.8.5, OpenSuse 13.1), and has several errors:
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../lperftest -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I../lperf/include -I. -I../lperftest -I. -o main.o ../lperftest/main.cpp
In file included from /usr/include/c++/4.8/x86_64-suse-linux/bits/c++locale.h:41:0,
from /usr/include/c++/4.8/bits/localefwd.h:40,
from /usr/include/c++/4.8/string:43,
from /usr/include/QtCore/qstring.h:54,
from /usr/include/QtCore/qobject.h:48,
from /usr/include/QtCore/QObject:1,
from ../lperftest/main.cpp:9:
/usr/include/c++/4.8/clocale:53:11: error: '::lconv' has not been declared
using ::lconv;
^
/usr/include/c++/4.8/clocale:54:11: error: '::setlocale' has not been declared
using ::setlocale;
^
/usr/include/c++/4.8/clocale:55:11: error: '::localeconv' has not been declared
using ::localeconv;
^
In file included from /usr/include/c++/4.8/bits/localefwd.h:40:0,
from /usr/include/c++/4.8/string:43,
from /usr/include/QtCore/qstring.h:54,
from /usr/include/QtCore/qobject.h:48,
from /usr/include/QtCore/QObject:1,
from ../lperftest/main.cpp:9:
/usr/include/c++/4.8/x86_64-suse-linux/bits/c++locale.h:52:23: error: 'uselocale' was not declared in this scope
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/c++/4.8/x86_64-suse-linux/bits/c++locale.h:52:45: error: invalid type in declaration before ';' token
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/c++/4.8/x86_64-suse-linux/bits/c++locale.h: In function 'int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)':
/usr/include/c++/4.8/x86_64-suse-linux/bits/c++locale.h:75:53: error: '__gnu_cxx::__uselocale' cannot be used as a function
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
^
/usr/include/c++/4.8/x86_64-suse-linux/bits/c++locale.h:100:33: error: '__gnu_cxx::__uselocale' cannot be used as a function
__gnu_cxx::__uselocale(__old);
^
../lperftest/main.cpp: At global scope:
../lperftest/main.cpp:11:5: warning: unused parameter 'argc' [-Wunused-parameter]
int main(int argc, char *argv[])
^
../lperftest/main.cpp:11:5: warning: unused parameter 'argv' [-Wunused-parameter]
make: *** [main.o] Error 1
When i try to add iperf3 to the only C++ project all is good. This error exist only in Qt project. Is any idea?
I have the same problem with iperf3 and Qt. Basically it seems that you have to use similar compilation for iperf3 library and your project (both gcc or both g++).
Let us know how it goes. Or share your solution if already done.
-- edit --
or do the following for iperf_api.h
extern "C" {
#include <iperf_api.h>
}

Compilation Error with make file

I've developed a C++ project using eclipse. When I launch the Run command from within the IDE everything will work fine and programs exits with success.
This is the build output obtained with Eclipse's make file:
**** Build of configuration Debug for project IVPM ****
make all
Building file: ../IVPM.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/include/opencv -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -c -fmessage-length=0 -std=c++0x -MMD -MP -MF"IVPM.d" -MT"IVPM.d" -o "IVPM.o" "../IVPM.cpp"
Finished building: ../IVPM.cpp
Building file: ../TemplateMatx3.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/include/opencv -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -c -fmessage-length=0 -std=c++0x -MMD -MP -MF"TemplateMatx3.d" -MT"TemplateMatx3.d" -o "TemplateMatx3.o" "../TemplateMatx3.cpp"
Finished building: ../TemplateMatx3.cpp
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/local/include/opencv -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -c -fmessage-length=0 -std=c++0x -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
Finished building: ../main.cpp
Building target: IVPM
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -o "IVPM" ./IVPM.o ./Matx3.o ./TemplateMatx3.o ./main.o -lopencv_core -lpng -lopencv_highgui
Finished building target: IVPM
**** Build Finished ****
I was now trying to write a makefile on my own but am not able to compile with success. Here is what I've done so far:
all:main
main:IVPM.o TemplateMatx3.o
g++ IVPM.o TemplateMatx3.o -L/usr/local/lib -lopencv_core -lpng -lopencv_highgui -o main -c main.cpp
TemplateMatx3.o:TemplateMatx3.cpp
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -fmessage-length=0 -std=c++0x -c TemplateMatx3.cpp
IVPM.o:IVPM.cpp
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -fmessage-length=0 -std=c++0x -c IVPM.cpp
clean:
rm -rf *o main
But compiling on a shell with the make command will result in the following errors:
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -fmessage-length=0 -std=c++0x -c IVPM.cpp
g++ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -I/usr/include/c++/4.5.2 -O0 -g3 -Wall -fmessage-length=0 -std=c++0x -c TemplateMatx3.cpp
g++ IVPM.o TemplateMatx3.o -L/usr/local/lib -lopencv_core -lpng -lopencv_highgui -o main -c main.cpp
In file included from /usr/include/c++/4.5/type_traits:35:0,
from IVPM.h:39,
from main.cpp:8:
/usr/include/c++/4.5/bits/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
In file included from main.cpp:9:0:
IVPM.cpp: In member function ‘void IVPM<Matx3DataType>::loadImagesFromFileAndProcessAndSave(const std::string&, const std::string&, const std::string&, IVPM<Matx3DataType>::loadImageType, IVPM<Matx3DataType>::saveImageFormat, IVPM<Matx3DataType>::imageOperationType, float, float, IVPM<Matx3DataType>::interpolationType)’:
IVPM.cpp:140:39: error: no matching function for call to ‘std::basic_ifstream<char>::open(const std::string&, const std::ios_base::openmode&)’
/usr/include/c++/4.5/fstream:526:7: note: candidate is: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits<char>, std::ios_base::openmode = std::_Ios_Openmode]
IVPM.cpp: In member function ‘std::vector<TemplateMatx3<Matx3DataType>*>* IVPM<Matx3DataType>::loadImagesFromFileAndProcessAndReturn(const std::string&, const std::string&, IVPM<Matx3DataType>::loadImageType, IVPM<Matx3DataType>::imageOperationType, float, float, IVPM<Matx3DataType>::interpolationType)’:
IVPM.cpp:208:39: error: no matching function for call to ‘std::basic_ifstream<char>::open(const std::string&, const std::ios_base::openmode&)’
/usr/include/c++/4.5/fstream:526:7: note: candidate is: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits<char>, std::ios_base::openmode = std::_Ios_Openmode]
IVPM.cpp: In member function ‘void IVPM<Matx3DataType>::convertMatx3VectorAndProcessAndSave(std::vector<TemplateMatx3<Matx3DataType>*>*, const std::string&, IVPM<Matx3DataType>::saveImageFormat, IVPM<Matx3DataType>::imageOperationType, float, float, IVPM<Matx3DataType>::interpolationType)’:
IVPM.cpp:555:58: error: there are no arguments to ‘to_string’ that depend on a template parameter, so a declaration of ‘to_string’ must be available
IVPM.cpp:555:58: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
IVPM.cpp: In member function ‘void IVPM<Matx3DataType>::loadMatx3FromFileAndProcessAndSave(const std::string&, const std::string&, IVPM<Matx3DataType>::matx3FileType, const std::string&, IVPM<Matx3DataType>::saveImageFormat, IVPM<Matx3DataType>::imageOperationType, float, float, IVPM<Matx3DataType>::interpolationType)’:
IVPM.cpp:704:38: error: no matching function for call to ‘std::basic_ifstream<char>::open(const std::string&, const std::ios_base::openmode&)’
/usr/include/c++/4.5/fstream:526:7: note: candidate is: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits<char>, std::ios_base::openmode = std::_Ios_Openmode]
IVPM.cpp: In member function ‘std::vector<TemplateMatx3<Matx3DataType>*>* IVPM<Matx3DataType>::loadMatx3FromFileAndProcessAndReturn(const std::string&, const std::string&, IVPM<Matx3DataType>::matx3FileType, IVPM<Matx3DataType>::imageOperationType, float, float, IVPM<Matx3DataType>::interpolationType)’:
IVPM.cpp:740:38: error: no matching function for call to ‘std::basic_ifstream<char>::open(const std::string&, const std::ios_base::openmode&)’
/usr/include/c++/4.5/fstream:526:7: note: candidate is: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits<char>, std::ios_base::openmode = std::_Ios_Openmode]
IVPM.cpp: In member function ‘void IVPM<Matx3DataType>::loadVideoAndProcessAndSave(const std::string&, const std::string&, IVPM<Matx3DataType>::saveImageFormat, float, float, float, bool, IVPM<Matx3DataType>::imageOperationType, float, float, IVPM<Matx3DataType>::interpolationType) [with Matx3DataType = double, std::string = std::basic_string<char>]’:
main.cpp:84:2: instantiated from here
IVPM.cpp:315:118: error: ‘to_string’ was not declared in this scope
make: *** [main] Error 1
Apparently the compiler is not able to find matching functions of the std library. But I've included the std library in my compiling options, so why is the compiler complaining? And what is the correct procedure to follow?