Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

0
votes
1answer
1k views

How to execute a binary file present in different directory?

I have created a binary executable file using the following command: gcc -o /x/y/file_object /x/z/file_program.c How may I execute ./file_object without going inside directory /x/z?
1
vote
1answer
655 views

GNU make - How to concatenate to variable depending on shell command result (GCC version)?

I want to add another option to the CFLAGS make variable, depending on the result of a shell command that i want to execute outside of a recipe in my "configuration" section of the makefile. This is ...
1
vote
1answer
42 views

Switching between shared buffers in emacs gdb mode without mouse (in text-terminal)

From the documentation link here: https://www.gnu.org/software/emacs/manual/html_node/emacs/Other-GDB-Buffers.html When gdb-many-windows is non-nil, the locals buffer shares its window with the ...
1
vote
0answers
230 views

Linux type cast output difference [closed]

I'm using 'gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)'. Below is my question. I don't know why #1, #2 result is different. unsigned int A, B, C, D, E; double result; 1. A=28; B=10; D=5; C = ((...
0
votes
1answer
2k views

Installing software on RedHat with libstdc++ dependency errors

I realize this has been asked multiple times, but after reading through the responses, I still cannot get it. I'm trying to install software called Ovito on RedHat Enterprise 7 and am getting the ...
2
votes
1answer
827 views

Buildroot generate rootfs with gcc

I wanted to build rootfs using buildroot with preinstalled gcc, but I can't find which config is responsible for building gcc package. What I want is just a rootfs for qemu x86_64. Is there a way in ...
1
vote
0answers
421 views

Undefined references to 'get_rome_version' and 'rome_download' when compiling 'btusb_probe' in SM-G360T kernel

When I try to compile the kernel for the Samsung SM-G360T / SM-G360T1, I get identical issues for two different source repositories of the kernel. Kernels I am using: https://github.com/MSM8916-...
1
vote
2answers
2k views

Choose gcc version to compile vmware modules

I'm using Ubuntu 17.04 , and I manually upgraded my kernel version to 4.12.8 using the tool ukuu (Ubuntu Kernel Update Utility). When trying to launch vmware (it is already installed), it asks me to ...
1
vote
1answer
896 views

How to install gcc 6.4.1 on Fedora 26 [closed]

I'm trying to build CORE Network Emulator from source and I seem to have hit this gcc7 bug, so I want to install gcc 6.4.1 but when I try to run dnf install gcc-6.4.1 I get the error No package gcc-6....
0
votes
0answers
96 views

How to install mips64-elf-binutils/gcc?

How do I install mips64-elf-binutils and mips64-elf-gcc? sudo apt-get install mips64-elf-binutils doesn't work. I'm on Linux Mint Cinnamon 64-bit.
1
vote
0answers
109 views

Compiling g++ from source results in broken standard library. error: ‘::realloc’ has not been declared

I need to run on Amazon Linux but I need a recent g++. I compiled g++ 5.3.0 from source following the instructions here. The compilation ran for 13 hours on an EC2 instance and finished successfully. ...
4
votes
1answer
4k views

How to temporarily change default version of gcc in ArchLinux

I have ArchLinux and 2 versions of gcc installed on it. default one ("gcc") which is "gcc (GCC) 7.1.1" and "gcc-5" one which is "gcc-5 (GCC) 5.4.0". I have a hard time building some projects that ...
0
votes
1answer
68 views

Error compiling gettext

I get this error msg trying to compile gettext with Linux kernel 2.4 libtool: compile: gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -...
1
vote
1answer
271 views

Should I downgrade gcc for legacy code?

I inherited a legacy system that looks like this. $ uname -a Linux pos-sthlm-globe-as-209 2.4.19-dxx #10 Thu Dec 22 15:47:12 CET 2005 i686 GNU/Linux niklros@pos-sthlm-globe-as-209:~$ gcc --version 2....
2
votes
1answer
8k views

gcc - error: no acceptable C compiler found in $PATH

I am trying to install GCC from source. I am following the instructions on the wiki at https://gcc.gnu.org/wiki/InstallingGCC and also on this question on SO. I am running into issues on the ...
1
vote
0answers
45 views

Error with installation of HDF-EOS5 augmentation tool: Cannot find -lGtcp

I am trying to compile the HDF-EOS5 augmentation tool. However, when I run: ./configure --with-hdfeos5=/HDF-EOS5-path/ I get the error: checking for inv_init in -lGctp... no configure: error: ...
4
votes
4answers
4k views

How to install multiple version of GCC (GCC-3.3) on Ubuntu 16?

