All Questions
5,225
questions
0
votes
0
answers
13
views
Why does clang fail on mabi but not gcc?
Given my file test.c:
#include <stdarg.h>
int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); }
I try:
$ clang -m64 -c -g -O2 -mabi=ms test.c -Wall -Wextra
which ...
0
votes
0
answers
35
views
How to build and Install compiler g++-4.8.5 on ubuntu 24.04 from source code?
I am getting error while building gcc-4.8.5 on ubuntu 24.04
I had followed the below steps as mentioned in the page How to Install compiler g++-4.8.5 in ubuntu 20.04
sudo dpkg --add-architecture i386
...
1
vote
0
answers
77
views
/usr/bin/ld multiple definition of during compile
I just want to mention that I didnt write this code or modify it in any way prior to trying to compile it. I have just been copying the source from EL5 to 6 to 7 and compiling it. I think when it went ...
0
votes
1
answer
55
views
How to resolve glibc errors in conda enviroment installation?
I am a non root user in a Linux based cluster. It doesn't have docker nor I have privileges to install it. The base environment have GLIBC version 2.17. I am trying to install packages (like faiss-gpu,...
0
votes
0
answers
40
views
running ./configure returns error: Cannot link with libtool libs! (libltdl)
I am attempting to compile an older program on a new system. I've done this a few times with this same software and I have always been able to find some way to get it to work but this time I am ...
2
votes
1
answer
113
views
can I overwrite the malloc called by library functions?
my code (main.c):
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void* __real_malloc(size_t size);
void __real_free(void* ptr);
void* __wrap_malloc(size_t size)
{
...
0
votes
2
answers
160
views
Is there any way to explicitly tell compiler to stop optimization
Linux, C, GCC, ARM (Allwinner H3). Is it possible to get the following equivalent functionality (pseudocode):
#pragma optimizations-stop
#pragma registers-flush
a=10;
while(*b != 0) c++;
if(a == 0) { ...
0
votes
1
answer
89
views
Building GCC Cross-Compiler for ARM VxWorks
I am trying to build a cross-compiler from a x86-64 Linux host (Ubuntu-22.04 in WSL, with GCC 11) to arm-wrs-vxworks, and I'm having some serious trouble doing so. I have very limited experience with ...
0
votes
0
answers
33
views
How can I declare a pointer to a constant struct literal that uses a flexible array in C if possible? [duplicate]
So I wanted to store some constant text and data for parts of a level in a game in a struct, then put pointers for all those structs in a struct for each level, and pointers for all the level structs ...
0
votes
1
answer
95
views
Virtual memory size increases considerably with thread count
In the below C++ code example, each time the user presses the Enter key, a new thread will be created. The thread waits for 10 minutes and then exits. The thread has a std::string object with some ...
0
votes
2
answers
219
views
Why parent process is active when not using wait function?
I am using pipes to display file contents. When I comment the wait command (in the last part of the parent process), I expect to see the parent process in the ps command's output (after a while, ...
0
votes
0
answers
60
views
Compile C to "ELF, 32-bit LSB executable, ARM, version 1 (GNU/Linux)", not "(SysV)"
how to convert .c to ELF, 32-bit LSB executable, ARM, version 1 (GNU/Linux). If i use this Command
arm-linux-gnueabi-gcc -march=armv7-a -mthumb -mabi=aapcs-linux -o output_file input_file.c
It ...
0
votes
0
answers
32
views
build cross gcc compiler for arm toolchain fails
I try to build a cross gcc compiler for an older ARM platform. Installing binutils was successful but gcc fails.
Host platform linux x86_64
binutils version to cross build:2.42
gcc version to cross ...
0
votes
0
answers
67
views
exec format error running compiled 64 bit arm assembly
I downloaded a picoCTF reverse engineering challenge file. The specific challenge was "ARMssembly 1". I was unable to run it after compiling.
I tried compiling it in Kali linux virtual box ...
0
votes
0
answers
24
views
Why can't my custom cross GCC find some libraries in the sysroot, even if it searches in the right place?
I'm trying to cross compile a C/C++ application, and since it needs an old version of libc, I compiled a custom GCC without --with-sysroot flag, and I use as sysroot a copy of the target root ...