由买买提看人间百态

topics

全部话题 - 话题: libc
首页 上页 1 2 3 (共3页)
F*******i
发帖数: 190
1
来自主题: Linux版 - mmap question
Daxia,
one question, which lib has the mmap function? Is it libc or from kernel?
thanks!
S*A
发帖数: 7142
2
来自主题: Linux版 - mmap question
libc has mmap system call wrappers.
kernel has the real function to do the mmap.
F*******i
发帖数: 190
3
来自主题: Linux版 - glibc question,
Dxia,
I downloaded a glic from gnu and compiled it successfully.
then I change the LD_LIBRARY_PATH to include this new lib in
the .bashrc,
then i login a new shell and issue the command ls, it shows:
/bin/ls: error while loading shared libraries: MYNEWGLIBCLIB/lib/libc.so.6:
ELF file OS ABI invalid
any insights is really appreciated!
a****a
发帖数: 5763
4
这说的是Libc version好不好?
d********g
发帖数: 10550
5
你去查查libc各个distro的package脚本,看看是不是有patch再来
upstream指的不是这些上游的package难道还指distro?
d******i
发帖数: 7160
6
mount -t cifs //192.168.1.XXX /mnt/XXX -o user=XXX,password=XXX,workgroup=
WORKGROUP
/sbin/mount.cifs: /lib/libc.so.6: version `GLIBC_2.17' not found (required
by /sbin/mount.cifs)
试了 -f 了,没作用。
咋整?
a**********k
发帖数: 1953
7
来自主题: Linux版 - linux真是一窝不如一窝
Re.
用x86的都被那些distro惯坏了
多年前玩过一个PPC的系统, 都是自己改驱动器,编译
kernel, 连带busybox,libc一整套toolchain都要
自己编译搞定。
d******i
发帖数: 7160
8
在用vimgdb,故意写了句除零。
结果停到了汇编里:
191 (gdb) where
192 #0 0x40056950 in raise () from /lib/arm-linux-gnueabi/libc.so.6
193 #1 0x0000860c in __div0 ()
194 #2 0x000085dc in __divsi3 ()
195 #3 0x000085dc in __divsi3 ()
196 Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
不知怎样show出出问题的行号?
小白勿拍啊。
谢谢了。
R******d
发帖数: 1436
9
来自主题: Linux版 - glibc版本过高怎么办?
现在装的是centos7,安装某个软件的时候提示:
系统是:readhat 5.2 64bit glibc 02.17
需要:readhat 6.1 64bit glibc 02.11.01 才能安装。
查了一下,02.17好像往下兼容02.11啊。请问有什么办法再装个低版本的glibc?现在
的环境软件安装不上了。
谢谢
rpm -q glibc,提示:
glibc-2.17-55.el7_0.1.x86_64
glibc-2.17-55.el7_0.1.i686
strings /lib/libc-2.17.so |grep GLIBC,提示:
GLIBC_2.0
GLIBC_2.1
GLIBC_2.1.1
GLIBC_2.1.2
GLIBC_2.1.3
GLIBC_2.2
GLIBC_2.2.1
GLIBC_2.2.2
GLIBC_2.2.3
GLIBC_2.2.4
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
... 阅读全帖
R******d
发帖数: 1436
10
来自主题: Linux版 - glibc版本过高怎么办?
现在装的是centos7,安装某个软件的时候提示:
系统是:readhat 5.2 64bit glibc 02.17
需要:readhat 6.1 64bit glibc 02.11.01 才能安装。
查了一下,02.17好像往下兼容02.11啊。请问有什么办法再装个低版本的glibc?现在
的环境软件安装不上了。
谢谢
rpm -q glibc,提示:
glibc-2.17-55.el7_0.1.x86_64
glibc-2.17-55.el7_0.1.i686
strings /lib/libc-2.17.so |grep GLIBC,提示:
GLIBC_2.0
GLIBC_2.1
GLIBC_2.1.1
GLIBC_2.1.2
GLIBC_2.1.3
GLIBC_2.2
GLIBC_2.2.1
GLIBC_2.2.2
GLIBC_2.2.3
GLIBC_2.2.4
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
... 阅读全帖
d****n
发帖数: 1637
11
来自主题: Linux版 - glibc版本过高怎么办?
google is your good friend.
http://stackoverflow.com/questions/847179/multiple-glibc-librar
""""
It is very possible to have multiple versions of glibc on the same system (
we do that every day).
However, you need to know that glibc consists of many pieces (200+ shared
libraries) which all must match. One of the pieces is ld-linux.so.2, and it
must match libc.so.6, or you'll see the errors you are seeing.
The absolute path to ld-linux.so.2 is hard-coded into the executable at link
time, and can ... 阅读全帖
c******3
发帖数: 6509
12
来自主题: Linux版 - FreeBSD越来越好用了
FreeBSD属于高不成低不就的东西,喜欢折腾的人可以玩Debian或者Gentoo,做研发的
可能几年都不升级Linux,包管理系统根本影响不大。
我机器目前主力还是RHEL 5 和 RHEL 6,我也没办法,EDA软件厂商死活不升级到RHEL
7以上...以前用过一段时间Debian,经常莫名其妙的崩溃,怀疑是libc版本不匹配引起
y**b
发帖数: 10166
l*********b
发帖数: 8
14
来自主题: Programming版 - Segmentation fault
check whether your machine and the target have same arch, same libc, etc..
recompile if necessary
c*****z
发帖数: 182
15
yes, but the dlls are linuxgate, libz, libc and some other stuff that have
nothing to do with my own libariires, how can i get rid of them? thanks
D*********s
发帖数: 555
16
来自主题: Programming版 - 一个面试题
有,比如libc有bug,
或者前面说的全局变量,访问了不该访问的内存,立刻就死了。
c***d
发帖数: 996
17
☆─────────────────────────────────────☆
pxu (Lingua Franca) 于 (Wed Dec 6 15:53:35 2006) 提到:
哦买嘎

☆─────────────────────────────────────☆
thrust (Thrust Jaeina) 于 (Wed Dec 6 15:56:26 2006) 提到:
different library use different convention. for unix system calls, 0=success, yes.
but error usually return <0. for libc, most probably not.
☆─────────────────────────────────────☆
Deling (流浪歌手-安全着陆) 于 (Wed Dec 6 16:01:42 2006) 提到:
this is a typical abuse of integer, that's why I hate C so
l*****c
发帖数: 1153
18
来自主题: Programming版 - 问一个Visual Studio 2003 到 2005的问题
Open Properties.
In Linker->Input->Ignore specific libarary, put LIBC for release and LIBCD
for debug. See if this works.
l*****c
发帖数: 1153
19
来自主题: Programming版 - VC2005 C++ link error help
In properties/link, put LIBC in ignored libraries for release and LIBCD for
debug.
t****t
发帖数: 6806
20
there is a default library called libc
t****t
发帖数: 6806
21
来自主题: Programming版 - multiple random number generator
首先, 你要控制那么细的话, libc自己的rand()是个很糙的函数, 多半不合要求
其次, 你确定是每个实例都要一个自己的PRNG吗?
如果不是并行做, 你可以做完一个, 再重新用srand()设种子, 再做下一个
r****t
发帖数: 10904
22
来自主题: Programming版 - multiple random number generator
libc 的 rand() 是怎么产出随机数的?用 /dev/random 来 seed 行不行?
我知道的有 Knuth 的 ACG 里面的 RNG 是个"不错"的 RNG, 到底多好我不知道。
i*****f
发帖数: 578
23
来自主题: Programming版 - fread/fwrite有big/small endian问题吗?
GNU libc has an socket API handles this because tcp packet and x86 machine
uses different endians. I remember it is ntol() or lton().
t****t
发帖数: 6806
24
来自主题: Programming版 - Random number generator in C++
then rand() is indeed a function of time(), which could be random, or could
be totally not random.
(pseudo) random generator is not a trivial topic. the quality of PRNG varies
a LOT. if your program need to use a lot of PRN (e.g. more than 2^16),
usually you have to pick a reasonable generator, instead of blindly using
the rand() comes with libc.
t****t
发帖数: 6806
25
来自主题: Programming版 - C++ rand()函数每次生成同一个数
matlab的rand和libc的rand其实是一样的, 也要设seed, 只是算法不一样而已
t****t
发帖数: 6806
26
来自主题: Programming版 - A C++ exception question
fopen() is from libc, it doesn't throw any exception. if open fails, it
returns NULL.
on the other hand, if an exception is thrown (whatever reason) and is not
catched by catch block, terminate() will be called, which will in turn call
terminate handler set by set_terminate(). the default handler will call
abort().
if an exception is thrown and is not listed in exception-specification,
unexpected() will be called, which will in turn call unexpected handler set
by set_unexpected(). the default ha
t****t
发帖数: 6806
27
来自主题: Programming版 - C++ delete
delete is usually not implemented by OS. it's usually implemented by libc++.

freelist
t****t
发帖数: 6806
28
来自主题: Programming版 - C++ delete
if you look at the function name: Rtl****
RTL means runtime library. obviously that's not a part of OS. i suppose that
's on windows. libc++ is exactly the runtime library.
t****t
发帖数: 6806
29
来自主题: Programming版 - 如何解释程序内存占用慢慢变高?
don't assume you can do better than libc. most programmer's can not.
t****t
发帖数: 6806
30
if you explicitly use va_list to call, you declare a parameter with va_list
type.
"..." is used to accept indefinite number of parameters, while "va_list"
only accept one parameter. they are totally different. the connection is,
you use type va_list to enumerate (indefinite number of) parameters in "..."
, since "..." doesn't have a name.
i see you do not have a clear understanding of c language. i am afraid it's
almost impossible to port a libc in 1 month given that...
j*******d
发帖数: 8834
31
time is running short and you're about to get fired....
subcontract the work to me. i can port all func/apis libc(3) for ya for a
fixed $
y****e
发帖数: 23939
32
I have a program which calls memset and memmove. My system is Fedora 14 x86_
64 and g++ 4.5.1. I realize now when the float data set over 8GB limit,
these two functions create segfault. The
backtrace of call stack shows it crash at:
# in __memmove_ssse3 () from /lib64/libc.so.6
The program runs OK when data set size is under 8GB.
Anybody knows why? I googled online but can't find any place talking about
the size limit of memset and memmove.
F*******i
发帖数: 190
33
来自主题: Programming版 - glibc question
Dxia,
I downloaded a glic from gnu and compiled it successfully.
then I change the LD_LIBRARY_PATH to include this new lib in
the .bashrc,
then i login a new shell and issue the command ls, it shows:
/bin/ls: error while loading shared libraries: MYNEWGLIBCLIB/lib/libc.so.6:
ELF file OS ABI invalid
any insights is really appreciated!
t****t
发帖数: 6806
34
your application behaviour should not depend on OS/libc version, if your
application is not OS related.
if you must, you will have to use your own memory management and call kernel
directly to apply for memory.

GCC
array
t****t
发帖数: 6806
35
来自主题: Programming版 - CodeBlocks cannot display vector in Watches
gdb对STL的支持一般, 但是常见的vector什么的还是可以用的, 别的distro我不知道,
fedora的libc++里面是有pretty-printer的, 打印个vector打印个string什么的不成问题
x****u
发帖数: 44466
36
这个问题没那么容易解决,就算是同样的libc,具体怎么分配内存还是可以配置,也是
问题的源泉。
而且对于私有代码大多数时候不可能要求使用同样的C库。
x****u
发帖数: 44466
37
这个问题没那么容易解决,就算是同样的libc,具体怎么分配内存还是可以配置,也是
问题的源泉。
而且对于私有代码大多数时候不可能要求使用同样的C库。
t****t
发帖数: 6806
38
来自主题: Programming版 - 关于 c malloc的一个问题
as long as the system can calculate the memory size, you don't, and shouldn'
t have to worry about it, unless you are designing the libc.
X****r
发帖数: 3557
39
来自主题: Programming版 - 关于 c malloc的一个问题
+1 what thrust said
and if you are curious about the implemention, many libc have source code
available.
i*****o
发帖数: 1714
40
来自主题: Programming版 - 大家讨论过了node.js了吗?
其实没什么,我只是举个nodejs实战的例子。这个例子很能说明nodejs在实时和并发应
用领域的优势。
nodejs的开发者本人是个c programer,nodejs刚开始就是libc的直接移植。所以node
对熟悉c的人是个不错的选择。
上面很多人想用nodejs做网站,其实我觉得nodejs这种东西做app server更适合。你去
meetup了解一下,大部分人都是用它来做某个mobile app的backend。

★ 发自iPhone App: ChineseWeb 7.8
r*********r
发帖数: 3195
41
大部分人对libc里的math库完全没有概念。
t****t
发帖数: 6806
n*****t
发帖数: 22014
43
来自主题: Programming版 - nv的显卡能战胜intel的CPU么
以后 libc 都 gpu 化,一个核专门 strcmp,另一个负责 qsort
w***g
发帖数: 5958
44
开源的无所谓。如果你不想开源,或者客户没有下载源程序运行make的能力,那么我的
建议是centos 5.6,至少用vagrant之类的搞个centos 5.6做编译。这样基本上保证了
编译出来的二进制程序在哪儿都能跑。还有toolchain得花心思弄一下。网上可以弄到
gcc-4.7的yum respository,剩下各种自己依赖的library最好都用--enable-static -
-disable-shared外加export CFLAGS=-fPIC编译。这样可以弄出来静态编译的动态链接
库。很多环境,像java /python/matlab等和C++接口都需要你提供动态链接库,但是如
果你的动态链接库如果静态链接自带各种库的话能省很多事。不过Linux底下的静态链
接有一个问题,就是getaddrinfo/gethostbyname在静态链接的情况下没有解析域名的
能力,只能接受IP地址。如果程序需要域名解析,那libc还是只能动态链接。
新版本的ubuntu用户界面极其傻x。不过xubuntu挺不错。
我其实很惊异于我接触的那些公司(都有自己的机房)都还在用cento... 阅读全帖
Y**G
发帖数: 1089
Y**G
发帖数: 1089
v******n
发帖数: 421
47
来自主题: Programming版 - Ruby 为什么输给了py
FPUTS(3) FreeBSD Library Functions Manual FPUTS(
3)
NAME
fputs, puts -- output a line to a stream
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include
int
fputs(const char *str, FILE *stream);
int
puts(const char *str);
DESCRIPTION
The function fputs() writes the string pointed to by str to the stream
pointed to by stream.
The function puts() writes the string str, and a terminating newline
character... 阅读全帖
首页 上页 1 2 3 (共3页)