Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
1878 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 want to install `python2.7` it needs GCC that I don't know where it is on my system? which gcc /usr/bin...
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 want to install python2.7 it needs GCC that I don't know where it is on my system? which gcc /usr/bin/which: no gcc in (/root/anaconda2/bin:/root/anaconda3/bin:/root/anaconda3/condabin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/root/anaconda3/bin:/root/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin) And when I search how to install GCC without yum, most of them need yum! Is there really a way to solve this problem?
user3486308 (609 rep)
May 21, 2020, 01:07 PM • Last activity: Jul 31, 2025, 07:10 PM
1 votes
1 answers
1922 views
Qubes OS - Update a Template Kernel
I'm trying to update the kernel in the Debian Template of `Qubes OS`, following the official documentations, but it seems I'm missing something or doing something wrong. I'm using `gcc 6.3.0`. **Qubes Docs:** Installing kernel in Debian VM In Debian based VM, you need to install qubes-kernel-vm-supp...
I'm trying to update the kernel in the Debian Template of Qubes OS, following the official documentations, but it seems I'm missing something or doing something wrong. I'm using gcc 6.3.0.
**Qubes Docs:**
Installing kernel in Debian VM In Debian based VM, you need to install qubes-kernel-vm-support package. This package include required additional kernel module and initramfs addition required to start Qubes VM (for details see template implementation). Additionally you need some GRUB tools to create it’s configuration. Note: you don’t need actual grub bootloader as it is provided by dom0. But having one also shouldn’t harm. sudo apt-get update sudo apt-get install qubes-kernel-vm-support grub2-common Then install whatever kernel you want. If you are using distribution kernel package (linux-image-amd64 package), initramfs and kernel module should be handled automatically. If not, or you are building kernel manually, do this on using dkms and initramfs-tools: sudo dkms autoinstall -k # replace this with actual kernel version sudo update-initramfs -u When kernel is installed, you need to create GRUB configuration. You may want to adjust some settings in /etc/default/grub, for example lower GRUB_TIMEOUT to speed up VM startup. Then you need to generate actual configuration: In Fedora it can be done using update-grub2 tool: sudo mkdir /boot/grub sudo update-grub2 Then shutdown the VM. From now you can set pvgrub2 as VM kernel and it will start kernel configured within VM.
**Debian Docs:**
Don't be afraid to try compiling the kernel. It's fun and profitable. To compile a kernel the Debian way, you need some packages: fakeroot, kernel-package, linux-source-version. Hereafter, we'll assume you have free rein over your machine and will extract your kernel source to somewhere in your home directory. Make sure you are in the directory to where you want to unpack the kernel sources, extract them using tar xf /usr/src/linux-source-version.tar.xz and change to the directory linux-source-version that will have been created. Now, you can configure your kernel. Run make xconfig if X11 is installed, configured and being run; run make menuconfig otherwise (you'll need libncurses5-dev installed). Take the time to read the online help and choose carefully. When in doubt, it is typically better to include the device driver (the software which manages hardware peripherals, such as Ethernet cards, SCSI controllers, and so on) you are unsure about. Be careful: other options, not related to a specific hardware, should be left at the default value if you do not understand them. Do not forget to select “Kernel module loader” in “Loadable module support” (it is not selected by default). If not included, your Debian installation will experience problems. Clean the source tree and reset the kernel-package parameters: make-kpkg clean Now, compile the kernel: fakeroot make-kpkg --initrd Once the compilation is complete, you can install your custom kernel like any package. As root, do dpkg -i ../linux-image-version-subarchitecture.deb. For instance, the System.map will be properly installed and /boot/config-3.16 will be installed, containing your current configuration set. Your new kernel package is also clever enough to automatically update your boot loader to use the new kernel. If you have created a modules package, you'll need to install that package as well.
**The Debian Way Output:** ... ... ... This is kernel package version 13.014+nmu1. install -p -d -o root -g root -m 755 /usr/src/linux-source-4.8/debian/linux-image-4.8.15-rt10-11.pvops.qubes.x86_64/DEBIAN sed -e 's/=V/4.8.15-rt10-11.pvops.qubes.x86_64/g' -e 's/=IB//g' \ -e 's/=ST/linux/g' -e 's/=R//g' \ -e 's/=KPV/13.014+nmu1/g' \ -e 's/=K/vmlinuz/g' \ -e 's/=I/YES/g' -e 's,=D,/boot,g' \ -e 's@=A@amd64@g' \ -e 's@=B@x86_64@g' \ ... dpkg-gencontrol: error: illegal package name 'linux-image-4.8.15-rt10-11.pvops.qubes.x86_64': character '_' not allowed debian/ruleset/targets/image.mk:230: recipe for target 'debian/stamp/binary/linux-image-4.8.15-rt10-11.pvops.qubes.x86_64' failed make: *** [debian/stamp/binary/linux-image-4.8.15-rt10-11.pvops.qubes.x86_64] Error 255
**Manual compiling:**
I've downloaded linux-source-4.8 from Debian and I've extracted it in /usr/src. Then: make defconf make menuconf # custom settings make Same error as above: dpkg-gencontrol: error: illegal package name 'linux-image-4.8.15-rt10-11.pvops.qubes.x86_64': character '_' not allowed
I think this can be solved easily, but if I can compile the kernel manually, then how should I procede?
make install and make modules_install are required or I have to use dkms autoinstall directly? This isn't specified...

