LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 811|回复: 0

Posix msg queue 和NPTL的冲突?

[复制链接]
发表于 2004-10-19 19:30:37 | 显示全部楼层 |阅读模式
我的配置是 Fedora core2

我在里面使用 Posix msg queue。但是出了问题。
用GCC 编译的时候:
我已经include <mqueue.h>了
我用 gcc编译说

[root@chuxue epoll]# gcc common.c epollserver.c -o epollserver -lmqueue
/usr/bin/ld: cannot find -lmqueue
collect2: ld returned 1 exit status

不用 -lmqueue

[root@chuxue epoll]# gcc common.c epollserver.c -o epollserver
/tmp/ccNixVZB.o(.text+0x67): In function `eph_createmq':
: undefined reference to `mq_open'
/tmp/ccNixVZB.o(.text+0x9c): In function `eph_createmq':
: undefined reference to `mq_unlink'
collect2: ld returned 1 exit status
[root@chuxue epoll]#


后来在GOOGLE上找到国外一论坛上的消息:
From: Sebastien Decugis <sebastien@ex...>
Re: unable to run test for MSG   
2004-08-19 00:14  
Then if you don"t have a very recent glibc (read: that you built
yourself) the message queue features are likely not to be supported by
your system (mq_* routines). They have been added in NPTL quite recently
(about 3 months ago IIRC) and were totally missing from LinuxThreads.

Sebastien.





On Thu, 2004-08-19 at 08:07, ganesh kumar wrote:
> my os is linux 2.4.18-14 version
>
> ----- Original Message -----
> From: Sebastien Decugis
> Date: Wed, 18 Aug 2004 15:48:04 +0200
> To: ganesh kumar
> Subject: Re: [posixtest-discuss] unable to run test for MSG
>
> > What is your operating system / libc library?
> >
> >
> > On Wed, 2004-08-18 at 14:11, ganesh kumar wrote:
> > > when i try to run individually the MSG test using ./run_test MSG .
> it
> > > gives me the following error. it is not building and linking...
> > >
> > > link :FAILED
> > >
> > > undefined reference to mq_open. i guess there is some problem in
> > > mqueue.h header file...
> > >
> > > can you help me in that and also any link to download the correct
> > > mqueue header file...
> > >
> > >
> > -------------------------------
> > Sebastien DECUGIS
> > NPTL Tes t & Trace Project
> > http://nptl.bullopensource.org/
> >


按照他的说法,就是linuxthreads里不支持mq msg queue,而改由NPTL支持。
请问我怎么才能把程序连接到NPTL?
我看了一下,Fedora core2好像默认的就是NPTL。。。
不知道有没有兄弟能帮我指点一下?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表