Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
29 views

Gcc compiles stuff as a shared library instead of an executable [on hold]

I am trying to compile this program in gcc, I type into my terminal gcc main.cpp -o corrupt -std=c++11 it compiles, I go to the file and it is a shared library instead of an executable.
0
votes
1answer
43 views

How to grep using gcc to find definitions in standard librarys [on hold]

I have found in my project a type definition, which is definitely from a standard library. Lets say the definition is called uint64_t I know #include <stdint.h> #include <string.h> #...
3
votes
1answer
55 views

How are GCC versions chosen for compiling the linux kernel?

I know that the linux kernel specifies minimal compilation requirements, but I haven't found any source of information regarding how distros/vendors choose which version of GCC to use when compiling ...
3
votes
1answer
36 views

How to build the GCC HTML documentation from source into a single page?

I had asked a similar thing for GDB at: How to build the GDB documentation from source? , and it changed my life, now I want the same for GCC! I managed to build the docs on Ubuntu 16.04 and gcc 6.4....
0
votes
0answers
32 views

Linux programming: Compile code with dependencies [migrated]

I am new to linux programming and learning it from The Linux Programming Interface by Michael Kerrisk. I have to compile my first program that has dependencies. Directory structure: --linux-...
0
votes
1answer
46 views

Solaris 11.3 - Unable to install system/header

I'm (unsuccessfully) trying to get GCC installed on Solaris 11.3 but am running into a lot of issues. My current issue is that I'm unable to install the package "pkg://solaris/system/header". ...
0
votes
2answers
66 views

In centos,how to switch to default gcc after switched to a higher version of gcc with devtoolset

I want to install several gcc with different versions in centos. The default version of gcc in centos 6 is 4.9.3. So I use devtoolset install a higher version of gcc. Then I switch to the higher ...
0
votes
1answer
46 views

“-sh: Cannot execute binary file” because of source compiled on “x86_64” and executed on “i686” platform

I need to run some USB NCM related test cases for which i have written some test code in .c file. I have compiled the .c file from Ubuntu Host by using GCC compiler and trying to run from Device's ...
-1
votes
0answers
106 views

Linker gcc error “ld: cannot find -lc”

I'm using the following command to compile a file in x86_64 architecture and Debian Jessie: gcc -shared -O3 -m64 -fPIC -o obj/optimize/5.0/libahdlcmi_mixer.so ./obj/optimize/5.0/mixer.o -Wl,-rpath,/...
-1
votes
0answers
58 views

Linux : Executable not PIE instead of using --fPIE

I am using Linux 2.6.32. I am trying to generate a PIE/ASLR executable, using gcc. I can confirm that I am using -fPIE and -FPIC flags during compilation. But my executable ends up to be a ELF 64-bit ...
0
votes
2answers
235 views

How to link to a shared library with a relative path?

