muc.lists.freebsd.current

Hi

I was wondering if anyone else is having this problem building
asterisk on -CURRENT.  The problem may not be with FreeBSD - it
looks like gnu configure is incorrectly detecting the CPU as "i386"
when it's actually a pentium3:

configure: Package configured for:
configure: OS type  : freebsd7.0
configure: Host CPU : i386
===>  Building for asterisk-1.4.11

The i386 doesn't have any atomic primatives or something like that
(maybe just according to gcc-4.2).  If I frob the configured sources
and change the i386 to pentium3, then the build works, but I don't
have enough asterisk foo at this point to verify that it actually
works.

 ast_expr2f.o asterisk.o astmm.o autoservice.o callerid.o cdr.o channel.o chanv
ars.o cli.o config.o cryptostub.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o
 enum.o file.o fixedjitterbuf.o frame.o fskmodem.o http.o image.o indications.o
io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o privacy
.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o stdtime/localtime.o strcompat.
o tdd.o term.o threadstorage.o translate.o udptl.o ulaw.o utils.o editline/libed
it.a -> asterisk
channel.o(.text+0x2b52): In function `ast_channel_alloc':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
channel.o(.text+0x2ec1):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
cli.o(.text+0x3a4a): In function `ast_cli_command':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
dial.o(.text+0x3da): In function `ast_dial_append':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
loader.o(.text+0xe3c): In function `__ast_module_user_add':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
loader.o(.text+0xec9):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/­aster
isk/lock.h:775: more undefined references to `__sync_fetch_and_add_4' follow
manager.o(.text+0x197): In function `process_events':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
ned reference to `__sync_sub_and_fetch_4'
manager.o(.text+0x173e): In function `free_session':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
ned reference to `__sync_sub_and_fetch_4'
manager.o(.text+0x18ab): In function `accept_thread':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
manager.o(.text+0x1962):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
manager.o(.text+0x1a67):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
manager.o(.text+0x1b15):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
manager.o(.text+0x4774): In function `action_waitevent':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
ned reference to `__sync_sub_and_fetch_4'
manager.o(.text+0x5f81): In function `generic_http_callback':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
manager.o(.text+0x5f8f):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
manager.o(.text+0x6a65):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
manager.o(.text+0x70b5): In function `session_do':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
utils.o(.text+0xde8): In function `ast_atomic_dec_and_test':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
ned reference to `__sync_sub_and_fetch_4'
utils.o(.text+0xe01): In function `ast_atomic_fetchadd_int':
/usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
ned reference to `__sync_fetch_and_add_4'
gmake[1]: *** [asterisk] Error 1
gmake: *** [main] Error 2
*** Error code 2

Stop in /usr/ports/net/asterisk.
*** Error code 1

Stop in /usr/ports/net/asterisk.

--
Ian Freislich

_______________________________________________
freebsd-curr...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-ad...@muc.de


 
   
您需要先 登录才能发帖。
要发帖,您需要先 加入此论坛
请先在 订阅设置页上更新您的昵称,然后再进行发帖。
您没有发帖的权限。
  
Luigi Rizzo  
查看个人资料   翻译成中文(简体) 翻译内容(查看原文内容)
 更多选项 2007年9月10日, 下午7时23分
