glibc

Static Class Variables in Dynamic Library and Main Program

I am working on a project that has a class 'A' that contains a static stl container class. This class is included in both my main program and a .so file. The class uses the default(implicit, not declared) constructor/destructor. The main program loads the .so file using dlopen() and in its destructor, calls dlclose(). The program cra...

glibc version used while building .a file

Is there a way to find out from .a file what version of glibc is expected or was used when building the .a? ...

Why does perl crash with "*** glibc detected *** perl: munmap_chunk(): invalid pointer"?

#!/usr/bin/env perl use warnings; use strict; use 5.012; use XML::LibXML::Reader; my $reader = XML::LibXML::Reader->new( location => 'http://www.heise.de/' ) or die $!; while ( $reader->read ) { say $reader->name; } At the end of the output from this script I get this error-messages: * glibc detected * perl: munmap_chunk(): ...

Unable to start Android emulator > 1.5

Hi ! I got this trace when I tried to launch android 1.6 or 2.1. Android 1.5 is working fine. I tried to reinstall each SDK, but there is no way to get it working. I created those AVD with Eclipse plugin. geo@geo-laptop:~> android/android-sdk-linux_86/tools/emulator -avd a16 *** glibc detected *** android/android-sdk-linux_86/tools/emu...

What's the best way to build software that doesn't require the newest glibc?

I'm attempting to build a binary package that can be run on multiple Linux distributions. It's currently built on Ubuntu 10.04, but it fails on Ubuntu 8.04 with the following error: ./test: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./test) ./test: /usr/lib/libstdc.so.6: version `GLIBC_2.11' not found (requ...

printf field width : bytes or chars?

The printf/fprintf/sprintf family supports a width field in its format specifier. I have a doubt for the case of (non-wide) char arrays arguments: Is the width field supposed to mean bytes or characters? What is the (correct-de facto) behaviour if the char array corresponds to (say) a raw UTF-8 string? (I know that normally I should...

Cannot use fclose on output stream, input stream is fine.

Whenever I run my program with fclose(outputFile); at the very end, I get an error. glibc detected...corrupted double-linked list The confusing thing about this though, is that I have fclose(inputFile); directly above it and it works fine. Any suggestions? FILE* inputFile = fopen(fileName, "r"); if (inputFile == NULL) { printf("in...

not able to use g++ from Fedora

$ yum list | grep gcc arm-gp2x-linux-gcc.i686 4.1.2-11.fc12 @fedora arm-gp2x-linux-gcc-c++.i686 4.1.2-11.fc12 @fedora gcc.i686 4.4.3-4.fc12 @updates libgcc.i686 4.4.3-4.fc12 @updates ...

glibc Heap Consistency Checking

According to posts from 2008 (I can't find it right now), glibc heap check doesn't work in multithreaded environment. Is it still situation now in 2010? Does heap check enabled by default? (gcc 4.1.2)? I don't set MALLOC_CHECK_, don't aware of calling mcheck(), but still sometimes receive double free glibc error with backtrace. Maybe it...

How can I link to a specific glibc version?

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's no glibc 2.11... As far as I know glibc uses symbol versioning. Can I force gcc to link against a specific symbol version? In my concret...

Can I make valgrind ignore glibc libraries?

Is it possible to tell valgrind to ignore some set of libraries? Specifically glibc libraries.. Actual Problem: I have some code that runs fine in normal execution. No leaks etc. When I try to run it through valgrind, I get core dumps and program restarts/stops. Core usually points to glibc functions (usually fseek, mutex etc). I und...

How to configure gcc to use an alternate glibc?

To use the loader in the alternate glibc installation at /usr/test, I have change the loader path /lib/ld-linux-x86-64.so.2 to /usr/test/lib/ld-linux-x86-64.so.2 under the *link section in the gcc specs file. I have also pointed CPATH to /usr/test/lib/include and LIBRARY_PATH to /usr/test/lib. Is it the correct way to use the alternate ...

How do I get the executing program's directory in C using a plataform independent method?

I develop my app in linux for both unix and win32(cross compile at each build) plataforms, so a ready to use function would be nice :). I'm using glib that has the 'gchar* g_get_current_dir(void)' function and it returns the current directory, but what I really need is the executable's dir. I'm inexperienced in C programming so any suge...

Are the kernel headers required for anything other than compiling glibc and kernel modules?

Hope the question is clear :) ...

How to get POSIX strerror_r instead of GNU version?

How do I get the POSIX strerror_r instead of GNU version? I'm compiling with g++ on Ubuntu 8.04 with glibc version 2.7 ( based on what's in ). Edit On the above man page it says: Feature Test Macro Requirements for glibc (see feature_test_macros(7)): The XSI-compliant version of strerror_r() is provided if: (_POSIX_C_SOURC...

What is the process to compile and install libc on redhat linux?

Hi, I have a server running Redhat EL 4.x. I have some changes to do in the source files of libc. And now I need to build the library "libc.so.6.." and install the same. My application finally depends on /lib/tls/libc.so.6 So, please let me know the process to build and install the "libc". Thanks for your time and help. ...

ActiPerl + Tcl.pm *** glibc detected *** munmap_chunk(): invalid pointer: 0x09b5e0d8

I installed ActivePerl 5.10.1.1007 on my Ubuntu 10.04 machine. I have a very simple Perl script with the following lines: use lib "/opt/ActivePerl-5.10/lib"; use Tcl; my $Interpreter = new Tcl; $Interpreter->Eval('puts "Hello world"'); $Interpreter->Eval('set ::env(TESTVAR) 55') The output is the following: $ /opt/ActivePerl-5.10/...

global variable for getenv() ?

Which is the global variable which holds all the environmental variables for getenv() ? In what glibc file is this var filled with env vars ? I believe it to be **environ but when I set an env var in bash it only ouputs the SSH_AGENT_PID env var. Why is SSH_AGENT_PID set and why is it the only one that is set ? DOCUMENT_ROOT='/foopath...

How long does Glibc take to compile?

I've been compiling it in a virtual machine for over 8 hours now and it still hasn't finished. The terminal is still printing things so I know it's still compiling. The host system is a 2.10Ghz Intel Core2Duo with 4GB RAM and the guest is Linux on a PowerPC virtual machine (QEMU) one with 1GB RAM. I know the dynamic instruction transl...

sem_t union/struct C++ inherintance

I'm porting some old C++ project on Linux (RHEL 5.3). The situation is the following #include <semaphore.h> class OldClass: public sem_t This used to work because till glibc-2.3.3.20040420 sem_t was a struct. Now, with the newer version of glib is a union =>inheritance not allowed. so the compilation doesn't work. how it was: type...