Questions tagged [gcc]

GCC is the GNU Compiler Collection. It's the de facto standard C compiler on Linux and older versions of OS X.

Filter by
Sorted by
Tagged with
1
vote
0answers
22 views

Anaconda and its libraries in macOS Catalina

Apple is constantly introducing changes to how it handles a range of issues. Some are, I assume, security-related. This affects programming environments such as Python (Anaconda) and R and others. ...
0
votes
0answers
57 views

Activity Monitor doesn't show all CPU usage

This seems to be new behavior in macOS Catalina. While compiling a large C project with make -j8, the CPU is obviously pegged at 100%, but Activity Monitor doesn't show all the busy processes. I ...
0
votes
1answer
589 views

Missing header files on macOS Catalina

I am having issues with header files on macOS Catalina. I get command-line tool errors like the following : /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h:443:29: ...
0
votes
0answers
165 views

ld: library not found for -lSystem

New to Mac. I am going to install a software and running make, returns the error: $ make gcc -I/Users/username/softwarename/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/...
1
vote
1answer
129 views

Fatal error utility not found in g++

While I do make in a program I want to install, which installs fine in Opensuse, I get the error warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to ...
1
vote
1answer
51 views

Link gcc using Homebrew on Mojave operating system

I've looked at other questions similar to mine for answers, but I still have no idea what I'm doing. I'm not new to Macs or working in terminal environments, but when it comes to computer structure I'...
0
votes
0answers
79 views

using brew'ed gcc use with gprof and gdb?

I am an application programmer, not a macos developer. Although I have full Xcode installed, I am not fond of the clang toolchain. Instead, I like plain old gcc, gdb, and gprof, as they work on ...
2
votes
1answer
1k views

'stdio.h' file not found, but I have this file at /usr/include/stdio.h

When I compile a package, I got the following error: $ make clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -...
0
votes
1answer
504 views

How to properly install freetype2 devel package?

I wish to install freetype 2 dev package so I can use the fontconvert tool in Adafruit-GFX-Library Here is what I get $make fontconvert fontconvert.c:22:10: fatal error: 'ft2build.h' file not found #...
6
votes
3answers
2k views

Compilation error with Mojave: error: ‘_Atomic’ does not name a type

After updating to Mojave 10.14.4 and Xcode 10.2, I fail to compile GCC 8.3.0. The error message is In file included from /usr/include/sys/sysctl.h:83, from ../../gcc-8.3.0/gcc/config/...
1
vote
1answer
287 views

cc1plus: no such file or directory (gcc)

Issue Every time I try to compile something with gcc I get this error: gcc: error trying to exec 'cc1plus': execvp: No such file or directory What I tried I have tried uninstalling gcc and re-...
1
vote
0answers
204 views

How to invoke /usr/local/bin/g++-X instead of XcodeDefault.xctoolchain/usr/bin/c++

{MacOS 10.14.1 Mojave, Xcode 10.1} I'm working on building the POPF planner under MacOS and I'm stuck on a system library include problem that I'm not sure how to overcome. I have exported export ...
1
vote
1answer
107 views

Any Pitfalls in Replacing gcc and g++ With GNU Versions?

I understand that Clang is the default and recommended compiler for MacOS. By default macOS has binaries for gcc and g++ in /usr/bin/ which are same as clang and clang++. What are the possible issues ...
3
votes
2answers
2k views

How do I get llvm-gcc to point to gcc instead of clang?

When I ask which version of gcc I have, I get the following: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version ...
2
votes
1answer
1k views

ld linker is missing when installing gcc using Homebrew on Mac OS

I am a new Mac user and need to install GNU compilers (C and C++) and CMake for the code I am using. I installed gcc and its binary utilities and CMake via Homebrew with the correct PATH to the ...
2
votes
1answer
6k views

Does “brew install gcc” installs GNU C++ compiler on macOS?

I am a new Mac user and was wondering if installing gcc via brew install gcc command would install GNU C++ compiler?
1
vote
1answer
768 views

GCC with-gxx-include-dir is set to iOS 11.4 simulator

