Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

Filter by
Sorted by
Tagged with
2
votes
0answers
15 views

Grub prompts that the multiboot header cannot be found [closed]

I read GRUB Multiboot header not found but I cannot still load my kernel I try to write the multiboot2 header directly in the .s file,Then link it directly to the front of all segments [kheader.s] ....
0
votes
1answer
12 views

How to compile a program statically on NixOS?

I'm trying to compile a simple program into a static executable: $ cat hello.c #include <stdio.h> int main() { puts("Hello, world!"); } However, I'm met with the following error: $...
0
votes
2answers
55 views

Compiling 2 c files into one program and permission is denied

My mission is to complile 2 c files into one executable program. The purpose of this program is when called from within the terminal followed by 2 numbers the output should display the sum of these 2 ...
0
votes
0answers
22 views

cant install vimb on arch linux (<gtk/gtkx.h> no such file directory)

i was just installing vimb for my arch Linux and this error came, here are the logs make V=1 output- make -C src make[1]: Entering directory '/home/sierra/Desktop/vimb/src' Package webkit2gtk-4.0 was ...
0
votes
1answer
29 views

Is RH 7.2 compatible with C++14?

Is RH 7.2 compatible with C++14 ? any official doc please ? otherwise, with which version of RH, C++14 is compatible please ? thanks BA
0
votes
0answers
34 views

Configure Error While Building LFS

I have encountered a problem while building LFS. On the 8.26 chapter while building gcc I accidentally forgot to press enter after rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/10.2.0/include-fixed/bits/ ...
0
votes
0answers
44 views

Compile an executable that can be run with a double click

When you compile a file with GCC it generates an executable with the application/x-sharedlib mime type. This is recognized as not executable by the file manager. So how do I change it to application/x-...
-1
votes
1answer
50 views

Does _start call my program's main function and other essential setup functions? [closed]

I'm reading a textbook which describes how loader works: When the loader runs, it copies chunks of the executable object file into the code and data segments. Next, the loader jumps to the program’s ...
0
votes
0answers
11 views

Installation of cx_Freeze

This is my Python configuration: # python -V Python 2.7.18 # pip -V _findLib_gcc: 1701 Killed _findLib_gcc: 1704 Killed pip 10.0.1 from /usr/local/lib/python2.7/site-packages/pip-10.0.1-py2.7.egg/pip (...
0
votes
1answer
45 views

why the dynamic linker couldn't resolve reference when a share library has a dependency on other share library?

below is my code: //a.c I don't use header files as this is just for demo purpose. extern void function_b(int num); void function_a(int num) { function_b(num) } //b.c void function_b(int num) ...
3
votes
2answers
81 views

how does dynamic linker resolve references in run time? [closed]

let's say I have a source file dll.c that use dlopen and dlsym functions to load a shared library called F.so in run time. dll.c has a reference to some_function(), and F.so has the definition of ...
0
votes
1answer
40 views

why static libraries use relocatable object files while share libraries use source file?

I was reading a textbook which describes static libraries anad shared libraries. There are two source files, addvec.c and multvec.c, to create a static library of them, we would use the ar tool as ...
0
votes
1answer
84 views

Build the Linux kernel without gcc optimization

I follow one of many tutorials found on Google results to build and debug the Linux kernel with gcc and kgdb/gdb. And I end up by discovering that is all waste of time. Since I can't compile the ...
0
votes
0answers
66 views

How to log -lightly- compilation commands on Linux (with GCC)?

