Trying to find out what specific atom package changed terminal functionality - macos

I installed Atom over the weekend and installed some packages to make it more functional. After installing some of the packages, I ran terminal and ran a g++ command to compile some software and the error codes and display now look a lot different. Its actually much more clear in this form what the issues are, but that's besides the point. I'm wondering if anyone might know which package might've caused this sort of change? The easiest thing to do would be be to list all of the packages I downloaded, but I downloaded quite a few and ended up uninstalling some, so I don't even have a definitive list of what they could be. I'm not even 100 percent positive that it was an Atom package that changed the g++ output, but I don't recall it looking this way before. What I'm referring to is the error message and the green arrow pointing to the exact issue. I don't believe this was the way the output looked before after trying to compile a program with issues.
I realize this is a vague request to track down, but if anyone has any idea which package might've changed the way g++ outputs errors to the screen, that would be awesome.
I'm ultimately trying to figure out how to remove whatever it was that changed it and go back to the original output, so if anyone has any suggests for maybe reverting the functionality, I would try that as well.

Apparently, I've spent a majority of my time compiling in the linux shell via g++ that I never really paid attention to the the way the error messages look in mac terminal when using g++.
After a bit of digging, I found that g++ is using clang. After looking at the clang documentation for "Expressive Diagnostics," I've come to find that these sort of markups (what Clang devs are calling "Caret Diagnostics and Range Highlighting") are normal and standard, not installed by Atom. I must've drawn that conclusion randomly out of paranoia, after installing packages and packages for Atom and only then, noticing the difference in error output between Linux shell g++ and Mac Terminal g++.
A poster named "Adam" suggests that "Homebrew" is an easier way of getting Terminal to revert back to using GCC instead of Clang, which should be close to what I'm used to with the Linux shell experience with g++

Related

How to build or get a original latest version of GCC for Windows?

I want a latest version of GCC for Windows.
Now the latest version is 9.2 but for Windows via MinGW it is just 8.1...
I have tried to build from source for Windows 10 include WSL, but have not found how to do it exactly, I do not want use via CygWin or other emulater, just real on Windows as clang and MSVC.
Note: I have Windows 10 latest version with WSL.
The latest version of GCC (9.2.0) compiler combined with the latest MinGW-w64 (7.0.0) headers and libraries can be found in the standalone build at http://winlibs.com/
Oh the pain, getting a working GCC for Windows.
build your own?
Building is a fun experience, or a no-fun experience, depending on how you look at it.
I've spent literally weeks of time building GCC successfully and unsuccessfully (native and cross). Follow the instructions to the letter, and it works. And then, another day, it doesn't work (with the slightest different sub-sub-release or revision, or the tiniest little change that is entirely "harmless", or to the best of your knowledge no change at all, and you never get it to build again).
Save everything you've done (copy console), keep the build tree, and repeat the build (paste text) 6 months later after first doing a svn update. Compiles fine for 15-20 minutes, then fails. Start from scratch, and spend a day or two until it works, and you cannot tell why it works now.
Use a build script by someone who offers binary builds (so the assumption is that it must work, otherwise where do the binaries come from). The build script more or less does exactly what you've done by hand anyway, and it works, or maybe doesn't work. If you are only interested in actually having a compiler that works for compiling under Windows, and not in spending your life fiddling around, that's not a lot of fun.
use a pre-built binary?
There exists serval binary distros from a variety of sources.
Although downloading binaries is of course always a tidbid risky (even when scanning everything before you run it, malware scanners are nowhere near perfect, or even good or halfway reliable), compilers are particularly high-risk. That's because compilers are a very interesting target for malware distributors as they get free redistribution with everything you build.
I've actually seen GCC builds with malware built-in on apparently harmless sites (forgot the name, but one such example was a site offering GCC builds for several architectures, which looked very nice).
Now... there exists a distro which supports GCC 9.2 since some time built by someone under the pseudonym "nuwen".
It turns out, that "nuwen" is actually Stephan T. Lavavej, so... chances are that this is a distro that you actually want to use (I'm using it anyway). It's unlikely that you will be able build one yourself that's substantially better (also that one has a lot of useful support libs already coming with it), and it's unlikely that it is harmful.
https://nuwen.net/mingw.html
Note that MSYS2 will also allow you to install a very recent GCC (9.1 or 9.2, not sure) via pacman, very fast and very trouble-free. MSYS2 is nice insofar as you get a 95% working Unix-like working environment with 95% of the tools.
And 95% of the time, it works fine in every practical respect. Until then, one day, it doesn't, usually related to some configure script messing up pathnames, or something with environment variables. Or something else very subtle. For example, it is very much possible to successfully build GCC with MSYS2 (I've done it), and it works "perfectly fine" until some weeks later you discover that something doesn't work in your custom build, so some old project of yours now suddenly doesn't build any more when it did with the old stock compiler.
That's probably issues that one could fix, if determined (I'm however too lazy, for me a compiler is something that simply must work).
There are two well known distributions of the GCC bundle for Windows. The first one is by equation.com
http://www.equation.com/servlet/equation.cmd?fa=fortran
and the second one is by winlibs.com
http://winlibs.com/

