Eclipse makefile build is slow... What gives? - linux

We are avid Eclipse fans -- it is fantastic! But we have about 40 c++ projects (and growing), and building all of these projects, when all projects are up-to-date, takes about half a minute (total). If I were to simply create a bash script that executed "make all" on all 40 projects, it would execute in way less than a second.
Eclipse seems to want to run a test for the proper tools each time by executing:
g++ -E -P -v -dD /myfolder/.metada/.plugins/org.eclipse.cdt.make.core/specs.cpp
where specs.cpp is an empty file. This step seems to be taking most of the build time.
Any insight here from anyone? Any way to tell Eclipse to trust the tools?

I would suggest you to experiment with C/C++ Build Discovery options page of your projects properties. The first thing that I would try is to turn off "Enable generate scanner info command" option.

Related

blank window when lunching .exe produced by neutralino build release command

I've tried neutralino.js ( javascript framework for building desktop application using web technos).
The first time i run the program , every thing work right. But after running the neu build --release and lunching the .exe file in dist folder, I ended up with a blank page.
Does anyone knows why?
Per documentation you want to run the command
CheckNetIsolation.exe LoopbackExempt -a -n="Microsoft.Win32WebViewHost_cw5n1h2txyewy"
as a super user
https://neutralino.js.org/docs/getting-started/your-first-neutralinojs-app/
The site also recommends that you install WebView2 Runtime for a better developer experience.
https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

cargo always starts with " Blocking waiting for file lock on build directory"

I recently installed rustup on my Windows machine and incorporated it into Atom as my editor. Everything works fine, but as soon as I do a cargo run on my project, the first thing that Cargo says is:
Blocking waiting for file lock on build directory
This blocks the whole process for about a minute before the actual compile and run starts. As far as I remember this did not happen before (I use Cargo under OS X but without rustup).
Is there any way to disable this or at least reduce the timeout?
The tokamak Atom plugin runs cargo commands. Since you cannot run cargo twice at the same time, you get this notice.
I don't think there is something you can do, unless waiting for the compiler to speed up.
Perhaps playing with the options like save_buffers_before_run in tokamak.toml could make a difference.
Today I facing the same problem, and this command works for me:
rm -rf ~/.cargo/.package-cache
Once you run the code, just run cargo build

"not running as user lfs, you should be" error

Description
Trying to install pilfs (the LFS for raspberry) on my raspberry pi 3. I'm following the guide as posted here: http://www.intestinate.com/pilfs/guide.html
I'm currently following their "chapter 8"
8 Building Chapter 5 [5.4. Binutils - Pass 1]
Alright, this is the moment of truth. Will you make your way through
chapter 5 slow and steady, or just execute the build script and go do
something else for 30 hours? This is for you to decide ... I've done
both :)
Also, here is where you might want to start a tmux or screen session.
Because if you break your ssh connection or your router has a hickup,
your build will just stop.
So you've made up your mind? Okey, script runners, start your engines:
cd $LFS/sources
chmod +x
ch5-build.sh
./ch5-build.sh
The script will report your SBU time after the first binutils build has finished, mine
is usually around 1 hour.
For those brave souls who are working through the chapter by hand,
check out the about page and read the build scripts to figure out
what's going on.
Error
When I do ./ch5-build.sh, it's causing the following mesage:
Not running as user lfs, you should be!
Question:
What step did I miss for this to happen? How do I run myself as a "lfs user"?
You need to enter su - lfs in the command line and then enter your password. This is assuming you have created the lfs user earlier in the book. From there, you can run the shell script.

How to do a gradle tasks with info switch

I want to follow instructions that say to compile with gradle tasks --info.
Where do I run this?
Is there a way to do this from inside Android Studio? If not then I wouldn't know how to point it to my project. I was hoping there would be a combo box I could set to the info verbosity level and just redo my build, but I can't find anything like that.
--info is a command line switch. You will need to run this from the command shell.
See also: https://docs.gradle.org/current/userguide/gradle_command_line.html

