Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1006 closed defect (fixed)

loader error for sunstudio build

Reported by: jinmei Owned by: jreed
Priority: medium Milestone:
Component: build system Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: High
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 3.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


I figured out the root cause of the run time failure for the sunstudio

This is because "-pthreads" was passed to the linker when it builds a
program that uses liblog4cplus. '-p xxx' has a different meaning for
the Solaris (SunStudio??) linker, which is why we saw "threads" in a
strange ELF section of the resulting binary.

This flag actually comes from the inherited_linker_flags variable set
in ~jreed/opt/log4cplus-1.0.4-sunstudio/lib/, and,
it then turned out to come from the configure script of
log4cplus. More precisely, it's because log4cplus/m4/ax_pthread.m4
sets PTHREAD_CFLAGS to this value unconditionally for Solaris, even if
-pthreads isn't meaningful for SunStudio? (actually it's even harmful
as we saw).

A workaround is to rebuild log4cplus with setting PTHREAD_CFLAGS to
something non null (but that doesn't break the build).

% ./configure PTHREAD_CFLAGS=" " CXX=/usr/bin/CC

worked for me.

We should also note this trap somewhere in our release notes.

For a longer term we should probably report this to the log4cplus


Change History (6)

comment:1 Changed 9 years ago by jreed

Okay I reinstalled the log4cplus-1.0.4 with this advice. The build works with that. (I now saw an unrelated issue which I will fix).

comment:2 Changed 9 years ago by stephen

  • Milestone changed from Next-Sprint-Proposed to Sprint-20110712

comment:3 Changed 9 years ago by stephen

  • Estimated Difficulty changed from 0.0 to 3

comment:4 Changed 9 years ago by jinmei

Why is this still open?

comment:5 Changed 9 years ago by stephen

  • Milestone Sprint-20110712 deleted
  • Resolution set to fixed
  • Status changed from new to closed

This ticket agreed closed at 2011-07-12 sprint planning meeting. Although put in Sprint-20110712, it was not fixed there, so has been removed from the milestone for that sprint.

comment:6 Changed 9 years ago by jreed

I created an upstream ticket for this based on the description.

Note: See TracTickets for help on using tickets.