新闻论坛: muc.lists.freebsd.current
发件人: ri...@icir.org (Luigi Rizzo)
日期: Mon, 10 Sep 2007 04:23:55 -0700
当地时间: 2007年9月10日(星期一) 下午7时23分
主题: Re: Building asterisk - undefined reference to `__sync_fetch_and_add_4'

- 隐藏被引用文字 -
- 显示引用的文字 -

On Mon, Sep 10, 2007 at 12:04:10PM +0200, Ian FREISLICH wrote:
> Hi

> I was wondering if anyone else is having this problem building
> asterisk on -CURRENT.  The problem may not be with FreeBSD - it
> looks like gnu configure is incorrectly detecting the CPU as "i386"
> when it's actually a pentium3:

> configure: Package configured for:
> configure: OS type  : freebsd7.0
> configure: Host CPU : i386
> ===>  Building for asterisk-1.4.11

> The i386 doesn't have any atomic primatives or something like that
> (maybe just according to gcc-4.2).  If I frob the configured sources
> and change the i386 to pentium3, then the build works, but I don't
> have enough asterisk foo at this point to verify that it actually
> works.

i don't completely understand what is happening here - i386 presumably
refers to the architecture, not to the very-low-level details of
the architecture, so there should not be anything specific to
one processor of the family in the flags passed to the compiler.

Could it be that it's a compiler bug instead (or something in
your /etc/make.conf which is forcing compiler-specific optimizations
but only for a part of the build or the libraries) ?

cheers
luigi

- 隐藏被引用文字 -
- 显示引用的文字 -

>  ast_expr2f.o asterisk.o astmm.o autoservice.o callerid.o cdr.o channel.o chanv
> ars.o cli.o config.o cryptostub.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o
>  enum.o file.o fixedjitterbuf.o frame.o fskmodem.o http.o image.o indications.o
> io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o privacy
> .o rtp.o say.o sched.o sha1.o slinfactory.o srv.o stdtime/localtime.o strcompat.
> o tdd.o term.o threadstorage.o translate.o udptl.o ulaw.o utils.o editline/libed
> it.a -> asterisk
> channel.o(.text+0x2b52): In function `ast_channel_alloc':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> channel.o(.text+0x2ec1):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
> erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
> cli.o(.text+0x3a4a): In function `ast_cli_command':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> dial.o(.text+0x3da): In function `ast_dial_append':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> loader.o(.text+0xe3c): In function `__ast_module_user_add':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> loader.o(.text+0xec9):/usr/ports/net/asterisk/work/asterisk-1.4.11/include/­aster
> isk/lock.h:775: more undefined references to `__sync_fetch_and_add_4' follow
> manager.o(.text+0x197): In function `process_events':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
> ned reference to `__sync_sub_and_fetch_4'
> manager.o(.text+0x173e): In function `free_session':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
> ned reference to `__sync_sub_and_fetch_4'
> manager.o(.text+0x18ab): In function `accept_thread':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x1962):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
> erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x1a67):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
> erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x1b15):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
> erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x4774): In function `action_waitevent':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
> ned reference to `__sync_sub_and_fetch_4'
> manager.o(.text+0x5f81): In function `generic_http_callback':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x5f8f):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
> erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x6a65):/usr/ports/net/asterisk/work/asterisk-1.4.11/includ­e/ast
> erisk/lock.h:775: undefined reference to `__sync_fetch_and_add_4'
> manager.o(.text+0x70b5): In function `session_do':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> utils.o(.text+0xde8): In function `ast_atomic_dec_and_test':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:809: undefi
> ned reference to `__sync_sub_and_fetch_4'
> utils.o(.text+0xe01): In function `ast_atomic_fetchadd_int':
> /usr/ports/net/asterisk/work/asterisk-1.4.11/include/asterisk/lock.h:775: undefi
> ned reference to `__sync_fetch_and_add_4'
> gmake[1]: *** [asterisk] Error 1
> gmake: *** [main] Error 2
> *** Error code 2

> Stop in /usr/ports/net/asterisk.
> *** Error code 1

> Stop in /usr/ports/net/asterisk.

> --
> Ian Freislich

> _______________________________________________
> freebsd-curr...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

_______________________________________________
freebsd-curr ...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr ...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-ad...@muc.de


 
   
您需要先 登录才能发帖。
要发帖,您需要先 加入此论坛
请先在 订阅设置页上更新您的昵称,然后再进行发帖。
您没有发帖的权限。
  
Ian FREISLICH  
查看个人资料   翻译成中文(简体) 翻译内容(查看原文内容)
 更多选项 2007年9月10日, 下午8时35分
新闻论坛: muc.lists.freebsd.current
发件人: i...@clue.co.za (Ian FREISLICH)
日期: Mon, 10 Sep 2007 14:35:30 +0200
当地时间: 2007年9月10日(星期一) 下午8时35分
主题: Re: Building asterisk - undefined reference to `__sync_fetch_and_add_4'

- 隐藏被引用文字 -
- 显示引用的文字 -

Luigi Rizzo wrote:
> On Mon, Sep 10, 2007 at 12:04:10PM +0200, Ian FREISLICH wrote:
> > Hi

