Cray compiler asks for a flag, then doesn't recognize it - fortran

I am trying to compile a code with crayftn.
I get an error message
/opt/cray/pe/cce/10.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
So it wants the flag --no-relax? OK, I can do that. So I re-link with that flag, and then it tells me
ftn -O3 --no-relax -dynamic -h pic -h omp -o stream_cray stream_mpi.o mysecond.o
ftn-2115 crayftn: ERROR in command line
"-no-relax" is an invalid command-line option.
So it asks for "--no-relax", but then it doesn't understand it. Anyone know of a way out of this conundrum? Or another way of solving the root problem in the first place?

I found this link:
https://bb.cgd.ucar.edu/cesm/threads/failed-to-convert-gotpcrel-relocation-relink-with-no-relax.4494/
PROBLEM:
Hi, I get the following error message for CLM5.0 compilation with
Intel compilers, during the final cesm bld ..ld: failed to convert GOTPCREL relocation; relink with --no-relax
SOLUTION:
Hi, Seems like found a solution to fix the compilation ...Adding of
"-Wl,--no-relax" in LDFLAGS does not solve this problem, but
"-mcmodel medium" in FFLAGS fixes this issue, after searching for
"Relocation truncated to fit" in google search engine, it comes up
with this link which was helpful to solve the issue
"https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/268394"
Best Regards,Prabhakar
See also:
https://community.intel.com/t5/Intel-Fortran-Compiler/relocation-truncated-to-fit/td-p/1146616
This looks like mixing compilers and libraries from different systems
mixed up, either 32bit vs. 64bit or installations for ifort and
mpiifort based on different glibc or something similar.
I'm still curious about your "development environment":
Q: Have you been able to successfully compile, link and run ANY
program with your crayftn? Q: What version of crayftn? 10.0.1? Q: What
platform? Where is x86_64-pc-linux coming from? Just curious...

Related

Upgrading gcc to 8/9 trigger "Error: unsupported instruction `vmovdqu'" while gcc-7 runs fine