Clang Mac OS X Maveric, not supporting fsanitize=undefined

I'm getting a segfault in my C program, and I thought I'd use Clangs help in figuring out why, as Valgrind isn't supported (yet).
I try to compile my program with -fsanitize=undefined to activiate runtime checks for undefined behaviour. All I'm getting is an error message which reads something like: "fsanitize doesn't support option 'undefined'". I've also tried using -fsanitize=address with the same result :/
Anyone know why this is?
It seems like -fsanitize is not supported by apple's CLang.
If you go here http://llvm.org/releases/download.html#3.4 you can get the prebuild binaries of clang, that do recognize this option.
However this is harder because then you have to use a Makefile,
IF by chance you use cmake, then you can just easily go to use makefiles.
OR replace the binaries in the Xcode.app/Contents/Developer/Toolchains/.../bin
but I don't know what can happen if you replace Apples binaries, do a backup before to be able to restore.
Honestly, I'm not myself confortable about replacing apple's binaries, because they probably added something in the clang to make it work with Xcode nicely.
Again, the GPL policy of GCC had this advantage that apple could not modify it.
-> another solution is to develop on linux,
The port to windows of CLang is on its way, but not ready yet, maybe in 3.5.
Best

How to compile a makefile on OSX 10.8 with no Terminal experience?

I've tried searching on this and everything seems to assume more knowledge on the subject than I have. I've downloaded this PureData external: https://github.com/badgeek/fux_videoglitch , and I think I need to compile the makefile, but I don't know how to do this. There doesn't seem to be a readMe with any instructions, and I can't seem to figure it out from any search hits. Can anyone point me in the right direction here? Thanks
First, you'll need to install either Xcode or Make. There's another stack question that relates the process for installing make in OSX install make command without already having make (mac os 10.5)
At which point you'll simply put in to terminal:
make targetfile
http://mrbook.org/tutorials/make/ has some great background on how this works. Make is simply for compiling big multifile programs.
IIRC Pure Data is kind of tricky to compile in the first place, so you'll want to keep instructions for compilation handy - the Pure Data mailing list often has users confused by this process.

how to obtain VC++ compiler-style help on GCC G++ compile/link errors (on linux)