I'm trying to compile https://github.com/zeromq/libzmq which requires me to run autoconf and then ./configure. It was working a few days ago, but now this happens: checking for a BSD-compatible ...
2
votes
1answer
740 views

Why does `g++ --version` say LLVM/clang?

I ran the following to see what version of g++ I had: $ g++ --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM ...
3
votes
1answer
1k views

running ARM program on xcode

I'd like to have a compiler for ARM on my Mac, and I read somewhere that there is a way to run and maybe debug ARM code on Xcode. Anyone has any hint on how I should do or if it is even possible? Any ...
0
votes
2answers
2k views

Installing OpenMP-enabled XGBoost

I have scoured the web trying to figure out how to install XGboost. A simple pip or conda install does not work, even though it worked for many of my colleagues. I went to the installation guide which ...
2
votes
1answer
3k views

How to link gcc? gcc-7.1.0 already installed, it's just not linked

I download the gcc, use brew install gcc but it said the gcc did not linked. how to link the gcc? or what should I do?
0
votes
1answer
675 views

g++ compiler not working after Sierra update

I installed gcc/g++ following this tutorial a while ago (version 6.2). Now that I updated to Sierra, it's not compiling anymore. When checking the version, it respond properly: g++ --version g++ (...
0
votes
1answer
238 views

Can I use both clang and gcc compiler in yosemite?

I need gcc as a default compiler to compile cuda samples and I need clang to compile my network projects because clang has better warnings and errors specifications. Is there any way to run both ...
3
votes
1answer
980 views

How to compile with Command Line Tools for Xcode after deleting the Xcode.app application bundle?

I first had Command Line Tools for Xcode installed and then installed the Xcode app. I have now deleted the Xcode.app application bundle but still have Command Line Tools for Xcode installed. However,...
0
votes
1answer
647 views

Though there is g++/gcc in Xcode 8, gdb isn't found

When I installed command line tools of Xcode in old Mac OS X, there were g++/gcc of a compiler and a linker. There was also gdb of a debugger. In Xcode 8.0 (8A218a) of Mac OSX EI Captain (10.11.6), ...
1
vote
1answer
72 views

security incident or valid homebrew jobs? What's this cc1 process?

On my iMac the fans get very loud and with top I saw that processes named cc1 took very much CPU. Can you explain me this processes? Security incident? > ps -ef | grep cc1 503 38350 38348 0 ...
19
votes
2answers
47k views

Installed gcc with Homebrew, now how to use that gcc instead of clang?

I installed gcc with brew install gcc, but when I type gcc the default behavior is still to use clang. How do I set things so that typing gcc in the terminal automatically uses the gcc installed by ...
0
votes
1answer
2k views

ld: library not found for -lgcc

After a brew upgrade every time I try to compile a .c file I get the following error: ld: library not found for -lgcc collect2: error: ld returned 1 exit status Wrappers like mpicc still work though....
2
votes
1answer
2k views

How can I reinstall gcc?

Im new with mac and tried to install gcc / g++ on an MacBook Air with El Captain. I installed Xcode and used xcode-select --install It completed and was successful. However, for some reason I ...
1
vote
1answer
2k views

Downgrade GCC version

How do I downgrade my GCC v5 to GCC version 4.7 ? I currently don't have Xcode installed and I am using the command line tool. More details : Apple LLVM version 7.3.0 (clang-703.0.29) Target: ...
1
vote
0answers
51 views

GCC 5.X integration on Xcode 6

I need to use/integrate GCC 5.X (in my case 5.3, and it is already installed) on Xcode 6.2. I've found a lot of outdated tutorials about GCC 4.X and Xcode 5 (or lower), but all of them are outdated ...
2
votes
0answers
477 views

Accept Xcode 7.3 license

I want to install a C/C++ compiler for Matlab R2015b. I am running OSX El Capitan 10.11.3. I installed the newest version of Xcode (Xcode Version 7.3 beta 3). According to MathWorks, Xcode 7.x ...
0
votes
1answer
3k views

How do I build and install gcc5 in OS X 10.11 without Xcode?

Obviously installing gcc from source will require a compiler to build it; is it possible to install gcc without Xcode?
3
votes
2answers
11k views

How to get the default compiler of c++ on Mac os x

