Issue 14848 - functions atomic_inc and atomic_dec not defined for sparc linux
Summary: functions atomic_inc and atomic_dec not defined for sparc linux
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: Other Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: jens-heiner.rechtien
QA Contact: issues@tools
URL:
Keywords:
: 15502 (view as issue list)
Depends on: 15502
Blocks: 33270
  Show dependency tree
 
Reported: 2003-05-25 02:24 UTC by sparcmoz
Modified: 2013-08-07 15:35 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Error messages atomic_inc function not defined (11.95 KB, text/plain)
2003-05-25 02:25 UTC, sparcmoz
no flags Details
linux atomic patch (1.64 KB, patch)
2003-05-25 08:32 UTC, sparcmoz
no flags Details | Diff
linux_atomic.h.patch (1.96 KB, patch)
2003-05-26 15:06 UTC, sparcmoz
no flags Details | Diff
/usr/include/asm-sparc/atomic.h (2.76 KB, text/plain)
2003-05-26 15:07 UTC, sparcmoz
no flags Details
errors buidling sc (21.12 KB, text/plain)
2003-05-26 15:08 UTC, sparcmoz
no flags Details
bypass linix_atomoc for linux sparc (882 bytes, patch)
2003-11-16 08:06 UTC, sparcmoz
no flags Details | Diff
patch -p0 < boost.diff from inside boost module (2.86 KB, patch)
2003-11-30 10:49 UTC, sparcmoz
no flags Details | Diff
patch for 645 (3.30 KB, patch)
2004-03-09 09:59 UTC, sparcmoz
no flags Details | Diff
needed for 645 patch (435 bytes, patch)
2004-03-09 10:03 UTC, sparcmoz
no flags Details | Diff
committed corrections to boost patch patch (841 bytes, patch)
2004-04-10 13:53 UTC, sparcmoz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2003-05-25 02:24:26 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?
Comment 1 sparcmoz 2003-05-25 02:25:41 UTC
Created attachment 6391 [details]
Error messages atomic_inc function not defined
Comment 2 sparcmoz 2003-05-25 08:32:39 UTC
Created attachment 6395 [details]
linux atomic patch
Comment 3 sparcmoz 2003-05-25 08:36:30 UTC
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
Comment 4 Martin Hollmichel 2003-05-25 09:48:57 UTC
reassigned
Comment 5 sparcmoz 2003-05-25 14:00:52 UTC
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)))
Comment 6 khendricks 2003-05-25 23:16:12 UTC
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 
 
Comment 7 sparcmoz 2003-05-26 00:17:10 UTC
I do not have commit access, please do it, thanks (note comment above 
which amends the patch)
Comment 8 sparcmoz 2003-05-26 15:04:57 UTC
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'

Comment 9 sparcmoz 2003-05-26 15:06:26 UTC
Created attachment 6437 [details]
linux_atomic.h.patch
Comment 10 sparcmoz 2003-05-26 15:07:28 UTC
Created attachment 6438 [details]
/usr/include/asm-sparc/atomic.h
Comment 11 sparcmoz 2003-05-26 15:08:52 UTC
Created attachment 6439 [details]
errors buidling sc
Comment 12 sparcmoz 2003-05-30 01:26:18 UTC
id 6439 errors (sc) also found when building module dbaccess. both 
modules sc and dbaccess depend on module boost.
Comment 13 sparcmoz 2003-05-30 09:26:23 UTC
in linux_atomic.h i did 
#include< asm-sparc/atomic.h>
perhaps this should be handled in config_office ?
Comment 14 jens-heiner.rechtien 2003-06-27 13:35:45 UTC
HR: need implement atomic increment/decrement functions for boost in a
more platform independent way. Reopened and retageted to OOo 2.0
Comment 15 sparcmoz 2003-10-21 13:53:12 UTC
*** Issue 15502 has been marked as a duplicate of this issue. ***
Comment 16 sparcmoz 2003-11-14 09:39:08 UTC
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.
Comment 17 sparcmoz 2003-11-16 08:06:02 UTC
Created attachment 11302 [details]
bypass linix_atomoc for linux sparc
Comment 18 sparcmoz 2003-11-16 08:07:34 UTC
The attached patch is needed to prevent using linux_atomic for linux
sparc until this issue is fixed.
Comment 19 sparcmoz 2003-11-30 10:47:32 UTC
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.

Comment 20 sparcmoz 2003-11-30 10:49:18 UTC
Created attachment 11643 [details]
patch -p0 < boost.diff from inside boost module
Comment 21 foskey 2003-12-17 12:20:28 UTC
Committed to cws_src680_ooo20031216.   Patch has problem waiting on revised patch.
Comment 22 sparcmoz 2003-12-17 21:40:36 UTC
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)
Comment 23 sparcmoz 2004-03-09 07:01:31 UTC
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.

Comment 24 sparcmoz 2004-03-09 09:58:18 UTC
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.
 
Comment 25 sparcmoz 2004-03-09 09:59:56 UTC
Created attachment 13664 [details]
patch for 645
Comment 26 sparcmoz 2004-03-09 10:03:59 UTC
Created attachment 13665 [details]
needed for 645 patch
Comment 27 jens-heiner.rechtien 2004-03-09 16:43:43 UTC
To late for OOo-1.1.1. We'll take in for OOo-1.1.2
Comment 28 sparcmoz 2004-04-09 05:36:14 UTC
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.
Comment 29 sparcmoz 2004-04-10 13:53:02 UTC
Created attachment 14456 [details]
committed corrections to boost patch patch
Comment 30 hans_werner67 2004-08-09 08:35:05 UTC
set target milestone OOo-later, agreed by JJ
Comment 31 sparcmoz 2004-12-18 06:35:54 UTC
sparc linux builds in 680_m65 with no patches to boost so i will clsoe this
issue and see what happens later...
Comment 32 sparcmoz 2004-12-18 06:36:24 UTC
closed