I compile Apache Arrow (https://arrow.apache.org/) with CMake 3.15 and gcc/g++-7 (7.5.0) and it goes well. However, when I upgrade gcc/g++ to 8(8.4.0) and 9(9.3.0) with the same CMake version, I got the following errors:
/tmp/ccrlCxYO.s: Assembler messages:
/tmp/ccrlCxYO.s:5651: Error: unsupported instruction `vmovdqu'
make[2]: *** [src/parquet/CMakeFiles/parquet_objlib.dir/build.make:194: src/parquet/CMakeFiles/parquet_objlib.dir/encoding.cc.o] Error 1
The target file (encoding.cc) is a pure C++ file. It uses Intel Intrinsics, but does not contain any assembly code.
This is the first time I see an "Assembler message" error. So I request some help understanding what it means. My question:
When would the assembler complain about unsupported instruction? I have seen unsupported instruction at runtime before, but not this "Assembler message". As this happens after upgrading GCC, I guess this is a new feature of the new compiler/assembler? I cannot find any document, so if anyone can point to me any doc explaining this it would be very appreciated.
Adding "-mavx" to target_compile_options does not solve the problem. Anyone has a suggestion of solution to the problem?
Thank you!
TLDR: I found the solution is to add "-mavx512bw" to target_compile_options
Please continue reading if you want to hear more detail about the root cause, and how I found it.
After googling a bit I found this webpage talking about a bug of GNU AS. https://www.mail-archive.com/bug-binutils#gnu.org/msg30524.html
That webpage reports that AS does not recognize "vmovdqu16", which needs the support of AVX512VL+AVX512BW. However, the assembler reports an error message saying "vmovdqu" is not supported.
This reminds me that I may encounter the same issue. The AS actually receives "vmovdqu8/16/32" but it reports "vmovdqu". This error message is very misleading because "vmovdqu" and "vmovdqu16" need different instruction set supports. The former only need AVX, but the latter need AVX512BW+AVX512VL.
I decided to give it a try and add -mavx512bw to the compile option ( I already have avx512vl before). It actually fixes the problem.
So I think the whole story is: the newer version of GCC uses some new SIMD instruction, which the old GCC did not use.
Hope this helps someone who also run into similar problems.

Netbeans remote compile failure, cannot compile on the target

I have a little bit starnge question. Im started to programing Raspi, and i would like to compile my code on the target Pi. If i make it manually i can compile it, but the netbeans(version 8) give me fault for the remote compile.
gcc -o file file.c -lbcm2835 thats how i need to compile. Or g++.
Here is a little bit codesnap from the output with the error. [http://codepaste.net/fygdpj][1]
Please let me allow to ask some help with this situation, oh yes the bcm2835.h is in the /usr/local/include
Regards

Compiling Qt 5.3.1 from source error at qprintsupport

I'm not sure whether or not this question has a causality with my previous question.
So, I compiled Qt 5.3.1 from source with MinGW 4.8.2. The build stopped at qtbase/src/printsupport directory, as you can see the image below:
Is it a bug or something at qtbase/src/printsupport/kernel/qprintengine_win.cpp file? Then, should I just report it to the developer?
Look here it give you a hint. Probably somewhere you use this key -Werror in make files implicitly or explicitly when start compilation with gcc. If I correct understand error in that switch operation must be default: statement or case PPK_CustomBase: statement.
miraiE,
If you will notice in your output: cc1plus.exe: all warnings being treated as errors
This is, as was mentioned before, a warning that is stopping the compile process as an error.
You should be able to run you configure.bat script again, with the option -no-warnings-are-errors.
Then re-run your make.exe to get past this, and other warnings, from stopping the build.
Details of the specific configure options below:
../qtbase-opensource-src-5.3.1/configure --help |grep -i warn
-silent ............ Reduce the build output so that warnings and errors
-no-warnings-are-errors Make warnings be treated normally
-warnings-are-errors Make warnings be treated as errors
I hope this helps!

why am i seeing this libzdb configure error?

I am attempting to install libzdb on my macbook however I see the following error message when running the configure:
configure:13334: error: setjmp is required
the setjmp.h file resides within /usr/include and is specified within my "$PATH" as
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/include
Can someone please advise as to how i can rectify this issue?
thanks in advance
I've stumbled across this error while building one of my own programs when I wanted to use setjmp() and longjmp(). For some reason, the toolchain that resides in / on OS X is flawed, and the <setjmp.h> header file is missing the declarations and data types.
To fix it, I had to download Xcode (damn!) and tell the compiler to look for the headers in the freshly installed MacOSX10.7.sdk (or 8) folder:
clang -Wall -o foo foo.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
ok finally figured it out. For those who have seen messages like this be warned that the configure logs can be misleading. It turned out the binary built fine, however it was failing during runtime because a few mysql libraries could not be found. using the following command *export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/* would fix the problem

Issues compiling vmware web api client code into useable objects

I'm using vmware's web application api in an attempt just to simply retrieve the fields in the "ServiceContent" object. There is an example of how this should be accomplished located at the vmware forum. The example contained there compiles fine for me however I get segfaults when running the simple example - specifically the trace goes back to the soap_serializeheader() function (I believe these are defined in stdsoap2.cpp). My problem is that I do not know how to avoid this segfault and have no idea why this is occurring (as I am following the example almost word for word). I am using OS X tool chain (gcc version 4.0.1 (Apple Inc. build 5465) ) combined with (gsoap release 2.7.16). I tried gsoap 2.8 but got the same result. Below is the procedure I used to get to where I am now.
These are the commands I used to parse the wsdl:
wsdl2h -o vim25.h vimService.wsdl
Once this is parsed, I compiled using the following command:
soapcpp2 -x -C -pvsp vim25.h -I/place/where/stlvector.h/is
this generates files vspC.cpp, vspClient.cpp, and vspVimBindingProxy.cpp. Internally these files have the same prefixes for functions (i.e. ns1/ns2 etc) so my calls are the same as those in the example.
This is the command I am using to compile vspC.cpp and vspClient.cpp:
g++ -DWITH_COOKIES -DWITH_OPENSSL -c vspC.cpp
g++ -DWITH_COOKIES -DWITH_OPENSSL -c vspClient.cpp
This is the command I use to compile stdsoap2.cpp (if I do not compile with -DWITH_NONAMESPACES I get an error about an undefined symbol "_namepspaces" when I link everything):
g++ -DWITH_COOKIES -DWITH_OPENSSL -DWITH_NONAMESPACES -c stdsoap2.cpp
I then link everything together with the test code (again this is copied almost identically from the example, just with the changes to correctly refer to the files I created):
g++ -DWITH_COOKIES -DWITH_OPENSSL vspC.o vcpClient.o stdsoap2.o testcase.cpp -lssl -lcrypto -o doesntwork
This compiles correctly, but of course fails to run. I read about an OS X user in this vmware forum post who was also having trouble. It appears the gsoap guide says you cannot use stdsoap2.cpp's header and fault serialization codes, and you must compile them separately. The user in the OS X post seems to have done this, however I am not sure how to incorporate them into my test file (he creates the empty env.h file and then compiles it with soap2cpp) - if I include the envH.h file i get about naming conflicts with vspH.h. So a second question would be how do I use soap2cpp to compile all the stubs correctly so that there are not namespace conflicts (which is what I appear to be encountering).
I will not provide the source, as it is displayed at the first vwmare forum link by user stumpr. I do not believe the issue is in the source, but in the way I have used either wsdl2h, soap2cpp, or some incorrect combination of flags during compilation with g++.
Thanks for taking a look, and hopefully some one can resolve the issue!
EDIT I think I may have solved this - by using a 64bit system (and one with more memory). I tried compiling with -m32 on the X.6 and it was not able to do it (complaining about memory issues).
Hopefully someone will stumble upon this and be happy to know the answer.