GCC 4.8.1 in Cygwin - gcc

I was trying to compile and install gcc 4.8.1 in my cygwin (following this tutorial, http://cygwin.wikia.com/wiki/How_to_install_a_newer_version_of_GCC), but apparently I got stuck in a bump and maybe some of you could point me in the right direction.
After running make the compilation stops at the following point:
Making all in include
make[5]: Entering directory `/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include'
mkdir -p ./i686-pc-cygwin/bits/stdc++.h.gch
mkdir -p ./i686-pc-cygwin/bits/stdc++.h.gch
/usr/local/contrib/build/./gcc/xgcc -shared-libgcc -B/usr/local/contrib/build/./contrib/gcc-4.8.1/libstdc++-v3/include/precompiled/stdc++.h \
-o i686-pc-cygwin/bits/stdc++.h.gch/O2ggnu++0x.gch
/usr/local/contrib/build/./gcc/xgcc -shared-libgcc -B/usr/local/contrib/build/./gcc -nostdinc++ -L/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/src -L/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/src/.libs -B/usr/local/i686-pc-cygwin/bin/ -B/usr/local/i686-pc-cygwin/lib/ -isystem /usr/local/i686-pc-cygwin/include -isystem /usr/local/i686-pc-cygwin/sys-include -x c++-header -nostdinc++ -g -O2 -I/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin -I/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include -I/usr/local/contrib/gcc-4.8.1/libstdc++-v3/libsupc++ -O2 -g /usr/local/contrib/gcc-4.8.1/libstdc++-v3/include/precompiled/stdc++.h -o i686-pc-cygwin/bits/stdc++.h.gch/O2g.gch
In file included from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr.h:148:0,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/ext/atomicity.h:33,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/bits/basic_string.h:39,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/string:52,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/bitset:47,
from /usr/local/contrib/gcc-4.8.1/libstdc++-v3/include/precompiled/stdc++.h:65:
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h: In function ‘int __gthread_setspecific(__gthread_key_t, const void*)’:
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: error: types may not be defined in casts
if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
^
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: error: no matching function for call to ‘__gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::._333(const void*&)’
if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
^
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: candidates are:
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::<constructor>()
if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
^
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: candidate expects 0 arguments, 1 provided
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::<constructor>(const __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>&)
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: no known conversion for argument 1 from ‘const void*’ to ‘const __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>&’
In file included from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr.h:148:0,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/ext/atomicity.h:33,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/bits/ios_base.h:39,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/ios:42,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/istream:38,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/sstream:38,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/complex:45,
from /usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/ccomplex:38,
from /usr/local/contrib/gcc-4.8.1/libstdc++-v3/include/precompiled/stdc++.h:52:
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h: In function ‘int __gthread_setspecific(__gthread_key_t, const void*)’:
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: error: types may not be defined in casts
if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
^
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: error: no matching function for call to ‘__gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::._338(const void*&)’
if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
^
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: candidates are:
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::<constructor>()
if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) != 0)
^
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: candidate expects 0 arguments, 1 provided
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: constexpr __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::<constructor>(const __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>&)
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: no known conversion for argument 1 from ‘const void*’ to ‘const __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>&’
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: constexpr __gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>::<constructor>(__gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>&&)
/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin/bits/gthr-default.h:628:27: note: no known conversion for argument 1 from ‘const void*’ to ‘__gthread_setspecific(__gthread_key_t, const void*)::<anonymous union>&&’
Makefile:1569: recipe for target `i686-pc-cygwin/bits/stdc++.h.gch/O2g.gch' failed
make[5]: *** [i686-pc-cygwin/bits/stdc++.h.gch/O2g.gch] Error 1
make[5]: *** Waiting for unfinished jobs....
Makefile:1564: recipe for target `i686-pc-cygwin/bits/stdc++.h.gch/O2ggnu++0x.gch' failed
make[5]: *** [i686-pc-cygwin/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1
make[5]: Leaving directory `/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3/include'
Makefile:480: recipe for target `all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3'
Makefile:386: recipe for target `all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/local/contrib/build/i686-pc-cygwin/libstdc++-v3'
Makefile:12844: recipe for target `all-stage1-target-libstdc++-v3' failed
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/usr/local/contrib/build'
Makefile:16819: recipe for target `stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/local/contrib/build'
Makefile:883: recipe for target `all' failed
make: *** [all] Error 2
Thanks in advance,
Swatchpuppy

Related

Centos7 "make" build ‘EC_GF2m_simple_method’ was not declared in this scope

When I compile the code I get an error telling me my 'EC_GROUP_set_curve_GF2m' function was not declared in this scope. I've researched the error message and I can't figure out what to do to fix it.
from:github bubichain-v3
My Centos 7 is newly installed and installed software package:
sudo yum install -y automake autoconf libtool g++ libssl-dev cmake libbz2-dev python
Error info:
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In static member function ‘static EC_GROUP* utils::EccSm2::NewGroup(utils::EccSm2::GROUP_TYPE, std::string, std::string, std::string, std::string, std::string, std::string)’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:211:48: error: ‘EC_GF2m_simple_method’ was not declared in this scope
group = EC_GROUP_new(EC_GF2m_simple_method());
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp:216:53: error: ‘EC_GROUP_set_curve_GF2m’ was not declared in this scope
if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) {
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp:221:63: error: ‘EC_POINT_set_affine_coordinates_GF2m’ was not declared in this scope
EC_POINT_set_affine_coordinates_GF2m(group, G, xG, yG, ctx);
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In static member function ‘static std::string utils::EccSm2::getZA(EC_GROUP*, std::string, const EC_POINT*)’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:255:66: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
EC_POINT_get_affine_coordinates_GF2m(group, pkey, xA, yA, NULL);
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp:264:62: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
EC_POINT_get_affine_coordinates_GF2m(group, G, xG, yG, ctx);
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In member function ‘bool utils::EccSm2::From(std::string)’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:334:71: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
if (!EC_POINT_get_affine_coordinates_GF2m(group_, pkey_, x, y, ctx)) {
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In member function ‘bool utils::EccSm2::NewRandom()’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:376:71: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
if (!EC_POINT_get_affine_coordinates_GF2m(group_, pkey_, x, y, ctx)) {
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In member function ‘std::string utils::EccSm2::Sign(const string&, const string&)’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:473:74: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
if (!EC_POINT_get_affine_coordinates_GF2m(group_, pt1, x1, NULL, ctx)) {
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In static member function ‘static int utils::EccSm2::verify(EC_GROUP*, const string&, const string&, const string&, const string&)’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:586:69: error: ‘EC_POINT_set_affine_coordinates_GF2m’ was not declared in this scope
EC_POINT_set_affine_coordinates_GF2m(group, pub_key, xp, yp, NULL);
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp:643:73: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
if (!EC_POINT_get_affine_coordinates_GF2m(group, point, x1, NULL, ctx)) {
^
/home/bubichain-v3/src/utils/ecc_sm2.cpp: In member function ‘std::string utils::EccSm2::GetPublicKey()’:
/home/bubichain-v3/src/utils/ecc_sm2.cpp:698:72: error: ‘EC_POINT_get_affine_coordinates_GF2m’ was not declared in this scope
EC_POINT_get_affine_coordinates_GF2m(group_, pkey_, bn_x, bn_y, NULL);
^
make[3]: *** [utils/CMakeFiles/bubi_utils.dir/ecc_sm2.cpp.o] Error 1
make[3]: Leaving directory `/home/bubichain-v3/build/linux'
make[2]: *** [utils/CMakeFiles/bubi_utils.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
/usr/bin/cmake -E cmake_progress_report /home/bubichain-v3/build/linux/CMakeFiles 44
This solution is work for me:
Step 1: I assume that your present working directory is the Ruby source directory.
Step 2: Download the patch as shown below:
# wget https://bugs.ruby-lang.org/attachments/download/3707/out.patch
# ls out.patch
out.patch
# find . -name ossl_pkey_ec.c
./ext/openssl/ossl_pkey_ec.c
Step 4: Run the downloaded patch
# patch ./ext/openssl/ossl_pkey_ec.c < out.patch
patching file ./ext/openssl/ossl_pkey_ec.c
Hunk #1 succeeded at 757 (offset -5 lines).
Hunk #2 succeeded at 814 (offset -5 lines).
patching file ./ext/openssl/ossl_pkey_ec.c
Hunk #1 FAILED at 7.
1 out of 1 hunk FAILED -- saving rejects to file ./ext/openssl/ossl_pkey_ec.c.rej

Multiple errors when compiling wxWidgets with gcc 4.8.1

I've been trying for a while now compile wxWidgets library for Code::Blocks and I am still getting a lot of different errors.
My gcc verions is: gcc (tdm-2) 4.8.1 and I want to build newest wxWidgets: 3.1.0. I've tried 3 different sources and each time I have some error (sometimes this same, sometimes different). I am working on Windows 8.1.
[1]mingw32-make -f makefile.gcc UNICODE=1 MONOLITHIC=1 SHARED=1 BUILD=debug CXXFLAGS="-std=gnu++11"
and the error output:
../../src/common/wxcrt.cpp: In function 'int wxVsprintf(wchar_t*, const wxString
&, va_list)':
../../src/common/wxcrt.cpp:623:47: error: invalid conversion from 'const wchar_t
*' to 'size_t {aka unsigned int}' [-fpermissive]
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
^
../../src/common/wxcrt.cpp:623:56: error: cannot convert 'va_list {aka char*}' t
o 'const wchar_t*' for argument '3' to 'int vswprintf(wchar_t*, size_t, const wc
har_t*, char*)'
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
^
../../src/common/wxcrt.cpp:632:1: warning: control reaches end of non-void funct
ion [-Wreturn-type]
}
^
makefile.gcc:6786: recipe for target 'gcc_mswuddll\monodll_wxcrt.o' failed
mingw32-make: *** [gcc_mswuddll\monodll_wxcrt.o] Error 1
[2]mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug and the error output:
../../src/common/wxcrt.cpp: In function 'int wxVsprintf(wchar_t*, const wxString
&, va_list)':
../../src/common/wxcrt.cpp:623:47: error: invalid conversion from 'const wchar_t
*' to 'size_t {aka unsigned int}' [-fpermissive]
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
^
../../src/common/wxcrt.cpp:623:56: error: cannot convert 'va_list {aka char*}' t
o 'const wchar_t*' for argument '3' to 'int vswprintf(wchar_t*, size_t, const wc
har_t*, char*)'
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
^
../../src/common/wxcrt.cpp:632:1: warning: control reaches end of non-void funct
ion [-Wreturn-type]
}
^
makefile.gcc:11860: recipe for target 'gcc_mswuddll\basedll_wxcrt.o' failed
mingw32-make: *** [gcc_mswuddll\basedll_wxcrt.o] Error 1
[3]mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"1 and the error:
../../src/common/wxcrt.cpp: In function 'int wxVsprintf(wchar_t*, const wxString
&, va_list)':
../../src/common/wxcrt.cpp:623:47: error: invalid conversion from 'const wchar_t
*' to 'size_t {aka unsigned int}' [-fpermissive]
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
^
../../src/common/wxcrt.cpp:623:56: error: cannot convert 'va_list {aka char*}' t
o 'const wchar_t*' for argument '3' to 'int vswprintf(wchar_t*, size_t, const wc
har_t*, char*)'
return wxCRT_VsprintfW(str, format.wc_str(), argptr);
^
../../src/common/wxcrt.cpp:632:1: warning: control reaches end of non-void funct
ion [-Wreturn-type]
}
^
makefile.gcc:6786: recipe for target 'gcc_mswudll\monodll_wxcrt.o' failed
mingw32-make: *** [gcc_mswudll\monodll_wxcrt.o] Error 1
Can someone please advice me what more I can do?
I'm not sure why are you speaking about multiple errors, this is clearly one and the same error and is due to using standard-like vswprintf() instead of the function from MSVC CRT which is normally used by MinGW by default. The former should only be used when __USE_MINGW_ANSI_STDIO is in effect and it's very strange that you still get it without it, I wonder if you have CPPFLAGS or similar set in your environment?
Anyhow, I'd recommend using TDM-GCC 4.9 as 3.1.0 definitely compiles with it (this is what the official binaries have been built with). 4.8 is supposed to work too, of course, so it could be worth checking how is __USE_MINGW_ANSI_STDIO getting defined, but installing 4.9 will probably be simpler for you.

