Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

Filter by
Sorted by
Tagged with
0
votes
1answer
38 views

How to change the default GCC options by editing files?

I want to change the default GCC options by editing files. I think it's impossible, but I want to double check.
2
votes
1answer
74 views

How to make GCC help option (`--help=`) display help information about `-L` and `-l` options for specifying libraries?

I have found the GCC help option --help= incredibly helpful for looking up information about options. However, while I can find lots of information using e.g. --help=common and --help=separate, I can'...
5
votes
1answer
48 views

How to statically link missing libgcc_s_seh-1.dll and libstdc++-6.dll DLLs for 9.3-win32 MinGW executable

I want to compile a simple Windows application on Linux using MinGW. I compile as follows: x86_64-w64-mingw32-g++ -L. -l:mathlib.dll -o fib main.cpp mathlib.h This results in an executable fib that ...
0
votes
0answers
27 views

GLIBC_2.14 and C compiler missing from Centos 6.7

I have came across a situation today on my CentOS 6.7 VM, where I'm trying install any package via yum I'm getting the below given error: yum install gcc There was a problem importing one of the ...
1
vote
0answers
11 views

Build against an old glibc with Guix [migrated]

Say that you got a c program, but almost any program will do, and put it in a file: #include <stdio.h> #include <gnu/libc-version.h> int main (void) { puts (gnu_get_libc_version ()); ...
1
vote
0answers
21 views

Which library is producing this error: undefined reference to `TIFFTileRowSize@LIBTIFF_4.0'?

I'm building Ignition (https://ignitionrobotics.org/home) from source on Ubuntu 18.04.5 with gcc-10.1.0, and it seems that some dependencies are missing or have wrong versions. Here are linker errors ...
0
votes
0answers
8 views

How to upgrade gfortran in miniconda environment

I'm trying to compile a program that requires gfortran inside a miniconda3 environment but I get the error message: No suitable fortran compiler found (cause: 'gfortran version need to be above 4.3 ...
6
votes
1answer
756 views

GCC does not throw warnings and compiles erroneous code

#include <stdio.h> int main() { printf("Enter your name\n"); char name[99]; scanf("%d", name); printf("Hello %s\n", name); } While executing this simple ...
0
votes
1answer
41 views

How to compile static binary for i386?

I'm trying to compile some code statically (dosfstools) with GCC for i386, using -static and -march=i386, but the libraries, for example /usr/lib/i386-linux-gnu/libc.a, are not i386 despite the name. ...
1
vote
1answer
37 views

What is the best way to determine missing dependencies when using G++ to compile a program with headers and static libraries?

I am trying to compile the demo for the Acontis etherCAT master stack, but G++ is reporting a number of undefined references when trying to compile, without giving any clue as to which headers or ...
1
vote
0answers
26 views

Linking an assembly program

I'm trying to compile and link an assembly program. assembly file (main.asm): .section .text .global main main: mov $msg, %rdi call printf xor %rax, %rax mov $80, %rdi syscall ...
0
votes
0answers
18 views

gcov gets some kind of version conflict error on mac os

Given a C program, call it temp.c, the following works on Linux and is supposed to work on mac os to show coverage information: gcc -fprofile-arcs -ftest-coverage temp.c a.out gcov temp.c However when ...
-2
votes
1answer
37 views

what is __gmon start_?

I'm trying to reverse engineering a loading file, with winhex I found the binary strings by looking on the loading file by using WinHex: Are those some commands for bash Linux? it is loading .so ...
0
votes
1answer
29 views

Building a gcc cross compiler on linux, how do I know which “--target”s are supported and the exact keyword for specifying them?

I'm trying to build gcc compiler to producing executables that are supposed to run on x86-64 machines. I'm actually using existing 64bit gcc compiler on my computer. It is redundant but I'm doing it ...
0
votes
0answers
67 views

Why I can't compile cpp file using gcc to be 32 bit?

linux 64 bit and while trying to compile my cpp file I receive an error would appreciate any help, thank you The gcc command gcc -m32 -g mmn12-q2.cpp -lstdc++ The error: /usr/bin/ld: skipping ...
0
votes
0answers
28 views

Error on building gcc cross compiler toolchain

I'm following this guide to build a linux system for learning experience On the the guide at the section titled GCC (Static), I'm having an error, on running the command ` $ ln -vs libgcc.a `${...
0
votes
1answer
104 views

Cannot execute gcc due to “permission denied”

So I was thinking about learning some C this week, so I went to setting up everything. I was checking to make sure I had gcc installed using gcc -v, and I got the error bash: /usr/bin/gcc: Permission ...
2
votes
1answer
133 views

Why is the type of stat.st_size not unsigned int?

I was trying to rely on the stat(2) system-call to determine the size of a file in order to allocate an appropriate buffer for it. More specifically I was using the stat.st_size of the structure that ...
1
vote
1answer
82 views

configure: error: libmpfr not found or uses a different ABI (including static vs shared)

Heyo all, I've recently been working on a small side project regarding a custom Linux distro, not with the LFS instructions. Currently, I'm compiling a cross-compiler for gcc. Anyways, I get this ...
1
vote
0answers
22 views

Definitive way to make dynamic link .so file from many C source codes [closed]

How do we build/make dynamic link .so file from many C source TUs (translation units) as gcc -o foo.so -shared -fPIC foo.c of a single .c file ?
0
votes
1answer
237 views

Installing gcc-9 on Debian:stretch

I'd like to install this version of gcc and g++ but in the official documentation it appears that no version >6 is supported (link for official docs). If not 9, then is it possible to install any ...
1
vote
1answer
52 views

Cannot install 'stringi' R package — C compiler problem?

> install.packages("stringi") [...] * installing *source* package ‘stringi’ ... ** package ‘stringi’ successfully unpacked and MD5 sums checked ** using staged installation checking for ...
0
votes
1answer
31 views

Is there a Linux distribution using uclibc and has a full toolchain?

I am going to build a program using uclibc. However, building uclibc is a little difficult in recent systems using glibc, so I am looking for a distribution that uses uclibc and contains compilers ...
0
votes
0answers
31 views

“make” not looking for files in /usr/local/

I'm trying to build a package from source (ROCm) (Distro:Solus): libnuma isn't available so I had to build it from source. And once I installed it, even though the files are in /usr/local, make still ...
0
votes
1answer
128 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
70 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
47 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
38 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
72 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
61 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
163 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
17 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
148 views

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

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
100 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
80 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
359 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
168 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
317 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
216 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
547 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
147 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
223 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
44 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
64 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
231 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
132 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
284 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
186 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
878 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
2 3 4 5
13