Random123 error using fujitsu compiler - c++

I am trying to build an application which resulted in the following error during make process
../../src/Random123/features/sse.h", line 275: warning: explicit type is missing ("int" assumed)
R123_STATIC_INLINE int haveAESNI(){
^
"../../src/Random123/features/sse.h", line 275: error: expected a ";"
R123_STATIC_INLINE int haveAESNI(){
^
The above code works fine with gnu compiler. I am trying with fujitsu compiler (using mpifccpx). Any help appreciated.

Related

Twister Core compilation Error

I am trying to compile twister-core on windows 8.1 (64 bit) using Cygwin.
I am following the steps which are given in the link Compile Twister for Windows
I have copy the code from here :Github "Twister-Core"
I have run the “./bootstrap.sh” successfully without any error.
When I am running the “make” command it show the error and make process failed:
Error: /usr/include/boost/asio/detail/config.hpp:577:5: error: #error
You must add -D__USE_W32_SOCKETS to your compiler options.
# error You must add -D__USE_W32_SOCKETS to your compiler options. /usr/include/openssl/x509.h:192:1: error: pasting “stack_st_” and “(”
does not give a valid preprocessing token DECLARE_STACK_OF(X509_NAME)
^ /usr/include/openssl/pkcs7.h:103:1: error: pasting “stack_st_” and
“(” does not give a valid preprocessing token
DECLARE_STACK_OF(PKCS7_SIGNER_INFO)
/usr/include/openssl/x509v3.h:753:30: error: expected
primary-expression before ‘unsigned’ unsigned long chtype); ^
/usr/include/openssl/x509v3.h:753:50: error: expression list treated
as compound expression in initializer [-fpermissive] unsigned long
chtype); ^ Makefile:1407: recipe for target
‘libtorrent/src/web_connection_base.o’ failed make: ***
[libtorrent/src/web_connection_base.o] Error 1
Adding -DOPENSSL_SYS_WIN32 to the compiler options did the trick for me with OpenSSL version 1.0.2r.

The compiler error "> error: expected unqualified-id before '=' token" when using boost

When I am using Boost for the first time, and trying to compile my first code using <boost/regex.hpp>
I got the following compiler error
/usr/local/include/boost/regex/v4/regex_traits_defaults.hpp:289: error: expected unqualified-id before '=' token
Going to the .hpp code, I found the line 289 like
static const charT A = 'A';
It seems that my compiler doesn't allow A as variable name.
I am using Eclipse 3.7.2 under Linux Red Hat 5.8

How to include Accelerate framework with i686-apple-darwin11-llvm-g++-4.2?

I am trying to use the Accelerate framework on a small C++ program. I'm not even using XCode, only a simple Makefile.
The compiler complains when I add the following line to my code:
#include <Accelerate/Accelerate.h>
The error is the following:
In file included from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:41,
from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20,
from Diana.cpp:20:
/System/Library/Frameworks/vecLib.framework/Headers/vDSP.h:9008: error: expected identifier before numeric constant
/System/Library/Frameworks/vecLib.framework/Headers/vDSP.h:9008: error: expected `}' before numeric constant
/System/Library/Frameworks/vecLib.framework/Headers/vDSP.h:9008: error: expected unqualified-id before numeric constant
/System/Library/Frameworks/vecLib.framework/Headers/vDSP.h:9028: error: expected declaration before ‘}’ token
The compiler I'm using is i686-apple-darwin11-llvm-g++-4.2, which is a gcc 4.2.1, and the line that I use to compile (not to link) is:
i686-apple-darwin11-llvm-g++-4.2 -D__MACOSX_CORE__ -c -o Diana.o Diana.cpp
Should I add some additional flag(s) when compiling this? I tried adding the "-framework Accelerate", but it doesn't change anything, since this should only be included in the linkage process (am I right?).
I googled some of these error messages and I didn't find anything.
I would really appreciate any help. Thank you!
PS: My OS X version is Lion 10.7.5, and XCode is 4.4.1.
I figured it out: I checked what was on line 9008 of vDSP.h and the problem was that I was declaring an FFT_FORWARD constant before including the Accelerate.h.
Fixed!

C++ MEX compilation in MATLAB

I am trying to use a function called edfImport (available here: http://kobi.nat.uni-magdeburg.de/edfImport)
In order to use the function, I must first run edfCompile (included in the toolkit). When running edfCompile, I get an error:
??? Error using ==> mex
Unable to complete successfully
I am running MATLAB 7.1 (R14) and have the latest version of MinGW, Cygwin and Gnumex setup for my compiler (according to the instructions on this page: http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/cygwin.htm)
I am able to compile example mex files, but I'm still not convinced that this isn't an issue with the way my compiler is setup. Any tips gratefully received. It would be nice to know if anyone else has trouble running edfCompile as well... (http://kobi.nat.uni-magdeburg.de/edfImport)
Many thanks
Edit: The error message in full:
In file included from edfMexImport.cpp:6:0:
EDFFile2.h:37:39: error: 'mwSize' has not been declared
EDFFile2.h:127:45: error: 'mwIndex' has not been declared
edfMexImport.cpp: In function 'void mexFunction(int, mxArray**, int, const mxArray**)':
edfMexImport.cpp:12:3: error: 'mwSize' was not declared in this scope
edfMexImport.cpp:12:10: error: expected ';' before 'OutputDims'
edfMexImport.cpp:48:12: error: expected ';' before 'OptionsDimN'
edfMexImport.cpp:49:9: error: 'OptionsDimN' was not declared in this scope
edfMexImport.cpp:51:13: error: 'OptionsDim' was not declared in this scope
edfMexImport.cpp:51:33: error: expected primary-expression before ')' token
edfMexImport.cpp:51:34: error: expected ';' before 'mxGetDimensions'
edfMexImport.cpp:73:12: error: expected ';' before 'FlagsDimN'
edfMexImport.cpp:74:9: error: 'FlagsDimN' was not declared in this scope
edfMexImport.cpp:76:13: error: 'FlagsDim' was not declared in this scope
edfMexImport.cpp:76:31: error: expected primary-expression before ')' token
edfMexImport.cpp:76:32: error: expected ';' before 'mxGetDimensions'
C:\PROGRAM FILES\MATLAB71\BIN\MEX.PL: Error: Compile of 'edfMexImport.cpp' failed.
??? Error using ==> mex
Unable to complete successfully
Error in ==> edfCompile at 15
eval(sprintf('mex -I''%s'' edfMexImport.cpp EDFFILE2.cpp ''%s/edfapi.lib''', edfapiIncludesFolder, edfapiLibraryFolder));
It looks like some type definitions are missing, particularly the mwSize and mwIndex type.
Can you add the following to EDFFile2.h and try again?
just below
#include "edf.h"
#include <mex.h>
add this:
#ifndef mwSize
#define mwSize int
#endif
#ifndef mwIndex
#define mwIndex int
#endif
The MEX file has been modified to support the 64-bit "large array handling API", as described in this document:
http://www.mathworks.com/support/solutions/en/data/1-5C27B9/
Note that this optional large variable support was first added in R7.3 (2006b), and your version is even older. Basically, your MATLAB is too old for the API used by the MEX file. That said, if the MEX file is simple enough, Gunther's solution might be the simple answer to "backport" the MEX file to your older MATLAB. Functions like mxGetDimensions() now return mwSize*, but used to return int*.
So upgrade MATLAB if you can, else try Gunther's answer and let us know how it goes.
Have you looked inside edfCompile.m? Unfortunatlly I don't have Matlab installed on my PC, so I can only suggest you to try to compile the two .cpp files edfMexImport.cpp and EDFFILE2.cpp manually with edfapi.lib

How to compile C++ files generated by google's protobuf compiler on OS X

I'm using a Mac. I have a library written in C++, let's call it "wibble", along with its source code. I can compile this source with GCC 4.3 from macports (g++-mp-4.3), and can link the resulting library into other stuff as long as I use GCC 4.3.
However, I need to link this into another application (let's call it "blort") which will only load libs compiled with the GCC 4.2 that is bundled with OS X 10.6 (because that's what it was built with)
I can, more or less, mess with wibble's Makefile however I may please, but blort is a fixed target. I can write whatever code or build scripts to glue them together I may need. There appears to be no way to get wibble to compile on 4.2 (barring a rewrite, which is out of the question), and the guy who wrote it confirms that.
I am not very familiar with the whole build and linking process in C++, having only been handed this integration, and am completely stumped. Is what I'm trying to achieve even possible? If so, how?
In case it matters, what I'm trying to do is call the methods in wibble from Perl via Inline::CPP, but I'm willing to write raw XS if I have to (I've done that before, at least). I need to use the system perl so this will easily build and install on other people's machines. :-/
UPDATE, 2012-03-01, 1
I am looking into compiling protobufs using the Mac's compiler, and seeing if I can get wibble to compile with the same compiler using that build of protobufs. I will post the results shortly.
Hrmph same errors:
g++ -Wall -Wno-unused-function -Wno-long-long -pedantic -O3 -I/Users/sscaffid/local/include -L/Users/sscaffid/local/lib -fPIC -std=c++98 -c wire.pb.cc
In file included from /Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:43,
from wire.pb.cc:10:
/Users/sscaffid/local/include/google/protobuf/wire_format_lite.h:94: error: comma at end of enumerator list
/Users/sscaffid/local/include/google/protobuf/wire_format_lite.h:117: error: comma at end of enumerator list
/Users/sscaffid/local/include/google/protobuf/wire_format_lite.h:132: error: comma at end of enumerator list
In file included from wire.pb.cc:10:
/Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:303: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:304: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:305: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:306: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:307: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/wire_format_lite_inl.h:308: error: extra ‘;’
In file included from wire.pb.cc:11:
/Users/sscaffid/local/include/google/protobuf/descriptor.h:322: error: comma at end of enumerator list
/Users/sscaffid/local/include/google/protobuf/descriptor.h:341: error: comma at end of enumerator list
/Users/sscaffid/local/include/google/protobuf/descriptor.h:352: error: comma at end of enumerator list
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1206: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1223: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1243: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1249: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1257: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1264: error: extra ‘;’
/Users/sscaffid/local/include/google/protobuf/descriptor.h:1274: error: extra ‘;’
In file included from wire.pb.cc:13:
/Users/sscaffid/local/include/google/protobuf/wire_format.h:226: error: comma at end of enumerator list
make: *** [wire.pb.o] Error 1
From the question:
Solution:
Using the -pedantic option to GCC 4.2 makes it very angry with protobuf code. Don't use it.