I am not familiar with Ubuntu and I want to install old version (3.3) of gcc to compile some code. When I tried with sudo apt-get install gcc-3.3 it's not installing. ~$ sudo apt-get install gcc-3....
1
vote
1answer
3k views

Installing Tensorflow on CentOS 6.9 (GCC, GLIBC, and binutils problem)

I have been having a tremendous trouble installing Tensorflow on CentOS 6.9. I tried to follow the instruction installing Tensorflow on CentOS using Anaconda3 (naturally for Python 3, Python 3.5.3 ...
11
votes
3answers
28k views

Install GCC 7 on Ubuntu?

I'm trying to run a test under GCC 7. According to How to install gcc-7 or clang 4.0? on Ubuntu.SE, we can perform the following to install GCC 7 on Ubuntu: add-apt-repository ppa:ubuntu-toolchain-r/...
2
votes
2answers
791 views

How are system calls from man 2 invoked?

By system calls, I mean functions like man 2 brk, not the 0x80 interrupt. If I understand this thread correctly, a compiled C program never DIRECTLY invokes system calls. It can only invoke library ...
0
votes
1answer
300 views

error while configuring FFmpeg in CentOS: Segmentation fault & gcc is unable to create an executable file

I am trying to compile FFmpeg in CentOS from source code. I referenced the official compilation guide (https://trac.ffmpeg.org/wiki/CompilationGuide/Centos) for CentOS step by step, and have installed ...
0
votes
1answer
589 views

GCC-5 installation

I would like to install gcc-5 on my local machine. But I am encountering some issues. When I type the following command: sudo zypper install gcc-5 I got the following answer Loading repository ...
1
vote
2answers
610 views

What do compile and link line refer to?

While installing the cudnn library, I came across this in the INSTALL.txt file: Add [installpath] to your build and link process by adding -I[installpath] to your compile line and -L[...
3
votes
1answer
512 views

gcc cross compilation fails

I am trying to build a cross compiling gcc for ARM. This will be to update an existing gcc ARM cross compiler. The build runs fine until it gets to building libstdc++, after libgcc1 builds ...
0
votes
1answer
424 views

I installed and run gcc but dpkg says : package gcc is not installed, why?

I downloaded and installed gcc-4.9 (using the basic ./configure make make install). I can compile code and everything works fine. But dpkg -s gcc claims thats gcc is not installed. However, dpkg -s ...
1
vote
1answer
1k views

C compiler cannot create executables when installing gcc AND binutils

I've been having a problem with building pretty much any GNU program. I try to build Binutils, or GCC using: ./configure make make install However, ./configure always seems to throw the error: ...
1
vote
1answer
5k views

./configure: No such file or directory in GCC [closed]

I'm trying to make an operating following osdev.org. However, I can't do this without cross-compiler mode in gcc. I'm trying to change the host option to i686-elf-gcc (this supposedly activates cc ...
1
vote
1answer
585 views

genkernel all: fstack-protector not supported by compiler

I had never installed Gentoo. gcc has troubles with linux-4.9.16-gentoo. livecd / # genkerel all ... Cannot use config_cc_stackprotector_regular: -fstack-protector not supported by compiler make: *** ...
0
votes
2answers
411 views

Best way to have “alternate” gcc environment on Mint 18.1

Under Mint 18.1, is there a HowTo or info on how (or info that I can't/shouldn't) install a separate GCC toolchain for my own C++ noodling? I don't want to break anything in the regular system, so ...
0
votes
1answer
450 views

How to link gcc-4.8.2 on RHEL 6.6?

The gcc I already had installed in my system is as follows: [root@gksrv Desktop]# gcc --version gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) Copyright (C) 2010 Free Software Foundation, Inc. This is ...
2
votes
0answers
671 views

GCC 5+ on CentOS 6.8

I was wondering how to get GCC 5+ on CentOS 6.8 and use it as the default compiler. I have seen several answers to this, but all of them point to binaries that are no longer hosted on the internet. I ...
0
votes
2answers
2k views

Offline Install of g++ for Debian

I have an offline Debian machine onto which I need to install g++, gdb, etc. (I believe it's the "build essentials" package.) I do not have access to an online Debian machine from which to get ...
2
votes
1answer
655 views

Disabling the security hardening options for a `nix-shell` environment

In an attempt to build GCC (6.3) on NixOS (16.09), within a nix-shell, I get this: make[1]: Entering directory '<my-build-path>/coreboot/util/crossgcc/build-i386-elf-GCC/build-x86_64-pc-linux-...
4
votes
1answer
404 views

cannot find -lm

I am trying to build gcc G4.8.5 for architecture s390x(cross compiled) on x86 32(sles10 patchlevel 4) 2.6.16.60-0.85.1-vmipae for sles12sp2 and i am getting an error /s390x-suse-linux/bin/ld: ...
1
vote
0answers
534 views

Host CFLAGS for cross-build of GCC

I want to build Rockbox from source for MIPS targets. According their the wiki I need a tool chain with binutils v2.17 and GCC v4.1.2 for the mipsel-elf target with CFLAGS="-U_FORTIFY_SOURCE -fgnu89-...
2
votes
3answers
6k views

How can we install devtoolset-4.0 on CentOS 6.7

I tried to install devtoolset-4.0 to use g++ version 5.x via sudo yum install devtoolset-4 However, I got No package devtoolset-4 available. Is there any way to get to that?
1
vote
1answer
60 views

Compiling bzip1 on a raspberry pi 2 with debian server?

I've stumbled across the discontinued bzip-0.21 on the ftp of vim.org which is respectable, so I think it's fine. However the code from 1996 won't compile anymore with today's GCC. Is there a chance ...
3
votes
1answer
311 views

Swift for Android: `ld` cannot find `-lgcc` in swift for android compilation linking step

I'm trying to compile Swift code on Ubuntu 16.04 LTS, following these instructions fairly closely. I was able to download the NDK r14 okay, download the libicu tools and build them, and download the ...
3
votes
1answer
395 views

How to install the latest version of gcc and boost on an old version of openSUSE?

I need to install gcc 5.2 and boost 1.62 on openSUSE 11.4. The point is that the official version of these two tools on openSUSE 11.4 is gcc 4.5 and boost 1.44. I tried to build them from source code, ...
2
votes
0answers
1k views

GCC/G++ compiles code to shared library instead of executable [closed]

I am having a rather puzzling problem. Recently, whenever I compile a program using GCC or G++, the compiler creates a shared library rather than an executable file. The library still runs if I ...
3
votes
2answers
2k views

Problems installing gcc-6 in debian jessie

I was updating gcc to the version in the testing repository of debian; in the middle of the update, it recommends me to stop the postgres service and it gave me the option to stop the installation. I ...
1
vote
1answer
6k views

How to link OpenSSL library in macOS using gcc?

I have OpenSSL installed through the Homebrew package manager. I have found the library and header files I need. The headers are: /usr/local/Cellar/openssl/1.0.2h_1/include/openssl /usr/local/...
2
votes
1answer
617 views

problem installing gcc 5 on debian

I am trying to follow instruction presented here: How to install GCC 5 on debian jessie 8.1 but I am getting this error: sudo apt-get install -t testing gcc Reading package lists... Done Building ...
1
vote
0answers
451 views

MPICC with different versions of GCC

I need to use MPICH with different versions of GCC. Is it possible to change GCC without having to recompile MPI? Example I'd like to do something like this: mpicc --compiler=/usr/bin/gcc-5 Is it ...
2
votes
2answers
10k views

gcc compilation terminated with “fatal error: string: No such file or directory #include <string>”

My situation. uname -a gives Linux computer2 4.4.0-62-generic #83~14.04.1-Ubuntu SMP Wed Jan 18 18:10:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux I am trying to install HDF5 1.8.18 with GNU make 3.81 ...
2
votes
1answer
3k views

Is “make: *** empty variable name. Stop.” after configuring gcc a user error or bug?

After contrib/download_prerequisites and env CC=/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc \ LD=/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ld \ ...
1
vote
0answers
880 views

Installation of glibc in my directory

Hi for the reason here, I would like to install glibc in my own directory. I tried to follow the "HOWTO" here wget http://ftp.gnu.org/gnu/libc/glibc-2.7.tar.gz tar xzvf glibc-2.7.tar.gz wget https:/...
2
votes
1answer
2k views

gcc error installing psycopg2 package for python3 on Centos 7.3

As per this answer, I performed a series of prerequisite setups to be ready to pip install python3 packages. However, when I ran python3 -m pip install psycopg2 I got the following error: ...
0
votes
1answer
45 views

Hpc does not support c++ 11 what can be done to use c++ 11 library [closed]

In our university hpc has redhat based Linux which does not support c++ 11. S
1
vote
1answer
2k views

gcc compiles gcc with errors 'template with C linkage' and 'template specialization with C linkage'

I am working with Ubuntu 14.04 LTS. This already ships a packaged gcc 4.8.4 but I wanted to have a later version of gcc. Using the existing version 4.8.4, I built version 4.9.4 from the source code ...