> > I was wondering if anyone else is having this problem building
> > asterisk on -CURRENT.  The problem may not be with FreeBSD - it
> > looks like gnu configure is incorrectly detecting the CPU as "i386"
> > when it's actually a pentium3:

> > configure: Package configured for:
> > configure: OS type  : freebsd7.0
> > configure: Host CPU : i386
> > ===>  Building for asterisk-1.4.11

> > The i386 doesn't have any atomic primatives or something like that
> > (maybe just according to gcc-4.2).  If I frob the configured sources
> > and change the i386 to pentium3, then the build works, but I don't
> > have enough asterisk foo at this point to verify that it actually
> > works.

> i don't completely understand what is happening here - i386 presumably
> refers to the architecture, not to the very-low-level details of
> the architecture, so there should not be anything specific to
> one processor of the family in the flags passed to the compiler.

The trouble is that the asterisk build translates this into -march=i386
and -mcpu=i386 or -mtune=i386 which has that low level effect.  At
least the old asterisk port did this, I haven't yet figured out
what the new 1.4.11 asterisk is doing.

I'm inclined to believe that i386 in the FreeBSD context means
something fundamentally different to the same in the Linux context.

> Could it be that it's a compiler bug instead (or something in
> your /etc/make.conf which is forcing compiler-specific optimizations
> but only for a part of the build or the libraries) ?

It builds if I don't set CPUTYPE=p3 in /etc/make.conf.  So, I guess
that's the fix.

Ian

--
Ian Freislich

_______________________________________________
freebsd-curr...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-ad...@muc.de


 
   
您需要先 登录才能发帖。
要发帖,您需要先 加入此论坛
请先在 订阅设置页上更新您的昵称,然后再进行发帖。
您没有发帖的权限。
  
Luigi Rizzo  
查看个人资料   翻译成中文(简体) 翻译内容(查看原文内容)
 更多选项 2007年9月10日, 下午8时40分
新闻论坛: muc.lists.freebsd.current
发件人: ri...@icir.org (Luigi Rizzo)
日期: Mon, 10 Sep 2007 05:40:15 -0700
当地时间: 2007年9月10日(星期一) 下午8时40分
主题: Re: Building asterisk - undefined reference to `__sync_fetch_and_add_4'

- 隐藏被引用文字 -
- 显示引用的文字 -

On Mon, Sep 10, 2007 at 02:35:30PM +0200, Ian FREISLICH wrote:
> Luigi Rizzo wrote:
> > On Mon, Sep 10, 2007 at 12:04:10PM +0200, Ian FREISLICH wrote:
> > > Hi

> > > I was wondering if anyone else is having this problem building
> > > asterisk on -CURRENT.  The problem may not be with FreeBSD - it
> > > looks like gnu configure is incorrectly detecting the CPU as "i386"
> > > when it's actually a pentium3:

> > > configure: Package configured for:
> > > configure: OS type  : freebsd7.0
> > > configure: Host CPU : i386
> > > ===>  Building for asterisk-1.4.11

> > > The i386 doesn't have any atomic primatives or something like that
> > > (maybe just according to gcc-4.2).  If I frob the configured sources
> > > and change the i386 to pentium3, then the build works, but I don't
> > > have enough asterisk foo at this point to verify that it actually
> > > works.
...
> > Could it be that it's a compiler bug instead (or something in
> > your /etc/make.conf which is forcing compiler-specific optimizations
> > but only for a part of the build or the libraries) ?

> It builds if I don't set CPUTYPE=p3 in /etc/make.conf.  So, I guess
> that's the fix.

and there's another curious thing here, which i realised after posting
my email - asterisk uses gmake, not bmake, so does gmake read
/etc/make.conf too ? Who else uses that file ?

cheers
luigi
_______________________________________________
freebsd-curr...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-ad...@muc.de


 
   
您需要先 登录才能发帖。
要发帖,您需要先 加入此论坛
请先在 订阅设置页上更新您的昵称,然后再进行发帖。
您没有发帖的权限。
  
Alexander Leidinger  
查看个人资料   翻译成中文(简体) 翻译内容(查看原文内容)
 更多选项 2007年9月10日, 下午9时12分
新闻论坛: muc.lists.freebsd.current
发件人: Alexan...@Leidinger.net (Alexander Leidinger)
日期: Mon, 10 Sep 2007 15:12:48 +0200
当地时间: 2007年9月10日(星期一) 下午9时12分
主题: Re: Building asterisk - undefined reference to `__sync_fetch_and_add_4'
Quoting Ian FREISLICH <i ...@clue.co.za> (from Mon, 10 Sep 2007  
14:35:30 +0200):

