Compile gmplib on Linux - c++

I try to compile the code of the library for arbitray numeric precision in C(++) at https://gmplib.org/. I want to do this on a Linux system. I use for this the instructions at the page on https://gmplib.org/manual/Installing-GMP.html#Installing-GMP. The problem is that I get the message, that I'm not authorized to do this. I get:
bash: ./configure: No authorization
But the only thing I think of are the file access rights. But setting them to maximum rights does not help. Can anyone please tell me, how I can solve the problem?

Related

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

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...

AOSP: arm-linux-androideabi-gcc: command not found even though it is present in prebuilts folder

I am trying to compile AOSP android m,
I am getting error:
/bin/sh: arm-linux-androideabi-gcc: command not found
But it is available at:
./prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
./prebuilts/gcc/linux-x86/arm/cit-arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
./prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
v=
Please help understand in case path variable is getting set somewhere in build process or I need to add that in system path variable.
(I want to comment, but I don't have enough credits yet)
Is it compatible with your system?
I have had problems when using non x86-64 compilers on a x86-64 system.
I don't remember how I meditated this but i think it was like this:
http://ccm.net/faq/1137-compiling-testing-in-32-bit-on-ubuntu-x86-64

Simulation terminated with exit code: 132

I am Mac OS 10.11 (El Capitan) user. I used 4.6 and when I tried to build some simulation I always get "Simulation terminated with exit code: 139" and couldn’t do nothing at all with that. I thought that when I install 5.0 then everything will be fine, but now I get something like that:
Simulation terminated with exit code: 132
Working directory: /Users/JL_Data/omnetpp-5.0/samples/tictoc
Command line: tictoc -r 0 --debug-on-errors=false omnetpp.ini
Environment variables:
PATH=/Users/JL_Data/omnetpp-5.0/bin::/usr/bin:/bin:/usr/sbin:/sbin
DYLD_LIBRARY_PATH=/Users/JL_Data/omnetpp-5.0/lib::
OMNETPP_IMAGE_PATH=/Users/JL_Data/omnetpp-5.0/images
And when I tried open some simulation in terminal I get:
Illegal instruction: 4
Do you have some idea what can I do with that problem? I tried to find something on the internet, but after one day I do not get any idea.
If you need some more information, please let me know.
As it is right now, your question is not completely clear, since it requires one to be familiar with omnet++ and probably some experience installing and setting it up. However, let me make a couple guesses.
First, Illegal instruction. This usually occurs when the binary was built for an architecture different than the one it's being run on; e.g. when then SSE2 or AVX instructions are present in the binary code, but are missing on the CPU.
See, for example, this SO question:
Find which assembly instruction caused an Illegal Instruction error without debugging
There is also a question that discusses exactly your problem, namely, "Illegal instruction: 4" on OS X:
What is the "Illegal Instruction: 4" error and why does "-mmacosx-version-min=10.x" fix it?
Now, since omnet++ appears to be an open source project, I expect it to have a mailing list and / or an IRC channel. Indeed, here is the communications page on the official website that links to a Google Groups-based mailing list:
https://omnetpp.org/get-involved
https://groups.google.com/forum/#!forum/omnetpp
I advise you to get in touch with the developers with a thorough description of your problem, since the chances of them knowing the solution are significantly higher compared to the chances of there being a user on SO who has faced similar problems when installing an identical version of omnet++ on an identical version of Mac OS X.

how to get started with PCM?

I wanted to work on Intel PCM. I follwed the below link:
https://software.intel.com/en-us/articles/intel-performance-counter-monitor
I downloaded the code, i started to study example pcm.cpp. But Im not getting any proper understanding. Documentation is not that much clear.
http://intel-pcm-api-documentation.github.io/classPCM.html
I tried to run , pcm.x ,it gave basic information then showed some error like:
"Trying to use Linux perf events...
Linux Perf: Error on programming generic event #0 error: Invalid argument
Access to Intel(r) Performance Counter Monitor has denied (Unknown error)."
Unknown error! I cant figure out why its not accessible. I used with sudo also(root privileges).
Any suggestions how I can start working with it? Where to start?
Found a workaround here by Roman Dementiev that worked for me:
As a workaround you can disable perf usage in the PCM Makefile by removing "-DPCM_USE_PERF".

Cannot open output file: bin\Debug\PrimeChecker.exe Permission denied

so I get this error when I run my program:
cannot open output file bin\Debug\PrimeChecker.exe Permission denied
I've already searched this and have found that none of the solutions other people had, applied to me.
Things I have already done:
Changed the directory
Reinstall CodeBlocks
Checked task-manager with anything starting with CodeBlocks (is it maybe listed as something else)
I had no problem running CodeBlocks before this happened and then it just started happening out of the blue.
I'm running on windows 7, if that helps...
Make sure PrimeChecker.exe is not running (for example, in the debugger) when you build. Chances are - this is your problem.
You can go to bin\Debug\PrimeChecker.exe , and try to delete it. you'll probably will not be able to. so find out who is holding a handle for it. I like to use peocessExplorer for this (download free from MS)
It seems the file you are trying to open in your program hasn't read permission. you should change your file permission to be able to write or read to them. this links should be helpful to change your system file permission or attributes.
http://support.microsoft.com/kb/308419
http://www.wikihow.com/Change-File-Permissions-on-Windows-7