Using intel compiler in atom editor - atom-editor

My .bashrc contains a line like:
source /opt/intel/compilers_and_libraries_2016/linux/bin/compilervars.sh intel64
and now I would like to compile my program from atom using atom-build, so I have the following file in my atom-build.yml:
cmd: ifort main.f90
and if I then run Ctrl+Alt+b the error is:
/bin/sh: 1: ifort: not found
If I start atom from the console this problem doesn't exist. How do I run ifort from atom without using the console?

Related

Opening the atom editor from iTerm2 window is displaying - 'zsh: command not found: atom'

Just installed iTerm2 with oh-my-zsh, with atom already installed..
I have cloned a git repo of mine to use on an older laptop and for some reason oh-my-zsh is not opening my atom on the usual command.
➜ LandingPage git:(master) atom .
zsh: command not found: atom
Tried rectifying it by accessing and changing the .zshrc file but permission is denied. Anyone any suggestions?
Thanks,
Ant
As per this question/answer it looks like atom may not have created a symlink to the atom command.
This has nothing to do with zsh -- the first argument is just telling you the shell, the information after it is the error.
For example on my machine (which doesn't have atom) when running zsh and trying to open a file with atom I get zsh: command not found: atom. When I try the same command with bash, I get bash: atom: command not found.
Let me know if the above link doesn't work! Hopefully this helps.

Why my codelite execute 'make -j 0'

I'm using cmake-GUI on windows, generating for codelite, to build a simple "hello world" project (https://github.com/jameskbride/cmake-hello-world). I'm trying to use cygwin compilers but when I run the build command, I got the following error:
C:\WINDOWS\system32\cmd.exe /C C:/cygwin64/bin/make.exe -j 0
----------Building project:[ Debugging - Debug ]----------
make: the '-j' option requires a positive integer argument
Usage: make [options] [target] ...
Why it is happening?!?
My cygwin folder is in PATH. In cygwin terminal the project works.
Your project was generated by CMake - this means that the project is set to custom project so the command to execute (in your case make -j0) is set in the Project Settings->Customize->Custom build page.
On that page you have several entries with different titles (Build, Clean etc)
Double click each entry so it will open in Edit mode and remove the -j0 option
This looks like a bug in CodeLite - CMake generator

No `/Builds` directory when using `gdb`

I am trying to use gdb with R. My gdb command seems to work fine with executable (written in C) but I encounter some issue when I use gdb in R.
I did
sudo R -d gdb
In case it matters, the reason for using the sudo command can be found in this post (see most upvoted but not accepted answer) (I am on MAC OSX 10.11.3).
Right before the (gdb) prompt, it says:
Reading symbols from /Library/Frameworks/R.framework/Resources/bin/exec/R...
warning: `/Builds/CRAN-QA-Simon/R-build/mavericks-x86_64/R-3.2.3/src/main/Rmain.o': can't open to read symbols: No such file or directory.
(no debugging symbols found)...done.
I can confirm this file does not exist, I don't even have a /Builds directory. When I enter run, then a very long list of [..] can't open to read symbols: No such file or directory appears.
How can I debug this issue and make gdb work with R?

php-cs-fixer got broken for linux users after fixing the issue 6 for windows users

I use Linux Ubuntu 16.04. I have well installed php-cs-fixer for atom 1.9.8.
$ php-cs-fixer
PHP CS Fixer version 1.11.6 by Fabien Potencier
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
fix Fixes a directory or a file
help Displays help for a command
list Lists commands
readme Generates the README content, based on the fix command help
self-update Update php-cs-fixer.phar to the latest version.
selfupdate Update php-cs-fixer.phar to the latest version.
The problem comes with config of php-cs-fixer with atom. In fact, package requires:
a PHP Executable path (which is by defaut php) (for linux user it must be empty which is not possible with actual version of the package) (see isse #6 )
a PHP-CS fixer Executable path (which is simply for linux user php-cs-fixer (without the use of PHAR file))
Consequently, when I run php-cs-fixer from atom I get this error: Could not open input file: php-cs-fixer.
I can generate this error message with this console command:
php php-cs-fixer fix Class.php
Could not open input file: php-cs-fixer
So, can you make PHP Executable path optional (not compulsory) for that package of atom???
thanks,
Update on this issue:
I managed to download php-cs-fixer.phar from https://github.com/FriendsOfPHP/PHP-CS-Fixer and I put it in the folder ~/.composer/ so that:
a PHP Executable path is php
a PHP-CS fixer Executable path is: ~/.composer/php-cs-composer.phar
But now I am getting this error: Could not open input file: ~/.composer/php-cs-fixer.phar
So what's wrong??
For you information, running the console php ~/.composer/php-cs-composer.phar Class.php command is successful.
The solution is found on github:
a PHP Executable path is php
a PHP-CS fixer Executable path is: /home/username/.composer/php-cs-composer.phar and don't use the ~ in atom.

I want to use gdb with my Qt project..But I received "Permission denied" message?

I have a Qt Project on Ubuntu. I want to use valgrind analysis.
And I wrote this command : gcc myApp.pro -o myApp -g
But I received this error : File format not recognized
OR I wrote this command : valgrind ./myApp.pro
I received this error : ./myApp.pro Permission denied
What can I do for valgrind analysis (Using gdb) ...
Thank you for your reply
gcc expects source files to be passed. valgrind expects executable file. Neither of them expects project file.
Firstly you need to compile your project as usual to produce an executable file. Then you should run valgrind like this:
valgrind -q --tool=memcheck --leak-check=full --leak-resolution=low \
--suppressions=Qt47supp.txt ./[your-app-target-name]

Resources