**UPDATE:** Installing directly the Debian package linux-image-amd64 make the console disappeared and the VM work unproperly, I tried to reboot it, but I could use it only by attaching to the serial console.
I noticed the dpkg crashed during installation, so I ran dpkg --configure -a and it finished the installation, but it showed a warning message that told with that initramfs, the machine would have never booted, in fact I updated GRUB and rebooted, but initramfs couldn't mount root.
JumpAlways (123 rep)
Jan 31, 2017, 05:43 AM • Last activity: Jul 27, 2025, 02:07 PM
4 votes
1 answers
9505 views
Installing GCC on SLES 12
I'm having trouble installing `gcc` on a new SLES 12 box. The goal here is actually to get R Shiny running, but when I try to install any packages I get the below error: sudo su - -c "R -e \"install.packages('Rcpp',repos='https://cran.rstudio.com/')\"" make: g++: Command not found This leads me to b...
I'm having trouble installing gcc on a new SLES 12 box. The goal here is actually to get R Shiny running, but when I try to install any packages I get the below error: sudo su - -c "R -e \"install.packages('Rcpp',repos='https://cran.rstudio.com/ ')\"" make: g++: Command not found This leads me to believe I need to install gcc. which gcc: which: no gcc in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/games) gcc -version: `If 'gcc' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf gcc` This is where the trouble begins. When I zypper in gcc: `Problem: gcc-4.7-7.1.1.x86_64 requires gcc47, but this requirement cannot be provided uninstallable providers: gcc47-4.7.2_20130108-2.1.6.i586[oss] gcc47-4.7.2_20130108-2.1.6.x86_64[oss]` Ok.. zypper in gcc47-4.7.2_20130108-2.1.6.x86_64 Results: `Problem: gcc47-4.7.2_20130108-2.1.6.x86_64 requires glibc-devel, but this requirement cannot be provided uninstallable providers: glibc-devel-2.17-4.4.1.i586[oss] glibc-devel-2.17-4.4.1.x86_64[oss]` Right then... zypper in glibc-devel Results: `Problem: glibc-devel-2.17-4.4.1.x86_64 requires glibc = 2.17, but this requirement cannot be provided uninstallable providers: glibc-2.17-4.4.1.i586[oss] glibc-2.17-4.4.1.x86_64[oss]` zypper in glibc Results: `'glibc' is already installed. No update candidate for 'glibc-2.19-17.72.x86_64'. The highest available version is already installed. So somewhere in this chain of dependencies an RPM needs a lower version of something I already have. I don't want to downgrade the system. Is there some way to get the most up to date GCC that will work with glibc-2.19? Am I doing something wrong here? Am I missing a repo? SLSE12:~ # cat /etc/os-release NAME="SLES" VERSION="12" VERSION_ID="12" PRETTY_NAME="SUSE Linux Enterprise Server 12" ID="sles" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:12" # zypper lr -u # | Alias | Name | Enabled | Refresh | URI --+-----------+-----------+---------+---------+------------------------------------------------------------------------------- 1 | gcc | gcc | Yes | No | http://download.opensuse.org/repositories/devel:/gcc/SLE-12/ 2 | oss | oss | Yes | No | http://download.opensuse.org/distribution/12.3/repo/oss/ 3 | r-patched | r-patched | Yes | No | http://download.opensuse.org/repositories/devel:/languages:/R:/patched/SLE_12/
RedRaven (141 rep)
Nov 28, 2015, 03:54 PM • Last activity: Jul 23, 2025, 03:04 PM
4 votes
2 answers
693 views
Compiling stand-alone function binaries from the Linux kernel
How can I take snippets from the Linux kernel drivers' code, for example this [drm_fb_helper_hotplug_event](https://github.com/torvalds/linux/blob/6832a9317eee280117cd695fa885b2b7a7a38daf/drivers/gpu/drm/drm_fb_helper.c#L1943) function inside `drivers/gpu/drm/drm_fb_helper.c`, and compile a binary f...
How can I take snippets from the Linux kernel drivers' code, for example this [drm_fb_helper_hotplug_event](https://github.com/torvalds/linux/blob/6832a9317eee280117cd695fa885b2b7a7a38daf/drivers/gpu/drm/drm_fb_helper.c#L1943) function inside drivers/gpu/drm/drm_fb_helper.c, and compile a binary file that I can run to conveniently achieve a particular action in the kernel? In my case, I'd like to call the function arbitrarily to hopefully force a reset of the list of video connectors detected by the kernel, because of monitor output issues. There are probably better ways of achieving this, such as making an out-of-tree module, but I'm not sure how I can do that here. I want to compile an executable that I run from userspace, which will get my task done. So far as a proof of concept, I have tried to get printk/printfs done using only gcc to compile a binary instead of make: HOSTCC=gcc-11 CC=gcc-11 gcc ../drivers/gpu/drm/testing_printout.c -o printAMessage -I. (Compiling an older version that needs GCC 11, after a cd include using -I as the [equivalent to CPATH](https://stackoverflow.com/questions/558803/how-can-i-add-a-default-include-path-for-gcc-in-linux).) But this comes up with problems.
./linux/atomic.h:7:10: fatal error: asm/atomic.h: No such file or directory
So I made a symlink; ln -s asm-generic asm But I still get other header file related errors and warnings:
./linux/thread_info.h:60:10: fatal error: asm/thread_info.h: No such file or directory
I have tried appending ARCH=x86 to the gcc command but it didn't help. Other errors like
./linux/stddef.h:11:9: error: cannot use keyword ‘false’ as enumeration constant
./linux/stddef.h:11:9: note: ‘false’ is a keyword with ‘-std=c23’ onwards
./linux/types.h:30:33: error: ‘bool’ cannot be defined via ‘typedef’
./linux/types.h:30:33: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
...
./linux/atomic/atomic-arch-fallback.h:2245:35: error: unknown type name ‘atomic64_t’; did you mean ‘atomic_t’?
tell me something is wrong with the include files and the CLAGS. What am I missing? Seeing the -std=c23 note made me look at the Makefile at the root of the source directory:
LINUXINCLUDE    := \
		-I$(srctree)/arch/$(SRCARCH)/include \
		-I$(objtree)/arch/$(SRCARCH)/include/generated \
		$(if $(building_out_of_srctree),-I$(srctree)/include) \
		-I$(objtree)/include \
		$(USERINCLUDE)

