libc

Libm relocation error when building Qt 5 for Nitrogen6x

家住魔仙堡 提交于 2019-12-12 09:59:12
问题 I am trying to build Qt 5 on a Nitrogen6x board powered by an *i.MX6Q`. I've installed Debian/wheezy on the board and am using an Ubuntu 12.10 machine for cross-compiling. Configuring Qt works like a charm but I am stuck in the make step. This is the configure script I run: ./configure -v -opensource -confirm-license -reduce-relocations -no-pch -no-xcb -no-opengl -opengl es2 -qt-libpng -qt-zlib -qt-xkbcommon -qt-xcb -qt-pcre -qt-libjpeg -qt-sql-mysql -optimized-qmake\ -make libs -device imx6

What is causing sprof to complain about “inconsistency detected by ld.so”?

此生再无相见时 提交于 2019-12-12 09:31:42
问题 I'm trying to use sprof to profile some software (ossim) where almost all the code is in a shared library. I've generated a profiling file, but when I run sprof, I get the following error: > sprof /home/eca7215/usr/lib/libossim.so.1 libossim.so.1.profile -p > log Inconsistency detected by ld.so: dl-open.c: 612: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed! The instructions I was following said that I needed libc version at least 2.5-34, I have

Understanding glibc source code conventions

五迷三道 提交于 2019-12-12 07:55:36
问题 I've been looking at some of the source code for glibc, in particular the nptl code, and I've found it a little bit hard to understand since it seems to have conventions that I'm not familiar with. For example I was looking at a very small file pthread_equal.c and there are a few things that I had questions about: 22 int 23 __pthread_equal (thread1, thread2) 24 pthread_t thread1; 25 pthread_t thread2; 26 { 27 return thread1 == thread2; 28 } 29 strong_alias (__pthread_equal, pthread_equal) The

GCC linking libc static

烂漫一生 提交于 2019-12-12 05:48:19
问题 I want to link libc.a and test.c but don't go well #test.c #include<stdio.h> #include <stdlib.h> int main(int argc, char *argv[]){ char *ptr; ptr = malloc(1024); free(ptr); return 0; } GCC linking libc static gcc test.c mystrcmp.c ./libc.a ldd ./a.out linux-gate.so.1 => (0xb7767000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb7737000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb758e000) /lib/ld-linux.so.2 (0xb7768000) this method is site(GCC linking libc static and some other

Solaris 11 / Illumos / OmniOS: Which package has /usr/include/sys/types.h?

∥☆過路亽.° 提交于 2019-12-12 04:32:28
问题 The Ubuntu equivalent would be libc6-dev , but I can't seem to find it for Solaris? How can I get types.h and related files for building packages on Solaris or Illumos? 回答1: You need the system/header package. I found this via http://pkg.oracle.com/solaris/release/en/search.shtml?token=types.h&action=Search 回答2: Assuming you use IPS 'pkg search 'types.h'' The Oracle Solaris 11 Cheat Sheet for Image Packaging System could be useful, too. 来源: https://stackoverflow.com/questions/41841143/trouble

Build against newer linux headers than libc is built using

五迷三道 提交于 2019-12-12 03:39:24
问题 I want to write a program using the new SCHED_DEADLINE scheduling policy available since Linux 3.14. I start out with a simple program trying to use the sched_setattr function. #include <sched.h> int main(void) { // struct sched_attr attr; // attr.size = sizeof(struct sched_attr); // attr.sched_policy = SCHED_DEADLINE; sched_setattr(0, (void*)0, 0); return 0; } However when compiling I get the following error: $gcc dead.c dead.c: In function ‘main’: dead.c:8:2: warning: implicit declaration

Convert Static Lib to Dynamic

拥有回忆 提交于 2019-12-11 11:05:08
问题 I have a libsomething.a file which is a static library with all dependencies included. I need to be able to import this in Python as it is a Python C library. According to this, it is not possible to use a static library as a CPython library. How can I take my .a file and make it a .so , keeping all static dependencies baked in? Background: I am using Crowbar to build a CPython shared library which can be called from Python in AWS Lambda. Until now, it has worked flawlessly, but as soon as I

Does Rust libc crate inhibit the compilation of custom panic handler?

旧街凉风 提交于 2019-12-11 09:55:12
问题 So we are currently trying to compile some Rust code that we can then link to some C code. To do this we are using Bindgen to generate an FFI, and then we will use it to call some C functions from Rust. However, we must first have the crate "libc" as a dependency in the Cargo.toml file of the project. The project we are currently working on demands that we use the crate wide !#[no_std] attribute, as we don't want the entire stdlib of Rust. We only need the core. The libc crate says we can

Can't pinvoke libc function from .NET core on Linux

不打扰是莪最后的温柔 提交于 2019-12-11 05:54:23
问题 I'm really enjoying the dotnet core possibilities, but there are certain problems on Linux platform. I was working with P/Invoke stuff. It's fine on Windows, but when I tried to call function from libc on Linux - I've got a problem: Unhandled Exception: System.DllNotFoundException: Unable to load DLL '/usr/lib/x86_64-linux-gnu/libc.so': The specified module could not be found. (Exception from HRESULT: 0x8007007E) I've tried two ways (source code http://pastebin.com/HDTnrM0a): [DllImport("/usr

How to prevent getopt from being confused with option with missing argument?

蓝咒 提交于 2019-12-11 05:27:19
问题 Say, I have code: while ((c = getopt(argc, argv, ":n:p")) != -1) { switch (c) { case 'n': syslog(LOG_NOTICE, "n: %s", optarg); break; case 'p': /* ... some code ... */ break; case ':': /* handle missing arguments to options requiring arguments */ break; /* some cases like '?', ... */ default: abort(); } } When I call my program as ./main -n -p it prints: n: -p Why does not getopt return : to indicate that argument to -n is missing but instead uses -p as parameter argument? 回答1: It is