- 隐藏被引用文字 -
- 显示引用的文字 -

> Luigi Rizzo wrote:
>> On Mon, Sep 10, 2007 at 12:04:10PM +0200, Ian FREISLICH wrote:
>> > Hi

>> > I was wondering if anyone else is having this problem building
>> > asterisk on -CURRENT.  The problem may not be with FreeBSD - it
>> > looks like gnu configure is incorrectly detecting the CPU as "i386"
>> > when it's actually a pentium3:

>> > configure: Package configured for:
>> > configure: OS type  : freebsd7.0
>> > configure: Host CPU : i386
>> > ===>  Building for asterisk-1.4.11

>> > The i386 doesn't have any atomic primatives or something like that
>> > (maybe just according to gcc-4.2).  If I frob the configured sources
>> > and change the i386 to pentium3, then the build works, but I don't
>> > have enough asterisk foo at this point to verify that it actually
>> > works.

>> i don't completely understand what is happening here - i386 presumably
>> refers to the architecture, not to the very-low-level details of
>> the architecture, so there should not be anything specific to
>> one processor of the family in the flags passed to the compiler.

> The trouble is that the asterisk build translates this into -march=i386
> and -mcpu=i386 or -mtune=i386 which has that low level effect.  At
> least the old asterisk port did this, I haven't yet figured out
> what the new 1.4.11 asterisk is doing.

> I'm inclined to believe that i386 in the FreeBSD context means
> something fundamentally different to the same in the Linux context.

On Linux this is set to the target architecture which shall be  
supported. Values are i386, i486, i586, ... and maybe some not so  
generic ones like pentium4 (maybe all values which gcc supports for  
-march).

We just put the architecture of the system (${ARCH}) into it. On  
FreeBSD-amd64 this is amd64 (linux uses x86_64), for FreeBSD-i386 this  
is i386, ...

I think we don't set it to something else, because nobody cared to do  
it so far. Now... when you have a look at  
http://www.Leidinger.net/FreeBSD/port-patches/Mk:bsd.port.mk.diff you  
will see (if you search for it, the diff contains more than just this  
patch) how we could do this based upon the value of CPUTYPE (the  
packages are tailored to the same CPU as the world).

Bye,
Alexander.

--
Men of peace usually are [brave].
                -- Spock, "The Savage Curtain", stardate 5906.5

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137
_______________________________________________
freebsd-curr...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-ad...@muc.de


 
   
您需要先 登录才能发帖。
要发帖,您需要先 加入此论坛
请先在 订阅设置页上更新您的昵称,然后再进行发帖。
您没有发帖的权限。
  
Alexander Leidinger  
查看个人资料   翻译成中文(简体) 翻译内容(查看原文内容)
 更多选项 2007年9月10日, 下午9时14分
新闻论坛: muc.lists.freebsd.current
发件人: Alexan...@Leidinger.net (Alexander Leidinger)
日期: Mon, 10 Sep 2007 15:14:52 +0200
当地时间: 2007年9月10日(星期一) 下午9时14分
主题: Re: Building asterisk - undefined reference to `__sync_fetch_and_add_4'
Quoting Luigi Rizzo <ri ...@icir.org> (from Mon, 10 Sep 2007 05:40:15 -0700):

> and there's another curious thing here, which i realised after posting
> my email - asterisk uses gmake, not bmake, so does gmake read
> /etc/make.conf too ? Who else uses that file ?

gmake doesn't read make.conf, but before gmake comes into play,  
configure is called by our make, which gets its CFLAGS by some magic  
depending on the value of CPUTYPE.

Bye,
Alexander.

--
SPAGMUMPS:
        Any of the millions of Styrofoam wads that accompany mail-order items.
                -- "Sniglets", Rich Hall & Friends

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137
_______________________________________________
freebsd-curr...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-ad...@muc.de


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值