glibc

我的arm-gcc工具编译安装过程

寵の児 提交于 2019-12-04 03:52:19
我的编译环境是在xubuntu里,开始前确认环境里有texinfo, gawk(注意mawk编译glibc header时会有问题), bison, flex,没有就安装它们。 工作的目录是用户目录下 源文件放在目录cross_source里 编译的工作目录是cross_build xxx 就是存放解压出来的源代码,例如binutils-2.19.tar.bz2,解压放在binutils-2.19 xxx_build 用于编译的目录,例如binutils-2.19.tar.bz2,编译目录是binutils-2.19_build 用到的文件是 binutils-2.19.tar.bz2 gcc-core-4.3.2.tar.bz2 gcc-g++-4.3.2.tar.bz2 mpfr-2.3.2.tar.bz2 gmp-4.2.4.tar.bz2 linux-2.6.28.tar.bz2 glibc-ports-2.7.tar.bz2 glibc-2.7.tar.bz2 首先创建目录 >mkdir cross_source >mkdir cross_build >cd cross_build 1编译,安装binutils binutils的配置和编译安装,binutils的编译一般不会遇到什么问题,至少我没有遇到。 >tar -jxvf ../cross_source

how do I remove `GLIBC_2.27' requirement at compile time?

我的梦境 提交于 2019-12-04 03:35:18
问题 I've been using a docker image for c++ compilation. It's based on Ubuntu 18.04. When I attempt to run on some Ubuntu 16 systems, I get this message: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found I'll post the full ldd output below. I like using the newer compiler. I would prefer to not compile with an older Linux base image (but I will if necessary). I statically link most libraries, but I haven't been statically linking glibc. A number of web sources recommend against that.

Explanation of memcpy memmove GLIBC_2.14/2.2.5

别等时光非礼了梦想. 提交于 2019-12-04 03:11:45
My issue originated with a shared library I was given without the option to recompile the library. The error stated undefined reference to memcpy@GLIBC_2.14 . The version of GLIBC on my machine was 2.12. I have seen fixes people have done online using the line __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); The fix I made was using a hex editor to change the reference of 2.14 to GLIBC_2.2.5. When executing the command readelf -V lib_name.so , the outputs changed from: 0x0060 Name: GLIBC_2.14 Flags: none Version 6 ...... 0x0080 Name: GLIBC_2.2.5 Flags: none Version 4 to: 0x0060 Name: GLIBC_2.2.5

STF环境搭建&运行及踩坑记录

强颜欢笑 提交于 2019-12-04 03:04:46
最初是在centos环境上搭建STF,由于种种依赖缺失、nodejs/npm版本不兼容、以及无解的“Segmentation fault (core dumped)”错误,最终还是以失败告终,转战Mac平台。踩坑记录写在搭建运行的后面,Linux 及 Mac中的坑都有涉及,由于文章篇幅较长,读者可自行查看所需。 一、STF是什么 STF (or Smartphone Test Farm) is a web application for debugging smartphones, smartwatches and other gadgets remotely, from the comfort of your browser. 作用:Web端远程批量管理多台Android设备,可支持超过160台 二、STF功能简介: 1、系统支持 (1)只支持Android系统,版本 2.3.3 (SDK level 10) to 7.1 (SDK level 25) (2)支持Wear 5.1 (不支持 5.0 因为没有权限) (3)支持 Fire OS, CyanogenMod,和其他Android发布系统 (4)root权限不是必须的 2、浏览器远程控制任意设备 (1)实时屏幕反馈 a.刷新速度可达30-40 FPS。 b.支持屏幕翻转 (2)支持电脑键盘输入 a.支持元键 b

Can GHC link binaries against a libc implementation such as uclibc (used in OpenWrt by default)?

拈花ヽ惹草 提交于 2019-12-04 02:59:46
I am using Debian/MIPS+QEMU to build MIPS ports of PortFusion (a TCP tunneling solution). The resulting binaries are linked against GNU libc. Thus, they cannot be just copied over and used on vanilla OpenWrt which ships with uclibc instead of eglibc (which seems binary-compatible with GNU libc). Is there a way to link Haskell/GHC binaries on Debian/MIPS against uclibc instead of eglibc ? Can OpenWrt's using uclibc be really the reason why PortFusion binaries copied over from Debian fail to run with -ash: binary not found or can this message be due to something entirely else? See https://github

gets() function and '\0' zero byte in input

被刻印的时光 ゝ 提交于 2019-12-04 02:17:43
问题 Will the gets() function from C language (e.g. from glibc) stop, if it reads a zero byte ( '\0' ) from the file ? Quick test: echo -ne 'AB\0CDE' Thanks. PS this question arises from comments in this question: return to libc - problem PPS the gets function is dangerous, but it is a question about this function itself, not about should anybody use it or not. 回答1: The behavior of gets() is that it stops when a newline character is encountered or if EOF is encountered. It does not care if it

GLIBC_2.7 not found

一世执手 提交于 2019-12-04 00:14:23
I am getting the following error when trying to run several executables: /lib/libc.so.6: version `GLIBC_2.7' not found (required by .tools/bridge/bridge) I have recently upgraded from CentOS 5.3 to 5.7 (I am required to run these tools on CentOS 5, so I can't upgrade to 6). I recompiled the whole code but this error still appears. Has anyone encountered this type of error? Thanks, Claudiu Employed Russian The error means that you built .tools/bridge/bridge on a system with glibc-2.7 (or later), and are trying to run it on a system that has glibc-2.6 or earlier. Linux (and most UNIXes) does not

