Re: Issues with devel/boost-* on Sparc64
Foks, The current status of the issue is as follows: *) I've contacted a boost team, they suggested a smaller patch *) I've applied a patch, this allows code to build, but one the tests for the patched code (in libs/smart_ptr/test) fail. This is not one of the tests that were expected to fail when there are issues with concurrency. *) I've filed a bug in the boost issue tracker. patch: http://alexanderchuranov.com/boost-port/boost-1.41-sparc64/patch-boost_smart_ptr_detail_sp_counted_base_gcc_sparc.hpp test log: http://alexanderchuranov.com/boost-port/boost-1.41-sparc64/bjam-smart-ptr-test.log issue: https://svn.boost.org/trac/boost/ticket/3678 boost mail thread: http://old.nabble.com/-1.41.0--Beta-1-available-td26196304i20.html Currently I'm waiting for the boost team to provide us with further directions. Alexander Churanov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Alexander, good day. Wed, Nov 11, 2009 at 11:04:59PM +0300, Alexander Churanov wrote: It seems that I have found a workaround. It is to store the address of the variable in a register and then issue the CAS instruction, which only accepts register for an address. I am currently testing it. I hadn't seen the code you're testing, but it seems to me that the attached patch should automatically take care of making the address to be in some register (if it isn't already in the register). It compiles well, and even works as a stand-alone function, but I hadn't yet tested if boost built with such a atomic primitive really works fine. Have some $JOB to do prior to the testing. If you're storing the address in the register manually -- there is no need for it: you can use assembly constraints; this also makes less headache, because compiler decides what register should be allocated by its own and typically it is doing this job well. Anyway, I hadn't seen your patch, so may be you already doing this. -- Eygene ____ _.--. # \`.|\.....-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, /# while single-stepping the kernel. `-' `\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / #-- FreeBSD Developers handbook {_.-``-' {_/# --- boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp.orig 2009-03-02 11:22:16.0 -0500 +++ boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp 2009-11-12 09:51:25.0 -0500 @@ -30,10 +30,10 @@ inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ ) { -__asm__ __volatile__( cas %0, %2, %1 -: +m (*dest_), +r (swap_) -: r (compare_) -: memory ); +__asm__ __volatile__( casa [%3] 0x80, %2, %1 + : =m (*dest_), =r (swap_) + : r (compare_), r (dest_), 1 (swap_), m (*dest_) + : memory ); return swap_; } ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Eygene, Your solution is clearly more appropriate. I'll test it. Mine is attached. Alexander Churanov patch-boost_smart_ptr_detail_sp_counted_base_gcc_sparc.hpp Description: Binary data ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Folks, It seems that I have found a workaround. It is to store the address of the variable in a register and then issue the CAS instruction, which only accepts register for an address. I am currently testing it. Alexander Churanov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Sat, Nov 07, 2009 at 09:11:56PM -0500, Boris Kochergin wrote: As I know, currently devel/boost-libs port fails to build on sparc64. I had a discussion of this in September. The root cause is unknown for me. To investigate into this further I need either access to a sparc64 box or a person who has access and whom I may instruct with the actions to perform. From the preliminary investigations I done on the Boris's machine, it turns out that as(1) chokes on the cas instruction that looks like cas [%l0+12], %g2, %g1. The instruction itself looks sane, so I'll try to understand if as(1) has some bugs inside it or something isn't good with the instruction itself. -- Eygene ____ _.--. # \`.|\.....-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, /# while single-stepping the kernel. `-' `\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / #-- FreeBSD Developers handbook {_.-``-' {_/# ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Mon, Nov 09, 2009 at 04:12:01PM +0300, Eygene Ryabinkin wrote: Sat, Nov 07, 2009 at 09:11:56PM -0500, Boris Kochergin wrote: As I know, currently devel/boost-libs port fails to build on sparc64. I had a discussion of this in September. The root cause is unknown for me. To investigate into this further I need either access to a sparc64 box or a person who has access and whom I may instruct with the actions to perform. From the preliminary investigations I done on the Boris's machine, it turns out that as(1) chokes on the cas instruction that looks like cas [%l0+12], %g2, %g1. The instruction itself looks sane, so I'll try to understand if as(1) has some bugs inside it or something isn't good with the instruction itself. Hmm, looks like only memory address taken straight from the register is allowed for the Sparc. So, [%l0] will be good, but [%l0+12] -- won't. So it seems to me that g++ is generating improper assembly code. Will look into it a bit further. -- Eygene ____ _.--. # \`.|\.....-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, /# while single-stepping the kernel. `-' `\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / #-- FreeBSD Developers handbook {_.-``-' {_/# ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Folks, I've identified the root cause of the issue. Boost folks are using custom routine written in assembly language for SPARC. If the line 57 of boost/smart_ptr/detail/sp_counted_base.hpp is commented, the implementation switches to spin-locked and code compiles successfully. I will contact Boost developers in order to fix this in upstream. I'll also create a patch for devel/boost-libs port for using in the meanwhile. Alexander Churanov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Guys, Boost mailing list contains a record about using CAS instruction for shared_ptr. It is of 2004. I'll investigate into it further. It is necessary to understand why that library was working before 1.39. Alexander Churanov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
OK, Mark, no problems. Alexander Churanov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Boris, good day. Sat, Nov 07, 2009 at 09:11:56PM -0500, Boris Kochergin wrote: Alexander Churanov wrote: HI folks! As I know, currently devel/boost-libs port fails to build on sparc64. I had a discussion of this in September. The root cause is unknown for me. To investigate into this further I need either access to a sparc64 box or a person who has access and whom I may instruct with the actions to perform. Are there any plans to fix ports for sparc64 before the release? Sincerely, Alexander Churanov, maintainer of devel/boost-* ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org Ahoy. I can give you shell access to a reasonably-speedy sparc64 machine (4 x 300 MHz) running 8.0-BETA. I am willing to try. How to proceed? If you'll need my SSH key, it is in the attachment. -- Eygene ____ _.--. # \`.|\.....-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, /# while single-stepping the kernel. `-' `\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / #-- FreeBSD Developers handbook {_.-``-' {_/# ssh-rsa B3NzaC1yc2EBIwAAAgEAxC5Iw8CyS+dpx1VEVV59NCt/UTnO+VcYFnbs526OPjuLiAOSkBItSqlWE96Bpwi+vgUMpDYNW8nlaahVzotoQyjge/vL/o8hZ1fr+WdLGr4HTKWhiESe7qfsnNCmY56irx1a35DwMDiPgM948jkkz0HoK2flCAj5cU29mez2a23th5fJZXo4NCyb0jzewp0vqDRX6MW1Qmg/rBfUdFbu2v9VUmemK9Uxs6LBAYRkkfaugHw+LIj7WKBvaSfyBDu55ID6ve5L78Ai6YAKPF+WiILkFw5z/TCzuFLpL0JN7Im1YxJOmGHMfGrFrY2h7gSQAdtrQvDBG/A4wToMLqneqvOe1VYSPwO8+jEH9CwkybRy77USrxlZBbXHOJ/hPNa+HSEoTuJAwolSpItDZCAnoVr8v51yzFr1L238DLFId4y05tiU6ioJWGjGX+75iEcL2BHaNBpk6a1n+dx13c87HAKX2VCLFrhi1xD0IviD3WPGM+ELOC46wTvabXFhtXxzOhakdbcNZhQ830KmtRu0I2sO4yh7oTT85tcbKhQP6J2SNE0J7wIlo0VX2WdsPgPDeo4scnJWLFeQysC4CjbGj8eiiJt5yP7oOXLM075sRgt8xZZdQCTyniQf3gSWclPzeia0tqAMvnkc85zWfTlJWvGszzjAfmcPHIVRkURxkYE= r...@void.codelabs.ru ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Issues with devel/boost-* on Sparc64
HI folks! As I know, currently devel/boost-libs port fails to build on sparc64. I had a discussion of this in September. The root cause is unknown for me. To investigate into this further I need either access to a sparc64 box or a person who has access and whom I may instruct with the actions to perform. Are there any plans to fix ports for sparc64 before the release? Sincerely, Alexander Churanov, maintainer of devel/boost-* ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Issues with devel/boost-* on Sparc64
Alexander Churanov wrote: HI folks! As I know, currently devel/boost-libs port fails to build on sparc64. I had a discussion of this in September. The root cause is unknown for me. To investigate into this further I need either access to a sparc64 box or a person who has access and whom I may instruct with the actions to perform. Are there any plans to fix ports for sparc64 before the release? Sincerely, Alexander Churanov, maintainer of devel/boost-* ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org Ahoy. I can give you shell access to a reasonably-speedy sparc64 machine (4 x 300 MHz) running 8.0-BETA. -Boris ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org