There are cases where logging the compilation commands by GCC on Linux makes sense (I want to log the compilation command, its success or failure, the CPU and real time spent to run it, the size of ...
0
votes
1answer
134 views

How to install a new version GCC and make it the default?

I built and installed a new version of gcc on my Linux (Ubuntu) machine and installed it in /opt/gcc-10.2.0. Then I used update-alternatives to make this the default gcc/g++. It works, however, ...
3
votes
1answer
84 views

How to disassembly multiple functions using Linux utility objdump?

After a program is compiled and the binary file is generated, we can use objdump to disassemble the binary file and extract the assembly code and a lot of information. However, using -j .text with ...
1
vote
1answer
128 views

optimum solution for running C programs with graphics.h header file on kali linux

I want to make it clear that I know there are better ways to write graphics programs but our teacher is using turbo c++ program on windows with graphics.h header file. As I am using Linux kali distro, ...
3
votes
0answers
73 views

<filesystem> header library for gcc-c++ on AIX

I'm working on porting some code to AIX from Linux. The code makes use of c++17's header. #include <filesystem> ... std::ifstream is(path); if (!is.is_open() && std::filesystem::path(...
-1
votes
1answer
89 views

libstdc++6 stops apt-get from working

I tried to install the latest version libstdc++6 through the deb file from Ubuntu however now whenever i try to install a package it shows me an error. libstdc++6 : Depends: gcc-10-base (= 10-...
0
votes
0answers
32 views

Relocation - linker(compile time) and Loader(runtime)

My question is whether the loader has to redo the work of relocating if the linker script(at runtime)already does that? I have read that relocating loaders will relocate the addresses at runtime. What ...
0
votes
1answer
42 views

No version symbols in freshly compiled libstdc++

I'm compiling version 10.1 of GCC using the following configuration: ../configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/home/user/toolchain/gcc --enable-...
0
votes
0answers
105 views

How to change default compiler from clang to gnu gcc

I want to set default compiler from clang to gcc in termux (android application). gcc isn't available in official repo so I used pointless community repo. But now I can't configure the termux to use ...
0
votes
0answers
62 views

Compilig PCSX2 on Fedora 30 Help?

Hi I have try to compile PCSX2 1.6 on fedora 30 and now I'm getting an error on console like this sorry it is down i reach the limit of characters permitted I'm not sure what it does mean honestly i ...
0
votes
1answer
83 views

Buildroot compile error, librt.so: undefined reference to

I'm trying to compile a Buildroot image using a preconfigured builtin _defconfig file... More specific the riscv64_xwin_defconfig which is a simple setup for a riscv64 image with Xorg builtin. Since ...
0
votes
1answer
64 views

How can I compile pacat-simple.c?

I want to try writing some code to do audio playback with pulseaudio. There is a simple example program included in the official docs: pacat-simple.c. I made sure the libpulse-dev package was ...
21
votes
6answers
5k views

Is the standard C library loaded by default in main memory in Linux?

Since the majority of the Linux kernel is written in the C language, so when the kernel gets loaded in Main memory, does the standard C library also get loaded along the Linux kernel? If that's the ...
0
votes
1answer
199 views

32-bit libraries GCC for RHEL/CentOS 7

yum groupinstall "Compatibility Libraries" Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager There is no installed groups file. Maybe run: yum groups mark convert (...
1
vote
1answer
59 views

gcc is not present in /usr/bin. How to install it in RHEL 7?

Accidentally I have removed the gcc executable file from /usr/bin in RHEL 7. Now when I want to check the version of gcc I get nothing in the output. Tried: yum install gcc - NO OUTPUT yum install ...
0
votes
1answer
58 views

How to install GCC without yum on CentOS 7?

Is there a real way to install gcc without yum on CentOS 7? On my system yum doesn't work: yum update -bash: /usr/bin/yum: /usr/bin/python2.7: bad interpreter: No such file or directory And when I ...
0
votes
1answer
110 views

Issue installing linux-headers on Debian Buster

I'm trying to install an application, that requires linux-headers in order to be able to build it. The issue is, that when I try to install linux headers using: apt-get install linux-headers-$(uname ...
2
votes
1answer
23 views

Does the Ryzen 7 3700U fall under zen1 or zen2 according to gcc?

I am looking into installing the linux-ck kernel, which has architecture specific builds. According to AMD this is a 12nm zen2 chip but if I run gcc -c -Q -march=native --help=target | grep march it ...
2
votes
2answers
757 views

Where do I get “Development Tools” for CentOS 7 when trying to install via yum?

I'm running CentOS 7. I want to install gcc (for the purposes of building Python 3 with the new openssl package I installed). I was reading here -- https://stackoverflow.com/questions/19816275/no-...
0
votes
1answer
59 views

How do I get gcc to run on CentOS 7?

I'm running CentOS 7. I want to re-build Python with a new openssl package I just installed but I can't seem to get it to compile. I ran this sudo yum groupinstall "Development Tools" which ran ...
0
votes
1answer
81 views

How to install gcc 9.X on RHEL8?

I see from the documentation here that gcc has been updated on RHEL8, but what I haven't figured out is how to get it. The documentation indicates that there are now two streams, but I already have ...
0
votes
0answers
39 views

Trying to link Android shared object to native Linux program

I'm attempting to execute code directly from an unmodified Android shared object that has been compiled for i686. My executing environment is a native Linux x86_64. I have trouble linking everything ...
-1
votes
1answer
57 views

How to build gcc without make?

I'm trying to build tools from source codes. I start with make and get the following error: configure: error: no acceptable C compiler found in $PATH So it means that I need to install gcc. But as ...
1
vote
1answer
115 views

Is there any specific steps for configuring protobuf in QNX?

We have tried to configure using ./configure command. An error is like no c++11 compiler support. We are following the steps ie mentioned in some blog. We want to know like is there any other specific ...
2
votes
1answer
103 views

GCC last update on linux mint

I updated my gcc on linux mint but when I checked it seems wasn't installed. What is the problem? joseph@joseph:~$ sudo apt install gcc-9 Reading package lists... Done Building dependency tree ...
0
votes
1answer
112 views

cc1 out of memory error

I have a machine running Xubuntu 64 bit and I'm trying to compile my pretty long C code. I am using gcc. I chrooted in a raspbian stretch environment because the executable code must run on my ...
0
votes
2answers
256 views

Error while loading shared libraries: /tmp/zshgYCSAH: file too short

While trying to execute, in the zsh, the following command taken from here /lib64/ld-linux-x86-64.so.2 =(/bin/echo -e '#include <stdio.h>\nint main(){printf("c one liners\\n");}'\ | sudo gcc -...
0
votes
1answer
30 views

Not override a file when used as stdout of a c program

I have used gcc and make to compile a c file. The name of the run file is sequence. I have two goals: Have an input file (i.ein1) as stdin and run the program. when the program finishes using in1 and ...
1
vote
1answer
506 views

Trouble installing libc-dev

I am getting this error when I try to compile a C program on Ubuntu: $ gcc aa.c aa.c:1:9: fatal error: stdio.h: No such file or directory #include<stdio.h> ^-------- compilation ...
4
votes
1answer
107 views

Why does bash's tab completion trigger the stack protector?

I'm using bash 5.0.16 (and bash-completion 2.10) on Manjaro. Today, I absentmindedly hit the tab key while moving some files, and was greeted with an unexpected message: [charles@wirepile some_dir]$ ...
0
votes
0answers
170 views

Valgrind Segmentation Fault

I've never used Valgrind before and want to use it to check for memory leak in a program written in C. I'm using a BeagleBone AI which run Linux Debian. debian@beaglebone:~$ cat /proc/version Linux ...
1
vote
1answer
251 views

ld cannot find library right in front of it

I'm trying to build a rust program that involves diesel with postgresql on Fedora 31 and the build fails because the linker can't find libpq. As it's reproducible with gcc, I'm using gcc to keep the ...
1
vote
2answers
30 views

How to use gcc dynamic linker

test.c: #include <stdio.h> int main(){ return printf("helloworld %d",a); } lib.c: int a=0; test.c is using the variable a from lib.c. I turned it into the shared library lib.so. gcc ...
1
vote
1answer
464 views

Problem running make - Syntax error: “(” unexpected

Ubunutu 18.04.4 LTS - Linux 5.3.0-28 - gcc 7.4.0 I'm trying to run make, and I get the following output /bin/sh: 1: Syntax error: "(" unexpected Makefile:1699: recipe for target 'modules' ...
0
votes
1answer
516 views

How do I compile gcc-5 from source?

It looks like gcc-5 was recently removed from Debian's unstable repository. I need gcc-5 to compile an older Linux kernel (3.19) and so I am looking to build it from source, through this is causing me ...
-1
votes
1answer
55 views

How come GSRC's last release was in 2014, but gcc-9 is a package?

The GNU Source Release Collection, gsrc, had its latest release in 2014, see here or here. Yet, its package page suggests various new packages, like gcc-9. What gives? Is the gsrc itself accessing ...
1
vote
1answer
2k views

Unable to locate package gcc-6 on Debian

I am unable to install gcc-6 on Debian when I run sudo apt-get install gcc-6. It says E: Unable to locate package gcc-6. The lowest version gcc will go via apt-get is 7. Is there a special repository ...

1
2 3 4 5
13