Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

Filter by
Sorted by
Tagged with
0
votes
2answers
35 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 -...
-3
votes
0answers
31 views

How Hide System() command in script file

How do I hide the strings I'm passing to the system() function in this program: #include <stdlib.h> #include <string.h> int main (void) { char command[50]; strcpy(command, "wget ...
0
votes
1answer
28 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 ...
0
votes
0answers
21 views

Compile a package against different kernel headers?

I have a set of kernel headers that I want to build against in /usr/src/kernels/$(uname -r)/... Is it possible to have make wholesale just look for kernel headers there or do they need to be ...
1
vote
1answer
41 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 ...
2
votes
0answers
32 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
88 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
35 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
21 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
50 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
0answers
89 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
39 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 ...
0
votes
1answer
143 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
vote
2answers
119 views

Compiling GCC against a custom built GLIBC

I was trying to compile GCC 9.2 against a custom built GLIBC 2.30. I have installed GLIBC in a non-standard location. Then I have followed these steps to compile GCC: sfinix@multivac:~$ GLIBCDIR=/...
0
votes
2answers
19 views

Will gcc on onlinegdb always agree with gcc on CentOS 7?

Is there anything OS-dependent about gcc that would cause a meaningful change between the two versions? Are the two versions even different? Just want to make sure, because I test my code on onlinegdb ...
0
votes
1answer
128 views

Difficulty installing gcc 7.3.1

I'm currently having some issues, trying to install the 7.3.1 gcc version. (I need this version for a specific gpu setup) I have added jonathonf's repository: add-apt repository ppa:jonathonf/gcc-...
1
vote
1answer
92 views

How to install gcc7 multilib on arch linux?

I've downloaded the gcc7 package with pacaur -S and that worked fine. Now I'm looking for the gcc7 multilib package but I can't find the pacman or aur package anywhere in the internet. Can someone ...
0
votes
0answers
20 views

How to compile keyslot_checker?

I want to compile keyslot_checker , but I get error gcc -lm -lcryptsetup chk_luks_keyslots.c -o chk_luks_keyslots chk_luks_keyslots.c:39:27: fatal error: libcryptsetup.h: No such file or directory #...
0
votes
1answer
76 views

Install gcc 6.2.0 on RHEL6

I have an RHEL 6 server with gcc version 4.4.7. I wanted to update the gcc version to 6.2.0 . Yum update doesn't work. Also, SO answers for a similar question on does not work. Has anyone updated ...
0
votes
0answers
17 views

GCC hanging Ryzen machine - can I set it to use limited resources?

I'm attempting to compile PyTorch (https://github.com/pytorch/pytorch) on a new Ryzen 3900X machine using Ubuntu 18.04 and gcc 7.4.0. The compilation completely hangs the machine when done in the ...
0
votes
0answers
48 views

is there any way to execute binaries without importing anything from .py scripts?

First of all i created binaries of python scripts using following commands in ubuntu-16.04: cython3 --embed -o hello.c hello.py gcc -Os -I /usr/include/python3.5m -o hello hello.c -lpython3.5m -...
2
votes
1answer
323 views

What is libstdc++.so.6 and GLIBCXX_3.4.20?

I am looking for some simple answers in order to understand some of these concepts. I am trying to install a R library which is failing with the error: /lib64/libstdc++.so.6: version ``GLIBCXX_3.4.20'...
0
votes
0answers
153 views

What does the error “undefined reference to 'dlopen'” mean?

When I want to compile my c-file I get these messages: undefined reference to 'dlopen' undefined reference to 'dlsym' In some other posts about this topic the solution was to add -ldl to the linker ...
0
votes
0answers
109 views

Upgrade GCC to 9.2 in Deepin