I am new in c++ on Mac os x and I need to know how to get some details: How to get the default compiler c++/c? How to change the default compiler? How to set the compiler in a CMakelists.txt file ...
4
votes
1answer
8k views

How do I use GCC on El Capitan?

I installed gcc via homebrew with no errors. brew install homebrew/versions/gcc49 brew unlink gcc49 && brew link gcc49 But when I try to run gcc, clang is used instead. ~$:gcc --version ...
3
votes
2answers
5k views

compile error: <atomic> is not implemented

When I compile a open source program called gate with "make" I have this error message: error <atomic> is not implemented I must add that I know this program and I compiled it several times ...
1
vote
1answer
1k views

homebrew gcc-5 fails to find any standard library

I am running os x version el capitan and have installed gcc5 via homebrew. However, compiling simple programs such as: #include <stdio.h> int main() { printf("Hello world\n"); return 0;...
3
votes
2answers
3k views

brew not linking gcc after install?

Why does brew not link gcc properly? What am I missing? $>brew install gcc49 --without-multilib ==> Installing gcc49 from homebrew/homebrew-versions ==> Downloading http://ftpmirror.gnu.org/...
6
votes
5answers
10k views

Can't compile source code on mac

I already have xcode installed on OSX Yosemite. I have also run it and accepted terms and conditions. I can also do gcc --version and I see Configured with: --prefix=/Applications/Xcode.app/Contents/...
1
vote
1answer
128 views

“Failure while executing” error when trying to install GCC

I've followed the instructions of the both the accepted answer to this question as well as the other suggestions, How do I install GCC via Homebrew?. But all I get is the following message when I run ...
2
votes
1answer
2k views

installing old version of c++ compiler

I use OSX 10.10.5 need to compile some c++ code with an old version of gcc, namely 4.3.4. I don't think XCode provide that kind of tools. I suppose there is a way to do that by hand. How can I do that ...
1
vote
2answers
2k views

Where are g++ stl libraries in Darwin

I am trying to understand how some of the data structures are designed in stl. In ubuntu, I usually open the .h and .cpp files from /usr/local/include but in Darwin (kernel version 14.3.0) I am lost, ...
0
votes
1answer
2k views

homebrew libgfortran

My Python app is using scipy which apparently needs libgfortran. After a recent brew update/upgrade, my Python app fails to run due to a libgfortran dependency issue: dlopen(<snip>/scipy-0.14.0-...
3
votes
2answers
12k views

Homebrew: how to switch between GCC versions `gcc49` and `gcc`?

I foolishly uninstalled GCC 4.9 after brew upgradeing to GCC 5. However I need both versions and I need to be able to switch back and forth. I thought I could just do brew switch 4.9.2 but the old ...
1
vote
1answer
772 views

How to link back to the correct C compiler?

While trying to install fink-0.38.4 I get the ERROR: There is no C compiler on your system. Make sure that the Developer Tools are installed. I have got errors about missing a C compiler while trying ...
2
votes
0answers
3k views

Command line tool installed, but gcc/g++ compiler not working

Heads up, I have a similar problem such as in this question, but it wasn't resolved: how to debug configure.sh errors when compiling rsync on Yosemite So basically I am looking to compile code via ...
1
vote
1answer
2k views

how to debug configure.sh errors when compiling rsync on Yosemite

I am trying to build myself a new version of rsync 3.1.1 under Mac OS 10.10.3, as the mac comes with an older version, and the project does not distribute binaries. I followed this simple script but ...
42
votes
5answers
74k views

How to accept Xcode license?

I want to install a C based toolbox on MATLAB software. To do this, I need to install the GCC compiler. I think I have done that already. And I have Xcode too. To setup the toolbox, I need to write ...
4
votes
0answers
4k views

what is difference between gcc version and Xcode gcc version?

This maybe a little silly question but I am very confused executing pkgutil in shell I get $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables ...
1
vote
1answer
705 views

Use specific local gcc and related libraries with Homebrew

I would like to use Homebrew to install some stuff, In the mean time, I have already installed my local gcc, and I want Homebrew to use this specific one (this gcc at /usr/local/bin/gcc is frequently ...