MAP_ANONYMOUS with C99 standard

我的梦境 提交于 2019-12-04 00:01:03
I have an application that uses the mmap system call, I was having an issue getting it to compile for hours looking as to why I was getting MAP_ANON and MAP_ANONYMOUS were undeclared, I had a smaller section of code that I used and I saw I could compile it just fine so I tried just a basic compile and that worked, I saw that it fails when you add -std=c99. Is there a specific reason that MAP_ANON and MAP_ANONYMOUS are not valid in the C99 standard? I know that they aren't defined by POSIX but are defined by BSD SOURCE so I just want to know why that is. You probably want -std=gnu99 instead of

JVM源码分析之一个Java进程究竟能创建多少线程

烈酒焚心 提交于 2019-12-03 21:38:46
概述 虽然这篇文章的标题打着JVM源码分析的旗号,不过本文不仅仅从JVM源码角度来分析,更多的来自于Linux Kernel的源码分析,今天要说的是JVM里比较常见的一个问题 这个问题可能有几种表述 一个Java进程到底能创建多少线程? 到底有哪些因素决定了能创建多少线程? java.lang.OutOfMemoryError: unable to create new native thread 的异常究竟是怎么回事 不过我这里先声明下可能不能完全百分百将各种因素都理出来,因为毕竟我不是做Linux Kernel开发的,还有不少细节没有注意到的,我将我能分析到的因素和大家分享一下,如果大家在平时工作中还碰到别的因素,欢迎在文章下面留言,让更多人参与进来讨论 从JVM说起 线程大家都熟悉, new Thread().start() 即会创建一个线程,这里我首先指出一点 new Thread() 其实并不会创建一个真正的线程,只有在调用了start方法之后才会创建一个线程,这个大家分析下Java代码就知道了,Thread的构造函数是纯Java代码,start方法会调到一个native方法start0里,而start0其实就是 JVM_StartThread 这个方法 从上面代码里首先要大家关注下最后的那个if判断 if (native_thread->osthread() ==

tidb架构~本地化安装

若如初见. 提交于 2019-12-03 20:21:57
tidb安装 简介:此教程为不满足硬件条件下的部署(无法用ansible自动部署) 1 下载相应包 tidb-v2.1.16-linux-amd64 版本号自选 2 将响应包拷贝到各个服务器 3 启动相应服务 小提示:启动命令会在当前路径下创建相应文件夹 pd-server启动 nohup /usr/local/tidb/bin/pd-server -initial-cluster="http://host1:2380" -client-urls="http://host1:2379" --data-dir=pd --log-file=pd.log & server启动 tikv启动 nohup /usr/local/tidb/bin/tikv-server --pd="host1:2379" --addr="host2:27011" --store=tikv --log-file=tikv.log & tidb-server启动 nohup /usr/local/tidb/bin/tidb-server --store=tikv --path="host1:2379" --log-file=tidb.log & 4 访问测试 默认端口4000 mysql -uroot -P4000 -h127.0.0.1 第一次需要本机登录 创建用户 grant all privileges