Project

General

Profile

Actions

Bug #5353

open

nightly with studio as primary compiler fails because of clog

Added by Josef Sipek over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2014-11-16
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

A full nightly with studio as the primary compiler fails because of a linker related issue. Full warning from nightly.log:

ld: warning: symbol 'clog' has differing types:
        (file /opt/SUNWspro/lib/CC4/libC.so type=OBJT; file /storage/intel-asm-studio/proto/root_i386-nd/l
ib/libm.so type=FUNC);
        /opt/SUNWspro/lib/CC4/libC.so definition taken

From Rich Lowe:

The reason this happens is thus:

libm.so.2 contains the symbol clog ("complex log").
The old C++ standard, or maybe not even standard, provides the
symbol 'clog' (iirc, it's an IO stream, cin, cout, cerr, clog).

So, C++ in the "old" mode links to libm.so.1, rather than libm.so.2.

It does this via appending L/opt/SUNWspro/lib/CC4 to the command
line, implicitly. This directory contains a compilation symlink for
libm.so
>/lib/libm.so.1 (as does .../CCios). This doesn't work in the
ON build environment, because it is an append, and our -L$(ROOT)/lib
wins, and thus finds libm.so.2 (duh).

It'd seem like the fix is thus to get a similar -L in first, except
that'd leave us linking with the system libm.so.1! So we'll end up
needing to create a similar directory with the compilation link to
the wrong libm.so in the proto area, and get that in first.

It turns out that CC -compat=4 is deprecated (and I think got removed,
from newer studio), and it's not 100% clear from CC what
it does in total, and thus whether we need it. It might just be
something to remove our use of, and thus use the newer libm and avoid
all this badness. I haven't really investigated that part, beyond
finding out it was deprecated while trying to work out what
it implied.

No data to display

Actions

Also available in: Atom PDF