KBUILD_AFLAGS   := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS   := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
		   -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
		   -Werror=implicit-function-declaration -Werror=implicit-int \
		   -Werror=return-type -Wno-format-security \
		   -std=gnu89
I guess using gcc directly instead of the makefiles is really inconvenient. What is the usual way of achieving my goal?
feearent (61 rep)
Jul 19, 2025, 05:18 AM • Last activity: Jul 19, 2025, 11:48 AM
2 votes
1 answers
2080 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 error when I `make`: ``` configure: error: libmpfr not found or uses a different ABI (including static v...
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 error when I make:
configure: error: libmpfr not found or uses a different ABI (including static vs shared).
Makefile:5730: recipe for target 'configure-mpc' failed
make: *** [configure-mpc] Error 1
UPDATE: I installed mpfr via apt on that machine, which now gives me a slightly different error:
checking for recent MPFR... no
configure: error: MPFR version >= 4.1.0 required
Makefile:5730: recipe for target 'configure-mpc' failed
make: *** [configure-mpc] Error 1
handy/install: line 276: x86_64-unknown-linux-gnu-gcc: command not found
Strange thing is, the mpfr tarball that it should be using is 4.1.0... I don't think the apt package is >= 4.1.0, and not sure how to throw it up to 4.1.0. You can find my script [here](https://github.com/semissioncontrol/semcOS/blob/development/handy/install) , Static GCC starts at [Line 239](https://github.com/semissioncontrol/semcOS/blob/development/handy/install#L239) . I've done some research, but can't seem to find much. I *was* able to find someone mention that switching distros worked, and then that it was their MPFR version that wasn't working. This one is compiling on Ubuntu WSL @ Windows because my laptop is faster - if needed, I'll be compiling this on my PC @ Gentoo soon. My MPFR version is 4.1.0, GCC version 10.2.0. Why is this happening? Cheers, Bobbbay
Bobbbay (411 rep)
Nov 14, 2020, 07:26 AM • Last activity: Jul 14, 2025, 11:07 AM
0 votes
1 answers
1894 views
Issue with upgrading GCC 'missing requires of libgcc_s.so.1'
I upgraded my GCC from 4.4.7 to 4.8.2. So I removed GCC 4.4.7 by using: rpm -e --nodeps gcc-c++-4.4.7....... libgcc-4.4.7....... gcc-4.4.7........ Then I manually installed 4.8.2: ./configure make && make install and had no problems with it. Then I run: yum check Now there is a whole list of missing...
I upgraded my GCC from 4.4.7 to 4.8.2. So I removed GCC 4.4.7 by using: rpm -e --nodeps gcc-c++-4.4.7....... libgcc-4.4.7....... gcc-4.4.7........ Then I manually installed 4.8.2: ./configure make && make install and had no problems with it. Then I run: yum check Now there is a whole list of missing dependencies like this: libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libgcc_s.so.1(GCC_3.0)(64bit) libplist-1.2-1.el6.x86_64 has missing requires of libgcc_s.so.1()(64bit) libplist-1.2-1.el6.x86_64 has missing requires of libgcc_s.so.1(GCC_3.0)(64bit) libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libgcc_s.so.1()(64bit) libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libgcc_s.so.1(GCC_3.0)(64bit) libstdc++-4.4.7-17.el6.x86_64 has missing requires of libgcc_s.so.1()(64bit) libstdc++-4.4.7-17.el6.x86_64 has missing requires of libgcc_s.so.1(GCC_3.0)(64bit) libstdc++-4.4.7-17.el6.x86_64 has missing requires of libgcc_s.so.1(GCC_3.3)(64bit) libstdc++-4.4.7-17.el6.x86_64 has missing requires of libgcc_s.so.1(GCC_4.2.0)(64bit) libtiff-3.9.4-18.el6_8.x86_64 has missing requires of libgcc_s.so.1()(64bit) I then checked libgcc_s.so.1 was installed at /usr/local/lib64 and /usr/local/gcc-4.8.2/lib64. Would this method of upgrading causing any issue or the error message is just because yum didn't recognize gcc is actually installed?
shadow_wxh (191 rep)
Feb 9, 2017, 11:45 AM • Last activity: Jul 14, 2025, 06:00 AM
0 votes
1 answers
60 views
Which GCC version to use for compiling Linux 5.4.1 to bzImage without strlcpy errors?
I’m trying to compile the Linux 5.4.1 kernel to a `bzImage` using an older GCC version I built from source (gcc 8.2.0 and binutils 2.31.1), with: ``` make CC= LD= -j$(nproc) ``` However, I get errors about a redundant declaration of `strlcpy`. Which GCC version should I use to compile this kernel ve...
I’m trying to compile the Linux 5.4.1 kernel to a bzImage using an older GCC version I built from source (gcc 8.2.0 and binutils 2.31.1), with:
make CC= LD= -j$(nproc)
However, I get errors about a redundant declaration of strlcpy. Which GCC version should I use to compile this kernel version without errors, so I can test the system calls I just created? I have specific requirements to work with this kernel. update: actually i do not know why it counts my system headers as well while compiling and finds another declaration of strlcpy in /usr/include...
/home/alexisl/Kernels/linux-5.4.1-mod/tools/include/linux/string.h:20:15: error: redundant redeclaration of ‘strlcpy’ [-Werror=redundant-decls]
   20 | extern size_t strlcpy(char *dest, const char *src, size_t size);
      |               ^~~~~~~
In file included from /home/alexisl/Kernels/linux-5.4.1-mod/tools/include/linux/string.h:6:
/usr/include/string.h:506:15: note: previous declaration of ‘strlcpy’ with type ‘size_t(char * restrict,  const char * restrict,  size_t)’ {aka ‘long unsigned int(char * restrict,  const char * restrict,  long unsigned int)’}
  506 | extern size_t strlcpy (char *__restrict __dest,
so that is why the compilation process fails. how do i isolate it and make it not take into account the system's headers?
ALEXIS LAZANAS (1 rep)
May 23, 2025, 07:43 PM • Last activity: Jul 6, 2025, 09:59 PM
0 votes
1 answers
1908 views
How to change gcc version without root on CentOS 7
I have access to a cluster with CentOS 7, which has gcc installed. Unfortunately, gcc version is pretty old (4.8), and is reported incompatible by some of the Python packages I am using, requiring version >5.0. However, since I do not have root privilege, I cannot easily install/delete anything ther...
I have access to a cluster with CentOS 7, which has gcc installed. Unfortunately, gcc version is pretty old (4.8), and is reported incompatible by some of the Python packages I am using, requiring version >5.0. However, since I do not have root privilege, I cannot easily install/delete anything there. I have followed some answers from stack exchange, installing the gcc 8.4 from source code. The make install seem to be successful. Then, I have followed the accepted answer to one question here (https://unix.stackexchange.com/questions/22263/how-to-set-the-default-gcc-version-for-only-one-user) to change the default. However, it does not work for me. 1. The gcc 8.4 is located at $HOME/gcc_8_4 with a (seemingly properly working) symlink $HOME/bin/gcc. 2. The gcc 4.8 is located at /usr/local/bin. 3. $HOME/bin comes **before** /usr/local/bin in the PATH, as written in the mentioned answer. 4. If I call ./gcc --version from $HOME/bin/gcc/bin directory, I get the version 8.4. If I call it as gcc --version from any location, I still get 4.8. So, has something changed since that answer was posted? Why the 4.8 version is taken as a default one despite it coming after 8.4 version in the PATH? Is there any way to fix that?
Valeria (101 rep)
Apr 5, 2021, 10:31 PM • Last activity: Jun 28, 2025, 01:00 PM
3 votes
1 answers
4876 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 a great deal of trouble. I have been following the instructions found [here][1], but I find myself...
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 a great deal of trouble. I have been following the instructions found here , but I find myself wondering what settings I need to set and more. Thus far, I have done the following. 1. Downloaded and unpacked the source code. 2. Configured gcc-5 by doing the following:
% mkdir objdir
% cd objdir
% ../gcc-5.4.0/configure (I included neither options nor target flags)
3. Attempted to build using the following in my objdir directory:
% make BOOT_CFLAGS='-O' bootstrap
However, bootstrapping raised errors that prevented me from moving onto the install. After running for about 5 minutes, I encounter the following errors:
In file included from ../../../../gcc-5.4.0/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function 'x86_fallback_frame_state':
./md-unwind-support.h:141:18: error: field 'uc' has incomplete type
struct ucontext uc;
                ^
make: *** [../../../../gcc-5.4.0/libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
make: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/32/libgcc'
make: *** [Makefile:1154: multi-do] Error 1
make: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/libgcc'
make: *** [Makefile:119: multi-do] Error 2
make: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/libgcc'
make[2] : *** [Makefile:16510: all-stage1-target-libgcc] Error 2
make[2] : Leaving directory '/home/me/objdir'
make[1] : *** [Makefile:22461: stage1-bubble] Error 2
make[1] : Leaving directory '/home/me/objdir'
make: *** [Makefile:22798: bootstrap] Error 2
I am running Debian 10 (Buster) and have the necessary prerequisites installed as listed here . Any help or guidance either in fixing the errors I have during bootstrapping or with building from source in general would be much appreciated! Thank you.
peachykeen (149 rep)
Feb 9, 2020, 08:24 PM • Last activity: Jun 26, 2025, 12:02 PM
2 votes
2 answers
2489 views
gcc: fail sanity check error, I suppose due to cxx USE flag missed
Recently I've done `emerge -e world` and then found that `gcc` was compiled without `cxx` flag. Now I can't compile any C++ package due to configure: error: C++ preprocessor "/lib/cpp" fails sanity check I'm thinking on copying files returned by `equery f gcc|grep -v share ` from stage3. Will it hel...
Recently I've done emerge -e world and then found that gcc was compiled without cxx flag. Now I can't compile any C++ package due to configure: error: C++ preprocessor "/lib/cpp" fails sanity check I'm thinking on copying files returned by `equery f gcc|grep -v share ` from stage3. Will it help? Is there any simpler way? **UPDATE 1** Here's my [config.log](http://pastebin.com/MaHyg5bq) **UPDATE 2** Here's my [make.conf](http://pastebin.com/s0sjU7eL) Please, note there's cxx flag in USE. I've added it recently, but it does not help as I can't rebuild packages. **UPDATE 3** I have tried to reinstall gcc-4.6.3 from binary package via emerge -avK gcc:4.6 It completed successfully but error didn't go. Also, I've noticed that: configure:11955: /lib/cpp conftest.cpp cpp: error: conftest.cpp: C++ compiler not installed on this system configure:11955: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "expat" | #define PACKAGE_TARNAME "expat" | #define PACKAGE_VERSION "2.1.0" | #define PACKAGE_STRING "expat 2.1.0" | #define PACKAGE_BUGREPORT "expat-bugs@libexpat.org" | #define PACKAGE_URL "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | #ifdef __STDC__ | # include | #else | # include | #endif | Syntax error Looks like it claims that C++ compiler is not installed on my system. But this sounds like rubbish, since gcc:4.6 was installed from bin-package and I assume it's compiled with C++ support. **UPDATE 4** Indeed there's a problem with g++ uhradio ~ # g++ queue.cpp gcc-config: error: could not run/locate 'g++' uhradio ~ # cpp queue.cpp cpp: error: queue.cpp: C++ compiler not installed on this system The output from gcc-config -l is: x86_64-pc-linux-gnu-4.6.3 *
archer (171 rep)
Jan 25, 2013, 09:56 AM • Last activity: Jun 17, 2025, 12:05 AM
0 votes
1 answers
2805 views
ARM cross-compiler not recognized in MX Linux during STM32 development
I am using MX Linux OS and trying to work with the STM32F103C8T6 MCU. Following the user manual *Beginning STM32* by Warren Gay, I successfully installed the Git clone of `stm32f103c8t6`, `libopencm3`, and `FreeRTOS` as per the manual. When I downloaded and unzipped the ARM cross-compiler, the files...
I am using MX Linux OS and trying to work with the STM32F103C8T6 MCU. Following the user manual *Beginning STM32* by Warren Gay, I successfully installed the Git clone of stm32f103c8t6, libopencm3, and FreeRTOS as per the manual. When I downloaded and unzipped the ARM cross-compiler, the files were saved under the /opt/gcc-arm folder. Upon typing arm-none-eabi-gcc --version, I encountered a "command not found" error. Upon further investigation, I typed:
$ ls -l /opt/gcc-arm/bin
It listed arm-none-eabi-gcc in the following format (in green):
-rwxr-xr-x 2 1001 1001  1296976 Nov 24  2020 arm-none-eabi-gcc
Similarly, the type gcc command gives the output:
gcc is /usr/bin/gcc
Instead of:
arm-none-eabi-gcc is hashed (/opt/gcc-arm/bin/gcc)
as mentioned in the user manual. The type arm-none-eabi-gcc command outputs:
not found
As I understand, the green color of the file means it is executable, but I am unable to determine why the computer is not recognizing the command. Finally, when running the make command, I received the following response:
user@mx:~/stm32f103c8t6
$ make
make -C libopencm3 TARGETS=stm32/f1
make: Entering directory '/home/user/stm32f103c8t6/libopencm3'
  BUILD   lib/stm32/f1
  CC      adc.c
make: arm-none-eabi-gcc: Command not found
make: *** [../../Makefile.include:41: adc.o] Error 127
Failure building: lib/stm32/f1: code: 2
make: *** [Makefile:79: lib] Error 1
make: Leaving directory '/home/user/stm32f103c8t6/libopencm3'
make: *** [Makefile:38: libopencm3/lib/libopencm3_stm32f1.a] Error 2
Deepak Kumar (1 rep)
Jul 23, 2021, 10:52 AM • Last activity: Jun 13, 2025, 12:01 PM
3 votes
1 answers
2851 views
I'm trying to compile alsa-driver-RTv5.18 but get date-time error for gcc 4.9.2
/home/user/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c:1065:22: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time] "Compiled on " __DATE__ " for kernel %s" ^ cc1: some warnings being treated as errors I've tried to export CFLAGS="-Wno-error=date-t...
/home/user/Downloads/Rt-Linux-HDaudio-5.18/alsa-driver-RTv5.18/alsa/acore/info.c:1065:22: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time] "Compiled on " __DATE__ " for kernel %s" ^ cc1: some warnings being treated as errors I've tried to export CFLAGS="-Wno-error=date-time" but nothing changed.
Vyacheslav (231 rep)
Oct 28, 2015, 04:19 PM • Last activity: Jun 8, 2025, 10:10 PM
5 votes
1 answers
13354 views
Linker error: /usr/bin/ld: cannot find -lgcc_s
I am trying to compile `symlinks` ([tar.gz-file][1]), which is a very small tool with one line for compilation: gcc -Wall -Wstrict-prototypes -O2 -N -s -o symlinks symlinks.c which gives the error .... /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit sta...
I am trying to compile symlinks (tar.gz-file ), which is a very small tool with one line for compilation: gcc -Wall -Wstrict-prototypes -O2 -N -s -o symlinks symlinks.c which gives the error .... /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status The output of /sbin/ldconfig -p | grep libgcc is libgcc_s.so.1 (libc6) => /lib/i386-linux-gnu/libgcc_s.so.1 and trying to include the mentioned directory directly gcc -Wall -Wstrict-prototypes -L /lib/i386-linux-gnu/ -O2 -N -s -o symlinks symlinks.c produces the same error. Three questions: 1. Why does it not work with the first command, as the lib seems to be in the search path 2. Why does including the path itself does not help 3. How to fix this?
Alex (5848 rep)
Nov 13, 2013, 04:09 PM • Last activity: May 28, 2025, 08:03 PM
1 votes
1 answers
2177 views
libpcap missing
I’m trying to run a C program, but every time I try to run it I get this message: error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory I've re-installed `libpcap`; I've installed `gcc` and `g++`; I’ve updated it and I’m lost. I’m not sure wh...
I’m trying to run a C program, but every time I try to run it I get this message: error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory I've re-installed libpcap; I've installed gcc and g++; I’ve updated it and I’m lost. I’m not sure what else I can do. Could anyone help out?
Adam (11 rep)
Feb 28, 2015, 01:14 AM • Last activity: May 27, 2025, 05:00 PM
0 votes
1 answers
3745 views
How I can install some gcc compilers in arch linux?
I need to install earlier gcc than now. I already have gcc-10. I must install gcc-8 or gcc-6 in my computer then to build old project. I download the gcc-6 from github and tried install it as shown in this guide [https://gist.github.com/slizzered/a9dc4e13cb1c7fffec53][1]. I got the error: `target no...
I need to install earlier gcc than now. I already have gcc-10. I must install gcc-8 or gcc-6 in my computer then to build old project. I download the gcc-6 from github and tried install it as shown in this guide https://gist.github.com/slizzered/a9dc4e13cb1c7fffec53 . I got the error: target not found: libart-lgpl . Google was show me than it's error occurs due to than this package is't contents from main repository. Stop! Ones again. If I want to build gcc-6 then I need to download and install yaourt then next install libart-lgpl which is not in the official repository? Pleas help my download & install some gcc compilers from my computer.
Vando (1 rep)
Apr 14, 2021, 04:50 PM • Last activity: May 26, 2025, 02:08 AM
2 votes
1 answers
2459 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 Today I found out that only devtoolset-6 and devtoolset-7 are available now, all other version are remov...
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 Today I found out that only devtoolset-6 and devtoolset-7 are available now, all other version are removed. Any ideas? I can't use gcc >= 5. **EDIT** As yumNoob suggested, devtoolset can be found here So I created a repo file, [sclo] name=devtoolset-34 baseurl=http://mirror.centos.org/centos/6/sclo/ gpgcheck=1 enabled=1 And it fails with http://mirror.centos.org/centos/6/sclo/repodata/repomd.xml : [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror. So the baseurl in incorrect, any ideas?
daisy (55777 rep)
Aug 10, 2018, 10:01 AM • Last activity: May 25, 2025, 03:06 AM
0 votes
1 answers
2250 views
Buildroot compile error, librt.so: undefined reference to
I'm trying to compile a [Buildroot](https://bellard.org/tinyemu/buildroot-riscv-2018-10-20.tar.gz) 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 it's a rather old build i'm doing th...
I'm trying to compile a [Buildroot](https://bellard.org/tinyemu/buildroot-riscv-2018-10-20.tar.gz) 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 it's a rather old build i'm doing this inside a Fedora 23 Docker container which has gcc version 5.3.1, i don't think this is a problem since i can successfully build the non-Xwin riscv64 defconfig just fine The problem resides when the Makefile tries to build the specific package "eudev-3.2" Here is the config.log:
configure:3158: $? = 1
configure:3178: checking whether the C compiler works
configure:3200: /home/buildroot-riscv-2018-10-20/output/host/usr/bin/riscv64-buildroot-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c -lrt >&5
/home/buildroot-riscv-2018-10-20/output/host/usr/lib/gcc/riscv64-buildroot-linux-gnu/7.3.0/../../../../riscv64-buildroot-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so, not found (try using -rpath or -rpath-link)
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `__pthread_barrier_wait@GLIBC_PRIVATE'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.27'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `__pthread_barrier_init@GLIBC_PRIVATE'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `__pthread_unwind@GLIBC_PRIVATE'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `pthread_create@GLIBC_2.27'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `pthread_sigmask@GLIBC_2.27'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `pthread_once@GLIBC_2.27'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `__shm_directory@GLIBC_PRIVATE'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `pthread_detach@GLIBC_2.27'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `pthread_cancel@GLIBC_2.27'
/home/buildroot-riscv-2018-10-20/output/host/usr/riscv64-buildroot-linux-gnu/sysroot/usr/lib64/lp64d/librt.so: undefined reference to `__pthread_get_minstack@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
fabricio7p (1 rep)
Jun 15, 2020, 11:56 PM • Last activity: May 15, 2025, 06:05 AM
4 votes
1 answers
3283 views
Gcc configuration error
I am trying to build GNU toolchain for OpenRISC by following the guide given at http://openrisc.net/toolchain-build.html#_stage_1_gcc on Fedora Virtual Box Image. I am getting error saying Configure: error: cannot run /bin/sh ../gcc-svn/config.sub when I try to configure gcc using the command. ../gc...
I am trying to build GNU toolchain for OpenRISC by following the guide given at http://openrisc.net/toolchain-build.html#_stage_1_gcc on Fedora Virtual Box Image. I am getting error saying Configure: error: cannot run /bin/sh ../gcc-svn/config.sub when I try to configure gcc using the command. ../gcc-svn/configure --target=or32-linux --prefix=$PREFIX \ --disable-libssp --srcdir=../gcc-svn --enable-languages=c \ --without-headers --enable-threads=single --disable-libgomp \ --disable-libmudflap The full content of config.log is as below This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.64. Invocation command line was $ ../gcc-svn/configure --target=or32-linux --prefix= --disable-libssp --srcdir=../gcc-svn --enable-languages=c --without-headers --enable-threads=single --disable-libgomp --disable-libmudflap ## --------- ## ## Platform. ## ## --------- ## hostname = localhost.localdomain uname -m = x86_64 uname -r = 3.11.7-300.fc20.x86_64 uname -s = Linux uname -v = #1 SMP Mon Nov 4 15:07:39 UTC 2013 /usr/bin/uname -p = x86_64 /bin/uname -X = unknown /bin/arch = x86_64 /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/adminuser/toolchain/bin PATH: /bin PATH: /usr/bin PATH: /usr/local/bin PATH: /usr/local/sbin PATH: /usr/sbin PATH: /home/adminuser/MINSOC/tools/bin PATH: /home/adminuser/MINSOC/tools/bin PATH: /home/adminuser/MINSOC/tools/or32-elf/bin/ PATH: /home/adminuser/.local/bin PATH: /home/adminuser/bin PATH: /home/adminuser/MINSOC/tools/bin PATH: /home/adminuser/MINSOC/tools/bin PATH: /home/adminuser/MINSOC/tools/or32-elf/bin/ ## ----------- ## ## Core tests. ## ## ----------- ## configure:2427: error: cannot run /bin/sh ../gcc-svn/config.sub ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_env_AR_FOR_TARGET_set= ac_cv_env_AR_FOR_TARGET_value= ac_cv_env_AR_set= ac_cv_env_AR_value= ac_cv_env_AS_FOR_TARGET_set= ac_cv_env_AS_FOR_TARGET_value= ac_cv_env_AS_set= ac_cv_env_AS_value= ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_FOR_TARGET_set= ac_cv_env_CC_FOR_TARGET_value= ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CXXFLAGS_set= ac_cv_env_CXXFLAGS_value= ac_cv_env_CXX_FOR_TARGET_set= ac_cv_env_CXX_FOR_TARGET_value= ac_cv_env_CXX_set= ac_cv_env_CXX_value= ac_cv_env_DLLTOOL_FOR_TARGET_set= ac_cv_env_DLLTOOL_FOR_TARGET_value= ac_cv_env_DLLTOOL_set= ac_cv_env_DLLTOOL_value= ac_cv_env_GCC_FOR_TARGET_set= ac_cv_env_GCC_FOR_TARGET_value= ac_cv_env_GCJ_FOR_TARGET_set= ac_cv_env_GCJ_FOR_TARGET_value= ac_cv_env_GFORTRAN_FOR_TARGET_set= ac_cv_env_GFORTRAN_FOR_TARGET_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LD_FOR_TARGET_set= ac_cv_env_LD_FOR_TARGET_value= ac_cv_env_LD_set= ac_cv_env_LD_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_LIPO_FOR_TARGET_set= ac_cv_env_LIPO_FOR_TARGET_value= ac_cv_env_LIPO_set= ac_cv_env_LIPO_value= ac_cv_env_NM_FOR_TARGET_set= ac_cv_env_NM_FOR_TARGET_value= ac_cv_env_NM_set= ac_cv_env_NM_value= ac_cv_env_OBJCOPY_set= ac_cv_env_OBJCOPY_value= ac_cv_env_OBJDUMP_FOR_TARGET_set= ac_cv_env_OBJDUMP_FOR_TARGET_value= ac_cv_env_OBJDUMP_set= ac_cv_env_OBJDUMP_value= ac_cv_env_RANLIB_FOR_TARGET_set= ac_cv_env_RANLIB_FOR_TARGET_value= ac_cv_env_RANLIB_set= ac_cv_env_RANLIB_value= ac_cv_env_STRIP_FOR_TARGET_set= ac_cv_env_STRIP_FOR_TARGET_value= ac_cv_env_STRIP_set= ac_cv_env_STRIP_value= ac_cv_env_WINDMC_FOR_TARGET_set= ac_cv_env_WINDMC_FOR_TARGET_value= ac_cv_env_WINDMC_set= ac_cv_env_WINDMC_value= ac_cv_env_WINDRES_FOR_TARGET_set= ac_cv_env_WINDRES_FOR_TARGET_value= ac_cv_env_WINDRES_set= ac_cv_env_WINDRES_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set=set ac_cv_env_target_alias_value=or32-linux ## ----------------- ## ## Output variables. ## ## ----------------- ## AR='' AR_FOR_BUILD='' AR_FOR_TARGET='' AS='' AS_FOR_BUILD='' AS_FOR_TARGET='' AWK='' BISON='' BUILD_CONFIG='' CC='' CC_FOR_BUILD='' CC_FOR_TARGET='' CFLAGS='' CFLAGS_FOR_BUILD='' CFLAGS_FOR_TARGET='' COMPILER_AS_FOR_TARGET='' COMPILER_LD_FOR_TARGET='' COMPILER_NM_FOR_TARGET='' CONFIGURE_GDB_TK='' CPP='' CPPFLAGS='' CXX='' CXXFLAGS='' CXXFLAGS_FOR_BUILD='' CXXFLAGS_FOR_TARGET='' CXX_FOR_BUILD='' CXX_FOR_TARGET='' DEBUG_PREFIX_CFLAGS_FOR_TARGET='' DEFS='' DLLTOOL='' DLLTOOL_FOR_BUILD='' DLLTOOL_FOR_TARGET='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' EXPECT='' FLAGS_FOR_TARGET='' FLEX='' GCC_FOR_TARGET='' GCC_SHLIB_SUBDIR='' GCJ_FOR_BUILD='' GCJ_FOR_TARGET='' GDB_TK='' GFORTRAN_FOR_BUILD='' GFORTRAN_FOR_TARGET='' GNATBIND='' GNATMAKE='' GREP='' INSTALL_DATA='' INSTALL_GDB_TK='' INSTALL_PROGRAM='' INSTALL_SCRIPT='' LD='' LDFLAGS='' LDFLAGS_FOR_BUILD='' LD_FOR_BUILD='' LD_FOR_TARGET='' LEX='' LIBOBJS='' LIBS='' LIPO='' LIPO_FOR_TARGET='' LN='' LN_S='' LTLIBOBJS='' M4='' MAINT='' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='' MAKEINFO='' NM='' NM_FOR_BUILD='' NM_FOR_TARGET='' OBJCOPY='' OBJDUMP='' OBJDUMP_FOR_TARGET='' OBJEXT='' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_URL='' PACKAGE_VERSION='' PATH_SEPARATOR=':' RANLIB='' RANLIB_FOR_BUILD='' RANLIB_FOR_TARGET='' RAW_CXX_FOR_TARGET='' RPATH_ENVVAR='' RUNTEST='' SED='' SHELL='/bin/sh' STRIP='' STRIP_FOR_TARGET='' SYSROOT_CFLAGS_FOR_TARGET='' TOPLEVEL_CONFIGURE_ARGUMENTS='../gcc-svn/configure --target=or32-linux --prefix= --disable-libssp --srcdir=../gcc-svn --enable-languages=c --without-headers --enable-threads=single --disable-libgomp --disable-libmudflap' WINDMC='' WINDMC_FOR_BUILD='' WINDMC_FOR_TARGET='' WINDRES='' WINDRES_FOR_BUILD='' WINDRES_FOR_TARGET='' YACC='' ac_ct_CC='' ac_ct_CXX='' bindir='${exec_prefix}/bin' build='' build_alias='' build_configargs='' build_configdirs='' build_cpu='' build_libsubdir='' build_noncanonical='' build_os='' build_subdir='' build_tooldir='' build_vendor='' clooginc='' clooglibs='' compare_exclusions='' config_shell='' configdirs='' datadir='${datarootdir}' datarootdir='${prefix}/share' do_compare='' docdir='${datarootdir}/doc/${PACKAGE}' dvidir='${docdir}' exec_prefix='NONE' extra_host_libiberty_configure_flags='' extra_mpc_gmp_configure_flags='' extra_mpc_mpfr_configure_flags='' extra_mpfr_configure_flags='' gmpinc='' gmplibs='' host='' host_alias='' host_configargs='' host_cpu='' host_noncanonical='' host_os='' host_subdir='' host_vendor='' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libelfinc='' libelflibs='' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' poststage1_ldflags='' poststage1_libs='' pplinc='' ppllibs='' prefix='' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' stage1_cflags='' stage1_checking='' stage1_languages='' stage1_ldflags='' stage1_libs='' stage2_werror_flag='' sysconfdir='${prefix}/etc' target='or32-linux' target_alias='or32-linux' target_configargs='' target_configdirs='' target_cpu='' target_noncanonical='' target_os='' target_subdir='' target_vendor='' tooldir='' ## ------------------- ## ## File substitutions. ## ## ------------------- ## alphaieee_frag='' host_makefile_frag='' ospace_frag='' serialization_dependencies='' target_makefile_frag='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" configure: exit 2
Chethan N (163 rep)
Jun 22, 2014, 12:40 PM • Last activity: May 12, 2025, 12:03 AM
3 votes
2 answers
6132 views
How to Resolve undefined reference to 'RAND_egd'
**Debian 8 Jessie, OpenSSL version 1.1.0, cURL version: 7.50.2** I am trying to build curl on a Linux Debian system. All stages go well up until trying to build with `make` command. The linking stage fails with the following error below: CC ../lib/curl-nonblock.o CC ../lib/curl-warnless.o CCLD curl...
**Debian 8 Jessie, OpenSSL version 1.1.0, cURL version: 7.50.2** I am trying to build curl on a Linux Debian system. All stages go well up until trying to build with make command. The linking stage fails with the following error below: CC ../lib/curl-nonblock.o CC ../lib/curl-warnless.o CCLD curl ../lib/.libs/libcurl.so: undefined reference to 'RAND_egd' collect2: error: ld returned 1 exit status Makefile:771: recipe for target 'curl' failed make: *** [curl] Error 1 RAND_egd function is part of the OpenSSL library so I ran ldd on the libcurl.so file to make sure the OpenSSL library is found, and it is judging by the output from ldd below. linux-vdso.so.1 (0x00007ffceb5a1000) libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007ff9ffc05000) libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007ff9ff9d1000) libssh2.so.1 => /usr/lib/x86_64-linux-gnu/libssh2.so.1 (0x00007ff9ff7a8000) libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 (0x00007ff9ff53a000) libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 (0x00007ff9ff0af000) liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007ff9feea0000) libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007ff9fec4e000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff9fea33000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff9fe688000) libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007ff9fe3a6000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff9fe1a2000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff9fdf85000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff9fdd6e000) libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007ff9fdb52000) libgnutls-deb0.so.28 => /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28 (0x00007ff9fd833000) /lib64/ld-linux-x86-64.so.2 (0x00007ffa0009e000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007ff9fd621000) libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007ff9fd3db000) libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007ff9fd1c7000) libnettle.so.4 => /usr/lib/x86_64-linux-gnu/libnettle.so.4 (0x00007ff9fcf95000) libhogweed.so.2 => /usr/lib/x86_64-linux-gnu/libhogweed.so.2 (0x00007ff9fcd66000) libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007ff9fcae3000) libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff9fc8db000) So the library is there. I also checked the rand.h file in the include directory of OpenSSL and of course the function declaration is there, so it should be defined in the library. How can I find the cause of and resolve this error?
strwils (131 rep)
Sep 2, 2016, 07:17 PM • Last activity: Apr 26, 2025, 02:04 AM
0 votes
0 answers
84 views
ldd not showing actual shared libraries address
After having deactivated ASLR, with: `echo 0 | sudo tee /proc/sys/kernel/randomize_va_space` I used `ldd /path/to/binary` to get the address of the shared library that my binary (written in C) was using, and I got the next output : ``` linux-vdso.so.1 (0x00007ffff7fc4000) libc.so.6 => /usr/lib/libc....
After having deactivated ASLR, with: echo 0 | sudo tee /proc/sys/kernel/randomize_va_space I used ldd /path/to/binary to get the address of the shared library that my binary (written in C) was using, and I got the next output :
linux-vdso.so.1 (0x00007ffff7fc4000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007ffff7da5000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ffff7fc6000)
The reason I did that is because I'm using [gdb-pwndbg](https://github.com/pwndbg/pwndbg) to understand how the binary is working in order to exploit it. And in order to exploit the binary i needed the libc address that the binary had in use. But after running the binary and breaking within execution, I wanted to check that things were working, so I printed out the contents of the /usr/lib/libc.so.6 address and got the following:
pwndbg> x 0x00007ffff7da5000
0x7ffff7da5000:
That shouldn't haven been occurring. I was supposed to get : 0x7ffff7da5000: "\177ELF\002\001\001\003" Or something similar. And that is Crazy! So I remembered that I had I similar file which too needed the use of the /usr/lib/libc.so.6 address, so went to that file and ran ldd and got 0x00007ffff7daa000 as the address. And like before i printed the contents of that address within an execution break of the binary which i wanted to exploit :
pwndbg> x 0x00007ffff7daa000
0x7ffff7daa000:	"\177ELF\002\001\001\003"
After that I was capable of use the address to exploit the binary. So i don't know what happens with that binary, even after having recompiled the binary a couple of times, it didn't have any effects. So I'm curious, or how can I fix this or prevent it?
rustymanito (35 rep)
Apr 25, 2025, 03:24 AM • Last activity: Apr 25, 2025, 11:04 PM
Showing page 1 of 20 total questions