I'm using VC++ as professional developer for more than 10 years and it has been good to me, now I'm trying to broaden my horizons and learn C++ development on Linux.
On Windows things are simple, VC++ does it all (editing, project management, help, debugging), but on linux things are different, you have assemble your development environment from different tools.
I'm still trying to tie things together, and one thing I still haven't figured out is how to decipher GCC (G++) errors when compiling/linking C++ apps on Linux (although I realize GCC is multi-platform, I'll refer to my linux experience here only).
In VC++, things are very clear: If during compilation VC++'s compiler encounters error in program, it will create new entry in 'output' window with the 'compiler error ID'. Example:
c:\projectA\fileB.cpp(38) : error C2228: left of '.cout' must have class/struct/union
From here, you can click on the line in question in 'output' window, press F1, and 'Microsoft Document Browser' app will start (if it wasn't started already), which will load MSDN help file describing compile error connected to the compiler error ID (in example it's C2228), usually with sample you can check out to figure out what's wrong with your code. If you don't have MDB installed, you can always search on the web for C2228 and get the same help page, optionally finding other people's web pages describing their experience with this error.
The same thing is with linking, you'll get 'linker error ID' (e.g. LNK1123), which you can use to find help either locally or on web.
Try as I might, I can't find this kind of functionality in GCC's G++. All I can see is bunch of less experienced GCC developers asking another bunch of more experienced GCC developers to analyze their code based on descriptive compiler/linker errors with no associated error IDs.
Is there tool(set) that provides VC++ compiler-style help on GCC G++ compile/link errors for linux?
You may try to use qtcreator. At least it can show the errors in a more comprehensive way comparable to the VC++, that is, it can locate the error position and highlight the error line and variables.
If you can an alternative might be to use Clang instead. It gives much better error messages than g++. It compiles most code these days (but it still a work in progress). Highly recommended.
Alternatively (as another poster has mentioned) you could use an IDE such as Eclipse to capture the error messages, though I don't think that adds anything beyond taking you to the line number on double-click.

Is there a way to install gcc in OSX without installing Xcode?

I've googled the hell out of it, and it seems like there is no way to install gcc on OS X without installing Xcode (which takes at leats 1.5GB of space). All I need is gcc and none of the other junk that comes with Xcode. And at this point, I'll take any other kind of C compiler.
I know I could simply install Xcode, but that is beside the point since I neither have my original installation disc nor a quick internet connection.
So... does anyone have any suggestions?
EDIT: Sorry if I was unclear, but I need the headers as well. I'm currently installing gcc4 via fink and it's downloading the shared libraries as well. I'll update on the progress.
EDIT 2: Ok, so I successfully installed gcc using fink. BUT, it's pretty much useless: "error: C compiler cannot create executables". After googling around, I found that not having Apple's Developer Tools installed is the cause of the error. Probably because I need all the libraries, headers, etc that are only available through Xcode.
Checkout command line tools for Xcode from apple. It's official support from apple to only create the command line tools.
Try the osx-gcc-installer on github.
I've been doing this for a long time, and I've done things like this, and I've concluded it's simply never worth doing. :-(
The reason is that no one expects you to do such things, so there are assumptions all over the system that "everything" is there. You might not run into this today - or worse, you might not even realize later that this is the cause of your issues.
Instead of wasting your smart time on things like this which don't actually produce any working code you can use, following the approved method, run the download overnight, and spend your time instead on planning and writing the top-level code (you shouldn't need a compiler for that anyway!)
I'm fairly certain that this is not possible. However, I'm also not sure if you need the whole developer suite to get the developer tools installed. Quite a few tools get installed along with XCode that might be optional. However, I think you're out of luck for not needing to bite the bullet and use wget or DownThemAll or some other download manager that will let you slowly download the developer tools in chunks.
Whenever I install OS X I install the developer tools as a rule, just because it opens up the world of available software tremendously. Perhaps you should consider doing this in the future as well.
The first thing you want to try is called Pacifist - what Pacifist lets you do is to open a large package (such as XCode) and to access parts of it directly. I'm pretty sure you'll be able to find a smaller package inside the XCode package that just has gcc.
HOWEVER it's not clear to me that this is the best route. If you are planning to do Cocoa or Carbon developing I strongly suggest installing the entire package because you will need all the documentation and headers. If you're only planning on doing command-line stuff, you still may find you need to poke around inside XCode to identify all the packages you will need - things such as libraries, headers, man pages and so on.
All in all you're probably still better off installing the whole thing - if HD space is really tight (because you're on a tiny old iMac for example) then look at tools like Monolingual - Monolingual removes all the international support from all the various OS X applications, which can easily reduce the size of an application by 50%.
There's fink and MacPorts, if you want an easy installer/updater.
Install the GCC package from the Packages directory in Xcode's disk image and you'll have just GCC. Note that of course you won't have autotools or other standard build tools, for which you will have to install more packages from that folder.
I found this googling around that appears to install it without XCode.
install Command Line Tool separately.
refer to
http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x
http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/
yes i could do it with port but you need at least to accept the code license.

Resources