libc Questions

5

Solved

I'm trying to find out how to remap memory-mapped files on a Mac (when I want to expand the available space). I see our friends in the Linux world have mremap but I can find no such function in t...
Plumose asked 19/8, 2010 at 11:34

2

Solved

I recently found, that I can make Linux system calls from .NET relatively easy. For example, to see if I need sudo I just make a signature like this: internal class Syscall { [DllImport("libc...
Coward asked 30/10, 2021 at 6:49

6

Solved

A student asked the question and I didn't know for sure. Guesses include: "counted", "clearing", "chunked", "complete", ... The standard library documentation doesn't say what it stands for and ...
Charente asked 8/8, 2015 at 0:33

13

Solved

I'm using the standard mktime function to turn a struct tm into an epoch time value. The tm fields are populated locally, and I need to get the epoch time as GMT. tm has a gmtoff field to allow you...
Lording asked 10/12, 2012 at 15:37

3

According to the isascii() manpage: http://linux.die.net/man/3/isascii POSIX.1-2008 marks isascii() as obsolete, noting that it cannot be used portably in a localized application. I'm not su...
Ignatius asked 25/9, 2014 at 5:6

6

Solved

The result of abs(-2147483648) is -2147483648, isn't it? it seems unacceptable. printf("abs(-2147483648): %d\n", abs(-2147483648)); output: abs(-2147483648): -2147483648
Glary asked 28/6, 2012 at 10:51

3

Solved

Suppose I want to completely take over the open() system call, maybe to wrap the actual syscall and perform some logging. One way to do this is to use LD_PRELOAD to load a (user-made) shared object...
Diophantus asked 7/9, 2010 at 21:19

6

Solved

I was trying to run a flutter app on Ubuntu 22.04 LTS. Everything was working fine. But, today this problem came up while running the app. The Flutter SDK fails to build the app throwing the below ...
Desouza asked 21/10, 2022 at 15:43

4

Error Trace: ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/pi/.local/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnuea...
Stephan asked 9/2, 2022 at 18:2

7

Solved

When I compile something on my Ubuntu Lucid 10.04 PC it gets linked against glibc. Lucid uses 2.11 of glibc. When I run this binary on another PC with an older glibc, the command fails saying there...
Ilario asked 18/5, 2010 at 10:45

3

Why is it not possible recompile GLibc turning off all the optimizations (i.e., -O0)? Particularly in doing this: make CFLAGS='-O0 -w' CXXFLAGS='-O0 -w' I get: #error "glibc cannot be compile...
Martsen asked 6/5, 2015 at 23:56

8

Solved

I am making a simple application which requires colored output. How can I make my output colored like emacs and bash do? I don't care about Windows, as my application is only for UNIX systems.
Pusan asked 10/7, 2010 at 13:38

1

Our mobile app is published in the Google play store. The Crashes and ANR report is generated in Firebase Crashlytics. There is an ANR shown as below. 0 libc.so (syscall+28) 1 libart.so (art::Condi...
Contend asked 3/2, 2023 at 4:54

8

Actually I am trying to write my own printf() in C by using varags. But I am not getting the correct solution for this. Can anyone help me out?
Foreigner asked 14/11, 2009 at 19:7

4

Solved

Due to some obscure reasons which are not relevant for this question, I need to resort to use MAP_FIXED in order to obtain a page close to where the text section of libc lives in memory. Before re...
Fustian asked 18/2, 2013 at 19:37

5

Solved

I'm trying to install PyTorch on ARMv7(32-bit) architecture but PyTorch doesn’t have official ARMv7 builds so i tried this unofficial build. It installed successfully but when I import torch I get...
Boylan asked 11/6, 2020 at 12:28

9

Solved

Consider the following code: #include <stdio.h> #include <time.h> #include <math.h> // Compile with gcc -lrt -lm -o test_clock test_clock.c #define CLOCK CLOCK_MONOTONIC int m...
Fiddlewood asked 13/2, 2011 at 20:55

2

Solved

I am implementing I/O redirection in a shell written in Rust. I succeeded in piping between two children processes by using unsafe code with raw file descriptors and pipe() from the libc crate. Wh...
Penick asked 10/3, 2017 at 19:15

6

Solved

When I compile C code with my cross toolchain, the linker prints pages of warnings saying that my executable uses hard floats but my libc uses soft floats. What's the difference?
Hopscotch asked 23/7, 2010 at 19:0

3

Solved

I have installed another version of GLIBC and want to compile Golang code against this new GLIBC. I have tried the following command for dynamic compilation: go build --ldflags '-linkmode externa...
Birdella asked 1/4, 2019 at 7:31

1

Today, when I use conda zlib to compile a binary, I encountered the error Undefined reference to memcpy@GLIBC_2.14. .../x86_64-conda-linux-gne/bin/ld: ...envs/myenv/lib/libz.so: undefined reference...
Ethiopia asked 28/1, 2022 at 6:24

1

Solved

I'm cross-compiling an application for aarch64 on my x86 Ubuntu Bionic system, and I have problems with glibc version mismatch. My cross-compile toolchain was using v2.27, while the system that is ...
Tortola asked 9/5, 2020 at 5:53

4

Solved

I'm pretty sure glibc is the name of the standard C library implementation for gcc. But for LLVM/Clang I'm not sure. I've Googled to try to find if it comes with its own implementation of the whole...
Sortition asked 24/11, 2019 at 16:37

1

Solved

Sample code: void accept(int x); int main(void) { accept(0); return 0; } Invocations: $ gcc t719.c -std=c11 -pedantic -Wall -Wextra <nothing> $ clang t719.c -std=c11 -pedantic -Wall -Wex...
Biretta asked 22/2, 2022 at 21:47

1

Solved

I've been writing some x64 assembly on linux - exactly what it is is not relevant - and I've come across a strange problem. In my assembly code, I've declared printf as an external label, and call ...
Septum asked 5/1, 2022 at 18:44

© 2022 - 2024 — McMap. All rights reserved.