matlab script editing

I would like to edit matlab scripts in two cases
(1) In matlab Command window running in a linux terminal, how to create and edit a script file? use
edit(filename)
will invoke the interactive editor, which is not desired while operating on a linux server.
(2) In emacs, is there any way to edit matlab script conveniently? Which is better, using MATLAB-Emacs or EmacsLink?
when I am trying to cvs checkout MATLAB-Emacs from http://sourceforge.net/scm/?type=cvs&group_id=154105, which modulename should I specify?
Thanks!
EDIT:
When installing MATLAB-emacs, there is some problem. I thought my CEDET is installed here:
/usr/share/emacs22/site-lisp/cedet-common
/usr/share/emacs22/site-lisp/cedet-contrib
My CEDET is of version 1:1.0pre4-3 (intrepid) on Ubuntu. So I type the command:
$ make "LOADPATH=/usr/share/doc/cedet-common /usr/share/doc/cedet-contrib"
for loadpath in . /usr/share/doc/cedet-common /usr/share/doc/cedet-contrib; do \
echo "(add-to-list 'load-path \"$loadpath\")" >> autoloads-compile-script; \
done;
"emacs" -batch --no-site-file -l autoloads-compile-script -f cedet-batch-update-autoloads matlab-load.el .
Generatim autoloads for cedet-matlab.el...
Generatim autoloads for cedet-matlab.el...done
Generatim autoloads for matlab.el...
Generatim autoloads for matlab.el...done
Generatim autoloads for mlint.el...
Generatim autoloads for mlint.el...done
Generatim autoloads for semantic-matlab.el...
Generatim autoloads for semantic-matlab.el...done
Generatim autoloads for tlc.el...
Generatim autoloads for tlc.el...done
Generatim autoloads for semanticdb-matlab.el...
Generatim autoloads for semanticdb-matlab.el...done
Updatim header...
Updatim header...done
Wrote /home/tim/.emacs.d/matlab-emacs/matlab-load.el
make: *** No rule to make target `matlab-publish.el', needed by `lisp'. Stop.
What's wrong? Thanks!
You should be aware that starting with version R2009a EmacsLink has been removed from Matlab, so I would say that at this point Matlab-Emacs is a better alternative. The main strength of EmacsLink was tighter and integration with Matlab, especially when using the debugger, but current version of Matlab-Emacs is quite capable and will probably satisfy most people's needs just as well as EmacsLink.
In order to invoke Emacs from Matlab, the cleanest solution is to run the Emacs server (M-x server-start). The edit() command can then be set up to open the script in Emacs. The detailed instructions on how to do this, as well as on running matlab-shell as inferior process are provided here:
http://blogs.mathworks.com/desktop/2009/09/14/matlab-emacs-integration-is-back/
Regarding CVS checkout: modulename is "matlab-emacs". You used to be able to download an archive and simply unpack into your elisp directory.
EDIT: I decided to reinstall matlab-emacs; here is a step-by-step of what I did. (The steps are pretty obvious, but this might still be useful seeing how it's easy to run into a compilation error or to misinterpret some instructions). Note that matlab-emacs didn't compile until I reinstalled CEDET.
Download CEDET from http://cedet.sourceforge.net/ (1.0pre7 in my case)
Uncompress the archive into ~/.emacs.d/elisp/ (now have ~/.emacs.d/elisp/cedet-1.0pre7/ directory)
Compile CEDET via make EMACS=/usr/bin/emacs
While in ~/.emacs.d/elisp, do the cvs checkout:
cvs -z3 -d:pserver:anonymous#matlab-emacs.cvs.sourceforge.net:/cvsroot/matlab-emacs co -P matlab-emacs
Compile matlab-emacs via
make "LOADPATH=../cedet-1.0pre7/common ../cedet-1.0pre7/eieio ../cedet-1.0pre7/semantic/bovine/ ../cedet-1.0pre7/semantic/"
Ideally, everything should compile; now it's time to edit startup files: in the .emacs add
(setq load-path (cons "~/.emacs.d/elisp/matlab-emacs/" load-path))
(load-library "matlab-load")
and in matlab's startup.m add
addpath('~/.emacs.d/elisp/matlab-emacs/toolbox','-begin');
rehash;
emacsinit;
That should do it! Launch emacs, and do M-x matlab-shell. If edit foo.m doesn't open foo.m in emacs, make sure that the server has been launched (M-x server-start).
To be most productive, you might wish to figure out what works for you in terms of sending commands from the edit buffer to matlab process (experiment with the shortcuts in the mode help). Finally, if you need to debug stuff, do dbstop in foo, and when you run foo you can either use use dbstop family commands (look them up) or turn on toolbar (M-x tool-bar-mode) and use the buttons there to control breakpoints, stepping, continuing, etc. When finished, type dbquit.
Unfortunately, if you are on Windows, matlab-shell is not an option (which is a little surprising, seeing how I can run pretty much everything else under the sun from the command line -- Mathematica, R, numpy...) -- so your options for tight emacs/matlab integration are somewhat limited (unless you don't mind running an old matlab version that supports emacslink).
The matlab-emacs project at http://matlab-emacs.sourceforge.net/ is a slightly more up-to-date version of the Emacs scripts available in the EmacsLink directory that comes with MATLAB. It is OK to use the matlab-emacs project files with the EmacsLink files that comes with MATLAB.
The "modulename" is "matlab-emacs".
I made a blog post about how to use Emacs with MATLAB in more recent versions of MATLAB where the EmacsLink support was dropped. You can read it here:
http://blogs.mathworks.com/desktop/2009/09/14/matlab-emacs-integration-is-back/
The scripts here show how to tweak MATLAB to to use "emacsclient" so that files are pulled up in an already running Emacs.
EDIT:
The build system is a bit imperfect with a partial download. The fact that matlab-publish didn't compile is not critical.
The matlab-emacs code from CVS includes a toolbox directory with some M code in it. When you run that code, it should setup MATLAB to use emacsclient as the editor. I wrote emacsinit.m against the most recent MATLAB, so you may need to edit it with older MATLABs that don't support all features.
To run emacsclient from matlab-shell, the path should be setup automatically, and it should run emacsclient automatically. If you don't use matlab-shell, you will need to add that directory to your MATLAB path, then call emacsinit.
If it doesn't work for calls to edit, then I'd guess an older MATLAB doesn't have the same configuration features. You can start MATLAB once with the desktop enabled, and use the Preferences dialog to specify your external editor as emacsclient -n.
The reason that matlab-publish.el does not compile is because in fact it is not downloaded (thus missing) by the MATLAB script dl_emacs_support.m. I also find that the download script also did not download company-matlab-shell.el, which exists in the tarball from CVS. Consequently, when make is called, error occurs when the required files are not found.
Even worse, the dl_emacs_support.m script is replaced with the file from CVS when the source files are downloaded by executing the script in MATLAB. Patches or modifications to dl_emacs_support.m is thus lost after the files are downloaded.
To be safe, I recommend to download matlab-emacs from the tarball on the CVS server, or checkout the source. The compilation should go well then.
Remark about CEDET: I checked out CEDET source code and compile it with no sweat. If you are using Ubuntu, I believe the following packages in the repository should be installed before compiling matlab-emacs: cedet-common, ede, eieio, semantic, speedbar. These packages are installed to /usr/share/emacs/site-lisp, so the LOADPATH should be "/usr/share/emacs/site-lisp/cedet-common /usr/share/emacs/site-lisp/ede /usr/share/emacs/site-lisp/eieio /usr/share/emacs/site-lisp/semantic /usr/share/emacs/site-lisp/semantic/bovine".

Resources