Mailcore2 on iOS8

My existing project failed to build after upgrading from Xcode 5.1.1 to Xcode 6.0. I have already tried removing the 'Externals' folder and doing a full clean.
While trying to find a solution I even updated the following files to add SDK version 8.0:
build-mailcore2-ios copy.sh
build-mailcore2-ios.sh
prepare-ctemplate-ios.sh
prepare-icu4c-ios.sh
prepare-libetpan-ios.sh
prepare-tidy-ios.sh
by adding the following:
if xcodebuild -showsdks|grep iphoneos8.0 >/dev/null ; then
sdkversion=8.0
devicearchs="armv7 armv7s arm64"
But it still fails to run the shell script. Following is the transcript of the error:
/bin/sh /Volumes/Disk\ 1/Apps/NoMyID/MailCore/Externals/builds/workdir/20140926183134/src/libetpan/build-mac/update.sh
/Volumes/Disk 1/Apps/NoMyID/MailCore/Externals/builds/workdir/20140926183134/src/libetpan/build-mac/update.sh: line 25: test: too many arguments
configuring
configure failed
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following build commands failed:
ExternalBuildToolExecution libetpan-prepare-ios
(1 failure)
failed
Current branch master is up to date.
building ctemplate
build for i386
/Volumes/Disk 1/Apps/NoMyID/MailCore/scripts/../Externals/builds/workdir/20140926183156/log/ctemplate-build.log
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
configure: WARNING: Impossible to determine how to use pthreads with shared libraries and -nostdlib
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
In file included from src/template_dictionary.cc:50:
./src/indented_writer.h:123:7: warning: private field 'original_indentation_' is not used [-Wunused-private-field]
int original_indentation_;
^
2 warnings generated.
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
In file included from src/template_dictionary.cc:50:
./src/indented_writer.h:123:7: warning: private field 'original_indentation_' is not used [-Wunused-private-field]
int original_indentation_;
^
2 warnings generated.
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
src/tests/template_unittest.cc:140:6: warning: unused function 'StreqExcept' [-Wunused-function]
bool StreqExcept(const char* a, const char* b, const char* except) {
^
1 warning generated.
src/tests/template_unittest.cc:140:6: warning: unused function 'StreqExcept' [-Wunused-function]
bool StreqExcept(const char* a, const char* b, const char* except) {
^
src/tests/template_unittest.cc:167:6: warning: unused function 'IntEqVerbose' [-Wunused-function]
bool IntEqVerbose(int a, int b) {
^
2 warnings generated.
src/tests/htmlparser_cpp_test.cc:94:18: warning: unused variable 'kMaxFileSize' [-Wunused-const-variable]
static const int kMaxFileSize = 1000000;
^
1 warning generated.
src/tests/htmlparser_cpp_test.cc:94:18: warning: unused variable 'kMaxFileSize' [-Wunused-const-variable]
static const int kMaxFileSize = 1000000;
^
1 warning generated.
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install-libLTLIBRARIES] Error 64
build of ctemplate failed
Showing first 200 notices only
Command /bin/sh failed with exit code 1
Any help is appreciated. Thanks.
After messing around with the shell scripts for a while, I downloaded the latest commit from Github (https://github.com/MailCore/mailcore2). Alas, it worked. I should have gone for this option before.
Sometimes the downloaded code from the "External" folder doesn't work. Therefore i stored a working "External" folder and whenever this happens, i overwrite the non-working "External" folder with the working one.
Before i compile the code, i disconnect my MacBook from every internet connection.
After it passes the MailCore2 Library compile task, i connect to the internet connection again.
But i'll give it a try to clone everything first whenever this error occures.
EDIT
Now i used the GitHub Application, cloning the MailCore2 project and linking the framework in the XCode Project. And this workes!

Error in migrating from Makefile to CMake

I have a library which compile without error using Makefile.
Now I want to switch to CMake but it doesn't work.
The sources and the Makefiles are here.
From all the folders I have kept the followin: can_socket, can_virtual, timers_xeno, timers_rtpreempt, timers_unix, unix.
This is my CMakeLists:
cmake_minimum_required(VERSION 2.4.6)
project(ikarus_arm_common C CXX)
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
find_package(Boost COMPONENTS filesystem system serialization REQUIRED)
set(CAN_MASTER_INCLUDE_DIR include)
include_directories( ${Boost_INCLUDE_DIRS}
${CAN_MASTER_INCLUDE_DIR}
${CAN_MASTER_INCLUDE_DIR}/boost
${CAN_MASTER_INCLUDE_DIR}/timers_rtpreempt
${CAN_MASTER_INCLUDE_DIR}/timers_unix
${CAN_MASTER_INCLUDE_DIR}/timers_xeno
${CAN_MASTER_INCLUDE_DIR}/unix
/usr/xenomai/include
)
set(CAN_FESTIVAL_CPP drivers/unix/unix.c
drivers/timers_xeno/timers_xeno.c
drivers/can_socket/can_socket.c
)
add_library(canfestival ${CAN_FESTIVAL_CPP})
EDIT:
When I try to compile it returns the following error:
> $ make
> [ 9%] Building C object
> CMakeFiles/canfestival.dir/drivers/unix/unix.o
> In file included from
> /home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/include/can.h:28:0,
> from /home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/include/canDispatch.h:23,
> from /home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/unix/unix.c:36:
> /usr/include/boost/function.hpp:13:57: fatal error: functional: No
> such file or directory compilation terminated. make[2]: ***
> [CMakeFiles/canfestival.dir/drivers/unix/unix.o] Error 1 make[1]: ***
> [CMakeFiles/canfestival.dir/all] Error 2 make: *** [all] Error 2
I suppose that one of the problems is due to the fact that some files have the extension .c but requires boost. If i modify the extension of the files unix.cpp and can_socket.cpp compile, while timers_xeno returns an error:
luca#luca-vmware:~/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/build$ make
[ 9%] Building CXX object CMakeFiles/canfestival.dir/drivers/unix/unix.o
[ 18%] Building CXX object CMakeFiles/canfestival.dir/drivers/timers_xeno/timers_xeno.o
/home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/timers_xeno/timers_xeno.cpp: In function ‘void CreateReceiveTask(CAN_PORT, pthread_t*, void (*)(void*))’:
/home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/timers_xeno/timers_xeno.cpp:250:75: error: cannot convert ‘pthread_t* {aka long unsigned int*}’ to ‘RT_TASK* {aka rt_task_placeholder*}’ for argument ‘1’ to ‘int rt_task_create(RT_TASK*, const char*, int, int, int)’
/home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/timers_xeno/timers_xeno.cpp:256:70: error: cannot convert ‘pthread_t* {aka long unsigned int*}’ to ‘RT_TASK* {aka rt_task_placeholder*}’ for argument ‘1’ to ‘int rt_task_start(RT_TASK*, void (*)(void*), void*)’
/home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/timers_xeno/timers_xeno.cpp: In function ‘void WaitReceiveTaskEnd(pthread_t*)’:
/home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/timers_xeno/timers_xeno.cpp:270:38: error: cannot convert ‘pthread_t* {aka long unsigned int*}’ to ‘RT_TASK* {aka rt_task_placeholder*}’ for argument ‘1’ to ‘int rt_task_join(RT_TASK*)’
/home/luca/ArmIkarus/ikarus_arm_stack/ikarus_arm_common/drivers/timers_xeno/timers_xeno.cpp:273:36: error: cannot convert ‘pthread_t* {aka long unsigned int*}’ to ‘RT_TASK* {aka rt_task_placeholder*}’ for argument ‘1’ to ‘int rt_task_delete(RT_TASK*)’
make[2]: *** [CMakeFiles/canfestival.dir/drivers/timers_xeno/timers_xeno.o] Error 1
make[1]: *** [CMakeFiles/canfestival.dir/all] Error 2
make: *** [all] Error 2
How can I fix this problem?

How to solve 'drivers/net/igbvf/igbvf.h:129:15: error: duplicate member 'page' '?

I use ubuntu 11.10 64 bits and I run:
sam#sam:~/download/kernel/linux-2.6.37.6$ make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
VDSOSYM arch/x86/vdso/vdso-syms.lds
VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syscall-syms.lds
VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syms.lds
LD arch/x86/vdso/built-in.o
LD arch/x86/built-in.o
CC [M] drivers/net/igbvf/ethtool.o
In file included from drivers/net/igbvf/ethtool.c:36:0:
drivers/net/igbvf/igbvf.h:129:15: error: duplicate member 'page'
make[3]: *** [drivers/net/igbvf/ethtool.o] Error 1
make[2]: *** [drivers/net/igbvf] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
sam#sam:~/download/kernel/linux-2.6.37.6$
How to solve it?
Thank you~
------------------------------------------------------------------------------------------------------
PROBLEM:-1
------------------------------------------------------------------------------------------------------
gcc: error: elf_i386: No such file or directory
OBJCOPY arch/x86/vdso/vdso32-int80.so
objcopy: 'arch/x86/vdso/vdso32-int80.so.dbg': No such file
make[2]: *** [arch/x86/vdso/vdso32-int80.so] Error 1
make[1]: *** [arch/x86/vdso] Error 2
make: *** [arch/x86] Error 2
------------------------------------------------------------------------------------------------------
SOLUTION:
----------
The problem is that gcc 4.6 doesn't support anymore linker-style architecture options.
Apply the following changes to solve the problem :
In arch/x86/vdso/Makefile :
replace "-m elf_x86_64" by "-m64" on the line starting with VDSO_LDFLAGS_vdso.lds
replace "-m elf_i386" by "-m32" on the line starting with VDSO_LDFLAGS_vdso32.lds
------------------------------------------------------------------------------------------------------
PROBLEM:-2
------------------------------------------------------------------------------------------------------
In file included from drivers/net/igbvf/ethtool.c:36:0:
drivers/net/igbvf/igbvf.h: At top level:
drivers/net/igbvf/igbvf.h:129:15: error: duplicate member ‘page’
make[3]: *** [drivers/net/igbvf/ethtool.o] Error 1
make[2]: *** [drivers/net/igbvf] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
------------------------------------------------------------------------------------------------------
SOLUTION:
---------
struct igbvf_buffer {
dma_addr_t dma;
struct sk_buff *skb;`enter code here`
union {
/* Tx */
struct {
unsigned long time_stamp;
u16 length;
u16 next_to_watch;
u16 mapped_as_page;
};
/* Rx */
struct {
struct page *page; <--------------- No 1
u64 page_dma;
unsigned int page_offset;
};
};
struct page *page; <------------ No 2
};
Hmm conflict of a member with a transparent union.
Maybe older gccs didn't catch that. But it looks very broken
Comment second pointer.
------------------------------------------------------------------------------------------------------
PROBLEM 3: Similar to Problem-2
-------------------------------------------------------------------------------
In file included from drivers/scsi/pmcraid.c:57:0:
drivers/scsi/pmcraid.h: At top level:
drivers/scsi/pmcraid.h:601:8: error: duplicate member ‘sense_buffer’
drivers/scsi/pmcraid.c: In function ‘pmcraid_abort_cmd’:
drivers/scsi/pmcraid.c:2940:33: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
drivers/scsi/pmcraid.c: In function ‘pmcraid_ioctl_passthrough’:
drivers/scsi/pmcraid.c:3745:5: warning: variable ‘access’ set but not used [-Wunused-but-set-variable]
drivers/scsi/pmcraid.c: In function ‘pmcraid_check_ioctl_buffer’:
drivers/scsi/pmcraid.c:4052:6: warning: variable ‘access’ set but not used [-Wunused-but-set-variable]
make[3]: *** [drivers/scsi/pmcraid.o] Error 1
make[2]: *** [drivers/scsi] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/home/ashish/litmus-rt'
make: *** [debian/stamp/build/kernel] Error 2
-------------------------------------------------------------------------------
SOLUTION:
----------
Comment drivers/scsi/pmcraid.h:571
-------------------------------------------------------------------------------

Resources