glibc

在LINUX AS4下安装GCC--RPM

匆匆过客 提交于 2020-01-01 00:32:38
升级内核需要GCC编译器的支持,系统在安装的时候没有安装GCC编译器,不得不重新安装GCC编译器, 需要一起安装的组件: glibc-kernheaders glibc-headers glibc-devel cpp gcc 建立相应的目录以存放下载的组件包 mkdir /home/tmp 直入相应的目录,以确保下载的文件在指定的目录 cd /home/tmp 执行下面的命令下载组件包,确保网络配置正确,并且系统没有使用ipfw或iptable限制某些端口的访问。 wget ftp://mirror.switch.ch/mirror/scientificlinux/40rolling/i386/SL/RPMS/glibc-kernheaders-2.4-9.1.98.EL.i386.rpm wget ftp://mirror.switch.ch/mirror/scientificlinux/42/i386/SL/RPMS/glibc-headers-2.3.4-2.13.i386.rpm wget ftp://mirror.switch.ch/mirror/scientificlinux/42/i386/SL/RPMS/glibc-devel-2.3.4-2.13.i386.rpm wget http://distro.ibiblio.org/pub/linux

How are POSIX cancellation points supposed to behave?

此生再无相见时 提交于 2019-12-31 21:53:08
问题 I've been looking at glibc/nptl's implementation of cancellation points, and comparing it to POSIX, and unless I'm mistaken it's completely wrong. The basic model used is: int oldtype = LIBC_ASYNC_CANCEL(); /* switch to asynchronous cancellation mode */ int result = INLINE_SYSCALL(...); LIBC_CANCEL_RESET(oldtype); According to POSIX: The side-effects of acting upon a cancellation request while suspended during a call of a function are the same as the side-effects that may be seen in a single

