To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=102510
                 Issue #|102510
                 Summary|sfx2: Linkage error on Get10ThSec() under debug=1
               Component|framework
                 Version|DEV300m48
                Platform|All
                     URL|
              OS/Version|Solaris
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|mba
             Reported by|tora





------- Additional comments from t...@openoffice.org Fri Jun  5 03:28:54 +0000 
2009 -------
Environment:
 OS: Solaris Express Community Edition snv_107 X86, Assembled 26 January 2009
 Compiler: CC: Sun C++ 5.9 SunOS_i386 Patch 124864-10 2009/02/03

Error messages:
===
$ cd $SRC_ROOT/sfx2
$ build.pl debug=1

Compiling: sfx2/source/bastyp/progress.cxx
/opt/SUNWspro/bin/CC   -c ... -g  
/.../DEV300_m48/sfx2/source/bastyp/progress.cxx 

...(omitted)...

Making: ../unxsoli4.pro/lib/libsfxsi.so
/opt/SUNWspro/bin/CC ...(omitted)... -o ../unxsoli4.pro/lib/libsfxsi.so ...
ld: fatal: symbol `unsigned long Get10ThSec()' is multiply-defined:
        (file ../unxsoli4.pro/slo/sfxbasecontroller.o type=FUNC; file
../unxsoli4.pro/slo/progress.o type=FUNC);
ld: fatal: file processing errors. No output written to
../unxsoli4.pro/lib/libsfxsi.so
dmake:  Error code 1, while making '../unxsoli4.pro/lib/libsfxsi.so'

ERROR: Error 65280 occurred while making /.../DEV300_m48/sfx2/util
rmdir /tmp/12374
===

Quick investigation:
===
$ nm -C unxsoli4.pro/slo/progress.o| grep Get10ThSec
[134]   |         0|        80|FUNC |GLOB |2    |77     |unsigned long 
Get10ThSec()
                                                       [__1cKGet10ThSec6F_L_]

Because of an option '-g' given, the inline function gets compiled as a real
function.

$ nm -C unxsoli4.pro/slo/sfxbasecontroller.o| grep Get10ThSec
[868]   |       608|        80|FUNC |GLOB |2    |578    |unsigned long 
Get10ThSec()
                                                       [__1cKGet10ThSec6F_L_]

A function which has the same name is also defined in another file.
===

DEV300_m48/sfx2/source/bastyp/progress.cxx
===
#if (_MSC_VER < 1300)
inline ULONG Get10ThSec()
{
#if defined (MSC) && defined (WIN)
        ULONG n10Ticks = 10 * (ULONG)GetTickCount();
#else
        ULONG n10Ticks = 10 * (ULONG)clock();
#endif

        return n10Ticks / CLOCKS_PER_SEC;
}
#else
extern ULONG Get10ThSec();
#endif
===

DEV300_m48/sfx2/source/view/sfxbasecontroller.cxx
===
sal_uInt32 Get10ThSec()
{
        sal_uInt32 n10Ticks = 10 * (sal_uInt32)clock();
        return n10Ticks / CLOCKS_PER_SEC;
}
===

Quick, but not clean, workaround:
===
DEV300_m48/sfx2/source/bastyp/progress.cxx
- #if (_MSC_VER < 1300)
+ #if (defined(_MSC_VER) && _MSC_VER < 1300)
===

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@framework.openoffice.org
For additional commands, e-mail: issues-h...@framework.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to