Apache OpenOffice (AOO) Bugzilla – Issue 14848
functions atomic_inc and atomic_dec not defined for sparc linux
Last modified: 2013-08-07 15:35:14 UTC
Building sc/source/filter/html on sparc64 linux debian testing gcc-3.3 Fails due to function atomic_dec not defined. Error messsages are attached. Functions are defined atomic_inc and atomic_dec for X86, POWERPC and S390 in file solver/644/unxlngs.pro/inc/external/boost/detail/linux_atomic.h Maybe this relates to issue 13400?
Created attachment 6391 [details] Error messages atomic_inc function not defined
Created attachment 6395 [details] linux atomic patch
The attacahed patch was made by copying code from my /usr/inc/asm-sparc/atomic.h. so at least the build did then proceed but i doubt this is a complete solution, maybe related, (?) the next thing is: /usr/bin/ld: ../unxlngs.pro/slo/xmlwrap.o(.text+0x53b8): unresolvable relocation against symbol `cppu::WeakImplHelper1<com::sun::star::io::XOutputStream>::s_cd' dmake: Error code 1, while making '../unxlngs.pro/lib/libsc644ls.so' ---* TG_SLO.MK *--- ERROR: Error 65280 occurred while making /home/jim/oo_1.1beta2_src/sc/util
reassigned
atomic_dec should be int, not void (this is different from the original in use/inc/asm-sparc/atomic.h)?? +#define atomic_inc(v) (__atomic_add(1, (v))) +#define atomic_dec(v) (__atomic_sub(1, (v))) -#define atomic_inc(v) ((void)__atomic_add(1, (v))) -#define atomic_dec(v) ((void)__atomic_sub(1, (v)))
Hi, Your patch looks fine. I approve it. Do you have commit access to the tree or do you want me to commit it? Thanks, Kevin
I do not have commit access, please do it, thanks (note comment above which amends the patch)
i am building 11beta2 sparc64 linux gcc-3.3 i applied the patch here: solver/644/unxlngs.pro/inc/external/boost/detail/linux_atomic.h But i suspect that file came from here, but i do not know how it gets here: boost/unxlngs.pro/misc/build/boost_1_27_0/boost/detail/linux_atomic.h the suggested patch is attached. this patch removes the atomic_dec error. I think the patch defines atomic_dec as int, but it is void in the /usr/local/asm-sparc/atomic.h ?(also attached) there are different errors nearby building sc. i do not know if these are related. cppu builds OK. connectivity/mozab was bypassed as it has errors but connectivity did build OK.everything else did build until sc/util. the full errors are attached. briefly, /usr/bin/ld: ../unxlngs.pro/slo/xmlwrap.o(.text+0x53b8): unresolvable relocation against symbol `cppu::WeakImplHelper1<com::sun::star::io::XOutputStream>::s_cd'
Created attachment 6437 [details] linux_atomic.h.patch
Created attachment 6438 [details] /usr/include/asm-sparc/atomic.h
Created attachment 6439 [details] errors buidling sc
id 6439 errors (sc) also found when building module dbaccess. both modules sc and dbaccess depend on module boost.
in linux_atomic.h i did #include< asm-sparc/atomic.h> perhaps this should be handled in config_office ?
HR: need implement atomic increment/decrement functions for boost in a more platform independent way. Reopened and retageted to OOo 2.0
*** Issue 15502 has been marked as a duplicate of this issue. ***
the linux sparc patch for linux_atomic.h is not good, it needs be removed. the patch does not work because it trys to call more assembler functions which are not available. i am sorry this is a bit of a mess, it probably does not affect anyone else but it would look much better if the sparc portion could be removed from the linux_atomic.h section of the boost patch. this now affects both 645 and 680. i dont have any access rights to fix this myself.
Created attachment 11302 [details] bypass linix_atomoc for linux sparc
The attached patch is needed to prevent using linux_atomic for linux sparc until this issue is fixed.
Here is a better patch to the boost patch, it backs out the previous linux sparc asm code and inserts the bypass of linux_atomic.h. This has been made on the latest boost patch in SRC680_m16. Please use only this latest patch for linux sparc. Notice the end result is platform specific but any errors in the patching process potentially affects all platforms.
Created attachment 11643 [details] patch -p0 < boost.diff from inside boost module
Committed to cws_src680_ooo20031216. Patch has problem waiting on revised patch.
HR: need implement atomic increment/decrement functions for boost in a more platform independent way. Reopened and retageted to OOo 2.0 (the latest patch for linux sparc does not fix this issue, it is just a workaround)
sparcmoz-->hr: this was re-opened and target to 2.0 by yourself, now i am doing my spring cleaning for 2.0. At present the linux-sparc build bypassed this issue and avoid using linux atomic, i am not sure the consequences. you wrote above: ------- Additional comments from hr Fri Jun 27 04:35:45 -0800 2003 ------- HR: need implement atomic increment/decrement functions for boost in a more platform independent way. Reopened and retageted to OOo 2.0 Certainly this is beyond my ability so i am just like a robot to issue a reminder here. I notice the boost version is getting old too...your advice would be appreciated please.
sparcmoz-->waratah: I am asking since you helped previously with this patch for 680. This patch is already applied in 680_20040225 but I would like it to be in 645 also, can you approve please then I will commit when next a 645 branch opens for porting. The effect of this patch is to remove some unworkable linux_atomic code from the boost patch and prevent linux_atomic being called from atomic_count for sparc linux, originally provided by KH.
Created attachment 13664 [details] patch for 645
Created attachment 13665 [details] needed for 645 patch
To late for OOo-1.1.1. We'll take in for OOo-1.1.2
The two patches attached dated 9 March 2004 have been committed to cws_srx645_ooo112fix1. These patches delete the unused linux sparc code from the boost patch and bypass linux atomic as it is not implemented for linux sparc. Similar patch already in 680.
Created attachment 14456 [details] committed corrections to boost patch patch
set target milestone OOo-later, agreed by JJ
sparc linux builds in 680_m65 with no patches to boost so i will clsoe this issue and see what happens later...
closed