I newly installed Deepin 15.11 which comes with gcc 6.2. I tried to upgrade gcc and g++ to last release 9.2. As I read from the net, it is advised to not use ubuntu ppa to due to mix iwth debian (...
2
votes
0answers
113 views

Missing file crti.o when compiling GCC-9.2.0

On Fedora 30 --> compiling GCC-9.2.0. I find solutions to similar problems, but not exactly the same. Some say its a bug. First errors come when preparing for compilation with ../configure --target=$...
1
vote
0answers
39 views

How can I statically compile programs?

I need to statically compile programs, for example: sudo. I need this so I can run them on a compromised system over ssh. But how would I do this? I know that I can find shared libraries with ldd. ...
1
vote
0answers
21 views

How to link to a numbered shared library?

This is the command I am running arm-linux-gnueabihf-gcc -Wall -Wl,--verbose -mthumb -mthumb-interwork -D_REENTRANT -oTestRun11 ./main.c -ldl -lpthread -lRTU_Module Which gives in the printout ...
0
votes
1answer
29 views

LFS 7.8 - Pass1 GCC 5.2.0 error in 'make'

I am working on LFS 7.8. In Pass1 GCC 5.2.0 compilation there is an error in 'make' : configure: error: in `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libvtv': configure: error: C compiler ...
0
votes
0answers
25 views

How to install a c compiler on Multibox Linux for TV

I have a multibox (maxytec multibox) for TV channels, and I need to install a C compiler there. I tried installing gcc with opkg but no success, also when I try to update with opkg I get errors. I ...
1
vote
0answers
26 views

Preprocess the Linux source code and save to another directory

Suppose I have the entire Linux source code in /tmp/linux-src. After menuconfig I want to do "some kind of gcc -E" where all the preprocessor macros other than #include are expanded so the actual ...
1
vote
0answers
58 views

does someone knows why GCC did not compiled (building with lto and pgo)?

the error message: /var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/gcc/d/runtime.cc:37:6: warning: type 'libcall_type' violates the C++ One Definition Rule [-Wodr] 37 | enum libcall_type ...
1
vote
0answers
123 views

how do I emerge gcc 9 on gentoo without creating too many processes?

I am stuck on building gcc 9 with lto USE flag, because it is creating over 30 lto processes when I try to do so. At this point, I have to reboot my PC. I think it may have to do with the new lto ...
2
votes
1answer
120 views

No gcc executable after pkg_add gcc on OpenBSD

I installed gcc from packages on OpenBSD 6.5 # pkg_add gcc-8.3.0 gcc related files are installed at /usr/local/lib/, but no gcc executable is found. # gcc -bash: gcc: command not found (I'm aware ...
1
vote
0answers
13 views

How to use OS-provided toolchain within conda?

On Ubuntu 18.04 I run which gcc and the output is as expected. ubuntu@USER1:~$ which gcc /usr/bin/gcc However when I activate my conda environment and run which gcc I get: (tensorflow_p36) ubuntu@...
2
votes
0answers
52 views

Is it possible to build Single GCC Executable for armv5, armv6, armv7-{cortex-xx-{A,R,M}},armv8 etc.?

Digging into the sources of GCC I noticed in files gcc/config/arm/t-*, There are multiple arm target options. Reading [GCC internal Manual], These are called Target Makefile Fragments, which will be ...
2
votes
1answer
88 views

Cross compile Python 2.7.16 for armel (32-bit)

I have a device with armel architecture, the file system is running on a VM (amd64 architecture) because the device has not enough space to install compile requirements. The OS is Debian 9 (stretch). ...
2
votes
1answer
79 views

How can i put the gcc warning messages in a text file? [duplicate]

I wished to know if someone knew how to put the compilation warnings of GCC in a text file ? For example : I wrote (willingly) a undefined function foo(). So gcc tell me : warning: implicit ...
0
votes
0answers
9 views

redefine optflags or pcre-config

I have a script that creates a spec file with the line: %define WITH_CC_OPT $(echo %{optflags} $(pcre-config --cflags)) I want to change the definition of the WITH_CC_OPT by changing %{optflags} ...
1
vote
0answers
66 views

Native binary libraries containing duplicate composite symbols error

I am compiling a C/C++ library from source using GCC. The bulk of code was written for Unix with an emphasis for Linux kernels. I've been trying to adapt it for AIX. The majority of the changes I have ...
1
vote
0answers
38 views

How to export kernel functions which written in assembly?

I am working with a PowerPC processor and have to use dcache functions in my kernel module, like: "clean_dcache_range()", implemented in $KERNEL_SOURCE/arch/powerpc/kernel/misc_32.S (version 4.1.8). ...
1
vote
2answers
217 views

Want to turn off “note” level messages in GCC

When I compile a C (no pluses) program using GCC, there are several levels of messages possible, like warning, error, and note. The note messages are useless and distracting. How do I make them go ...
1
vote
0answers
133 views

How to rebuild gcc plugins for kernel module

I've been working on the gcc plugins included in the kernel headers. I have a Manjaro Linux distribution, and I'm trying to get the system to rebuild the gcc plugins. Unfortunately, I can't seem to ...
1
vote
1answer
217 views

“C++ compiler cannot create executables” when trying to make

I'm running 32 bit CentOS 7. I'm trying to install tesseract from source. I have g++ version 4.8.5, and I had errors during compilation (looking like this) and I tried updating g++ from source. After ...
24
votes
4answers
4k views

What is the gold linker?

Has anyone used the gold linker before? To link a fairly large project, I had to use this as opposed to the GNU ld, which threw up a few errors and failed to link. How is the gold linker able to link ...
4
votes
1answer
85 views

computer locks up when building on lxc container

I'm using lxc to have a ubuntu 16.04 development environment on my 18.04 laptop. When I do a parallel build (ninja -j) on the container my computer becomes unresponsive and never recovers. I have to ...
1
vote
0answers
127 views

cross-compiling for 32-bit architecture on 64-bit (FreeBSD)

I'm having problems cross-compiling a library for 32bit FreeBSD architecture on a 64bit FreeBSD-system. I'm happy about any hint/advice. Compiling for same architecture (64bit) works fine. I built ...
1
vote
1answer
144 views

Can't link to gtk+3.0 after update of the GCC compiler

On my Debian 9 system with Code::Blocks IDE I used to compile and link fine my gtk+3.0 application. But after update to the newest Debian 10 the linker cannot link to gtk+3.0 correctly. Here are the ...
0
votes
0answers
170 views

How to build from parent directory in current directory with make(“make” command)?

I have the source code of a package what I want to build, I need build from the parent dir, and output the builded contents in the current dir, for example with the directory structure: parent_dir --...
0
votes
1answer
372 views

Check the actual glibc version used

I want check the glibc version used by toolchain to build code for the target system (ARM). In toolchain directory I tried strings /sysroot/lib/libc.so.6 | grep GLIBC the output is GLIBC_2.4 ...
1
vote
2answers
313 views

Why does `ldd <dynamic_lib>` output “??? => ???” (question marks in both library and location)?

Running ldd <dynamic_lib>, I noticed that there are some entries that read ??? => ???. Searching for a variety of combinations of "Linux", "ldd" and "??? => ???", both via search engine ...

1
2 3 4 5
12