“C or gcc” is like “Chicken or the egg” ? :( [duplicate]

落花浮王杯 提交于 2019-12-30 11:12:12
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: How are gcc/g++ bootstrapped? I would like to know how gcc is compiled as we all know it is written in C. Did they used some other compiler to come up with gcc? If so, can I use the same compile to compile my C program? 回答1: There is no chicken and egg here. glibc is compiled with the compiler you are using. That compiler was first compiled with a previous version of the same compiler. Then it can compile

Understanding the strcmp function of gnu libc

给你一囗甜甜゛ 提交于 2019-12-30 07:02:08
问题 Here is the strcmp function that i found in the glibc: int STRCMP (const char *p1, const char *p2) { const unsigned char *s1 = (const unsigned char *) p1; const unsigned char *s2 = (const unsigned char *) p2; unsigned char c1, c2; do { c1 = (unsigned char) *s1++; c2 = (unsigned char) *s2++; if (c1 == '\0') return c1 - c2; } while (c1 == c2); return c1 - c2; } This is a pretty simple function where the body of while initiates c1 and c2 with the value of *s1 and *s2 and continues till either c1

glibc detected error

不想你离开。 提交于 2019-12-29 09:56:10
问题 Can anybody please help me make sense of this error message? *** glibc detected *** ./kprank_new3_norm: munmap_chunk(): invalid pointer: 0x00000000096912d0 *** ======= Backtrace: ========= /lib64/libc.so.6(cfree+0x1b6)[0x3df6e75a36] ./kprank_new3_norm[0x409277] ./kprank_new3_norm[0x4092a9] ./kprank_new3_norm[0x4092ea] ./kprank_new3_norm[0x40941f] ./kprank_new3_norm[0x40943b] ./kprank_new3_norm[0x40945f] ./kprank_new3_norm[0x409628] ./kprank_new3_norm[0x4096a7] ./kprank_new3_norm[0x40968d] .

Can I make valgrind ignore glibc libraries?

倾然丶 夕夏残阳落幕 提交于 2019-12-29 06:45:11
问题 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 understand that there might be some issue with incompatible glibc / valgrind version. I tried various valgrind releases and glibc versions but no luck. Any

Why is glibc's sscanf vastly slower than fscanf on Linux?

不想你离开。 提交于 2019-12-28 14:22:27
问题 I am using GCC 4.8 and glibc 2.19 on an x86_64 Linux. While playing with different input methods for a different question, I compared fscanf and sscanf . Specifically, I would either use fscanf on the standard input directly: char s[128]; int n; while (fscanf(stdin, "%127s %d", s, &n) == 2) { } Or I would first read the entire input into a buffer and then traverse the buffer with sscanf . (Reading everything into the buffer takes a tiny amount of time.) char s[128]; int n; char const * p = my

ES 04 - 安装Kibana 6.6.0 以及常见问题的解决

ぐ巨炮叔叔 提交于 2019-12-28 08:11:37
目录 1 Kibana是什么 2 安装并启动Kibana 2.1 准备安装包 2.2 修改配置文件 2.3 启动Kibana并验证 2.4 关闭Kibana服务 3 Kibana功能测试 3.1 关于集群的状态status 3.2 关于集群中的节点数 3.3 关于未分配的分片 4 常见问题及解决 1 Kibana是什么 Kibana是一个配合Elasticsearch使用的、开源的数据分析和可视化平台, 可以与Elasticsearch中存储的索引文档进行交互. —— 使用Kibana能执行高级的数据分析, 并通过图表、表格、地图等形式显示分析结果. 2 安装并启动Kibana 在安装好单机版Elasticsearch的基础上, 安装Kibana插件, 使用其UI界面进行后续的学习操作. 前提: JDK和Elasticsearch单机服务已成功配置部署. 2.1 准备安装包 (1) 下载安装包: 下载地址: https://www.elastic.co/downloads/past-releases . 本文演示使用的是 kibana-6.6.0-linux-x86_64.tar.gz . (2) 解压并重命名: # 上传安装包至服务器的/data/elk-6.6.0下: cd /data/elk-6.6.0 # 解压安装包: tar -zxf kibana-6.6.0-linux

How to upgrade glibc from version 2.12 to 2.14 on CentOS?

╄→尐↘猪︶ㄣ 提交于 2019-12-27 12:22:02
问题 I do not know how to upgrade glibc from version 2.12 to 2.14 on CentOS 6.3. I need your help. 回答1: You cannot update glibc on Centos 6 safely. However you can install 2.14 alongside 2.12 easily, then use it to compile projects etc. Here is how: mkdir ~/glibc_install; cd ~/glibc_install wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz tar zxvf glibc-2.14.tar.gz cd glibc-2.14 mkdir build cd build ../configure --prefix=/opt/glibc-2.14 make -j4 sudo make install export LD_LIBRARY_PATH=/opt

Dockerfile使用:Docker+alpine+jdk1.8

半腔热情 提交于 2019-12-27 11:44:15
Dockerfile示例: docker+alpine+jdk1.8: 基于安装包安装 基于wget安装 jdk8_基于安装包 用Alpine跑了JDK8的镜像结果发现,JDK还是无法执行.后来翻阅文档才发现 Java是基于GUN Standard C library(glibc) Alpine是基于MUSL libc(mini libc) 所以Alpine需要安装glibc的库,以下是官方给出wiki https://wiki.alpinelinux.org/wiki/Running_glibc_programs 操作: #下载包,解压 tar -zxvf jdk-8u231-linux-x64.tar.gz #进入目录 cd jdk1.8.0_231 #删除文本文件 rm -rf COPYRIGHT LICENSE README release THIRDPARTYLICENSEREADME-JAVAFX.txt THIRDPARTYLICENSEREADME.txt Welcome.html #删除其他无用文件 rm -rf lib/plugin.jar \ lib/ext/jfxrt.jar \ bin/javaws \ lib/javaws.jar \ lib/desktop \ plugin \ lib/deploy* \ lib/*javafx* \ lib/*jfx