In the man page for ld.so(8), it says that When resolving library dependencies, the dynamic linker first inspects each dependency string to see if it contains a slash (this can occur if a library ...
-1
votes
1answer
54 views

Makefile fails when trying to run a C program [closed]

I have a bunch of tasks in making a Makefile file, I have these files: https://raw.githubusercontent.com/systems-cs-pub-ro/uso/master/tema1/boo.c https://github.com/systems-cs-pub-ro/uso/raw/master/...
1
vote
0answers
708 views

Centos 7 gcc 8 installation

GCC 8 is out for a white and I would like to test on CentOS 7, but no devtoolset-8 yet in yum. I found https://cbs.centos.org/koji/packageinfo?packageID=7198 but this is cbs; Can I have it as a ...
1
vote
1answer
258 views

What is the difference between “LSB executable” (ET_EXEC) and “LSB shared object” (ET_DYN)?

With two files, one compiled and linked with gcc and the other manually with nasm and ld I get ELF 32-bit LSB shared object ... ELF 32-bit LSB executable ... What's the difference between these two ...
0
votes
1answer
35 views

Does GCC generate Bit Tests (x86 BT)?

Seaching through the GCC source, I see things like X86_TUNE_USE_BT TARGET_USE_BT My goal is to get an answer for myself whether or not GCC generates BT, BTS, BTR, and BTC. I started with BT and I ...
2
votes
1answer
80 views

install different version of GCC side by side

My primary problem is in my Fedora 28, GCC8 is installed. Now, this gives libgfortran.so.5. But many of my applications are not updated and still depends on libgfortran.so.3 So, how can I solve the ...
2
votes
1answer
683 views

Installing VMWare Tools

I am trying to install VMWareTools 9.6.5-270 on my freshly downloaded Linux Mint 19 from OSBoxes. I am running it inside VMWare Workstation 10.0.7 build-2844087 Like many online, I cannot get past ...
0
votes
0answers
14 views

installing ebtables into modified linux 4.2.8

I have a version of Linux on a QNAP that is missing GCC, make, and a lot of essential packages to build source code - it does have ping, iptables, etc but I really need ebtables command for my work to ...
0
votes
0answers
39 views

Missing cc1 executable on Amazon Linux

I've been trying to build Tensorflow on Amazon Linux (2016.09). I'm struggling with not being able to get cc1 to install with GCC. Here's what I've tried: Installing gcc Installing gcc-c++ Installing ...
0
votes
1answer
64 views

What version of gcc should I use to compile the latest stable Linux kernel?

Do I need the latest gcc? Can I use the gcc binaries included with my distro? Does it matter?
1
vote
0answers
28 views

Compiled execuatable is seen as shared library [closed]

I worked on a Qt app. i went to a build directory, i was an .out or .elf executable that will run once i click it, but am seeing this shared library of a thing, that only runs when called from a ...
2
votes
2answers
226 views

Are there any successful forks or refactors of the Linux Kernel?

A google search reveals this slashdot story yielding this github repository that hasn't had a commit since 2016. There are 22,602 forks listed on github.com but these are going to be mostly (if not ...
1
vote
1answer
240 views

devtoolset-4 was removed from centos-release-scl?

I need to install gcc 4.9 on CentOS 6. And I usually do the following: yum install -y centos-release-scl yum install -y devtoolset-3-gcc-c++ make cmake re2c libuuid-devel libxml2-devel zlib-devel ...
0
votes
0answers
35 views

can linux be built with a coff compiler?

Is it possible to make a bootable linux kernel from a gcc build that outputs COFF files instead of ELF? Does it even matter to the kernel?
0
votes
0answers
133 views

/usr/bin/ld: cannot find -lQt5::Core (and others)

I try to compile Simon Voice Recognition Software version 0.4.90 from source on Arch Linux with KDE Plasma. Source was obtained using git clone git://anongit.kde.org/simon simonsource When I execute ....
0
votes
0answers
27 views

Looking up docs for C header files? [duplicate]

On Ubuntu if I type man 2 time I get, NAME time - get time in seconds SYNOPSIS #include <time.h> time_t time(time_t *tloc); ... I get that this works because time is the ...
1
vote
0answers
121 views

How do I install newer or older versions of GCC on Devuan/Debian?

Some distributions come with package sets for different versions of GCC, which you can easily install in parallel; others do not. Specifically, in Devuan ASCII / Debian Stretch, there only seem to be ...
3
votes
2answers
673 views

What sets fs:[0x28] (stack canary)?

From this post it is shown that FS:[0x28] is a stack-canary. I'm generating that same code using GCC on this function, void foo () { char a[500] = {}; printf("%s", a); } Specifically, I'm ...
2
votes
1answer
3k views

How to install a functional ARM cross-gcc toolchain on Ubuntu 18.04?

Context I recently installed Ubuntu 18.04, Linux foobar-VirtualBox 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux on a VM. I want to cross-compile ...
0
votes
0answers
32 views

How does Ftrace resolve symbols when KASLR is enabled?

Ftrace seems to be able to resolve symbols from address even with kaslr enabled. How does it resolve it? Does it use physical address or virtual address? Can you give the direct referencce to the ...
-1
votes
1answer
394 views

What does the -O2 option for gcc do? [closed]

What does the -O2 option for gcc do? eg. gcc -O2 file1.c -o file1.o
1
vote
1answer
285 views

Difference between the linker flags

I'm adding c++ runtime and exception support to the Linux kernel. For that, I need to provide my own lib/gcc and lib/libstdc++instead of the standard libraries provided by the compiler. So, I am ...
0
votes
2answers
381 views

Where is stddef.h defined in Linux?

If I want to find the values of stddef.h, where is it defined? The /usr/include/linux/stddef.h almost has nothing, /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef ...
-2
votes
1answer
132 views

error: types may not be defined in ‘sizeof’ expressions

I'm trying to compile linux kernel verison 4.14.41 and got the following error: ./arch/x86/include/asm/acpi.h: In function ‘void arch_acpi_set_pdc_bits(u32*)’: ./include/linux/build_bug.h:30:45: ...
3
votes
1answer
267 views

How to install php7 on solaris 10 with OpenSSL 1.0.1

I am trying to install php7 on Solaris 10. OpenSSL 1.0.1 was installed from https://www.opencsw.org/packages/libssl1_0_0/ To check for the installed ssl I did pkginfo -i | grep -i "ssl" and I ...
0
votes
2answers
494 views

How to build a gcc-4.9.0 successfully on solaris 10 sparc

I am trying to build a gcc-4.9.0 on solaris 10 sparc. gmp was successfully built and install at /application/gmp-6.0.0a mpfr was also successfully built and install at /application/mpfr-3.1.2 ...
5
votes
2answers
638 views

How to correctly extract a .tar.gz with md5.sum on solaris 10

I am trying to extract a gcc-4.9.0.tar.gz downloaded from one of the gcc mirror site. In order to check the md5 signature on it before I gunzip it I did digest -a md5 -v gcc-4.9.0.tar.gz which ...
1
vote
1answer
124 views

Error during static build of libvorbis and libmp3lame

I'm having trouble trying to build a static binary of ffmpeg - I've got almost the whole build working, with the exception of two libs - libvorbis and libmp3lame. These two libs are failing during ./...
0
votes
0answers
148 views

Segmentation fault: 11 encounter while installing a program

I was installing an API package on a Mac OSX and running the command ./configure --enable-matlab There is an error message shows up checking for prefix by checking for gmt... /Applications/GMT-5.4....
-1
votes
1answer
450 views

Why configure/build gcc takes much more time than apt-get install gcc [closed]

Wander to make some modification on libgomp (gcc's OpenMP runtime library), I downloaded the source code of GCC8, and tried to configure/make the whole compiler. The configuration phase terminated ...
1
vote
1answer
50 views

Running gcc from prefix folder

I have a user account on RHEL 6.7. The built-in gcc does not support c++11, so I am trying to install my a more recent gcc. I have run configure with --prefix=$HOME/dependencies/gcc , make, make ...
2
votes
1answer
78 views

Where is “gcc_tooldir”

Under Cross-Compiler-Specific Options, it says: The default value, in case --with-sysroot is not given an argument, is ${gcc_tooldir}/sys-root. but it appears that gcc_tooldir is not defined. Is ...
0
votes
0answers
347 views

How to rebuild/reinstall python with a different compiler?

Python-2.7 is compiled using GCC-5.4 as one can see below: $ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for ...
0
votes
0answers
47 views

Cannot install GCC ld error not using custom prefix when loading lto-wrapper

I am trying to install GCC 4.9.4 in a non-standard location on Red Hat Linux using the documentation provided. https://gcc.gnu.org/install/ I do not have sudo, but I have write access to the folder /...
1
vote
1answer
22 views

djvulibre-3.5.27 Build Error

I am currently on Linux Mint 18.3. I downloaded the package from the Djvulibre website. Here is my error: make[2]: Entering directory '/home/amucs/Downloads/djvulibre-3.5.27/desktopfiles' PNG ...
0
votes
0answers
212 views

error when compiling GCC 7.3.0

libiberty.h: error: ambiguating new declaration of 'char* basename(const char*)' extern char *basename (const char *) I've been following all instructions from http://linuxfromscratch.org/lfs/view/...
0
votes
2answers
1k views

Compile old kernel with new gcc

I'm trying to compile an older version of Linux (3.4) on my Linux box with its current gcc-6.3. But running the make command shows errors like this: scripts/kconfig/conf.o: relocation R_X86_64_32 ...
0
votes
0answers
25 views

Exonerate Error while making

I'm using ProductName: Mac OS X ProductVersion: 10.12.6 BuildVersion: 16G1212 trying to working with exonerate Tool but facing many troubles configuration just went smooth tamimis-Mac-Pro:exonerate ...
1
vote
1answer
839 views

Use libgfrotran.so.3 and GFORTRAN_1.0 on fedora 27

I am trying to use fortran code called SAMMY-8 which has its binary ready for use. I was using without any issue while I had f25 installed. When upgrading to f27 I got the following error when trying ...
1
vote
2answers
1k views

“configure: error: cannot run C compiled programs” when compiling gcc on Alpine Linux

I am trying to build gcc-7.3 on Alpine Linux. When I run make, I get these errors, checking whether the C compiler works... configure: error: in `/build/x86_64-pc-linux-gnu/libgomp': configure: error:...