Opened 7 years ago

Closed 6 years ago

#994 closed defect (fixed)

LDFLAGS/LIBS confusion

Reported by: fdupont Owned by: jelte
Priority: low Milestone:
Component: build system Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 3.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

The main configure.ac confuses the correct usage of LDFLAGS and LIBS variables, for instance for botan (and log4cplus too) the result of 'botan-config --libs' is added incorrectly to LDFLAGS when it should be in LIBS. Usually it doesn't matter but if there is no libbotan.so but only a libbotan-1.8.2.so in the system library directory configure can fail to find it.

The fix is easy: put flags into FLAGS and libs into LIBS.

Subtickets

Change History (12)

comment:1 Changed 7 years ago by fdupont

oops, the issue is not with libbotan but liblog4cplus. Anyway to check this the side effect of the confusion is to make the GNU C++ linker (collect2 in fact) spuriously dependent on the order of its arguments (i.e., 'g++ ... foo.cpp ... -l1 -l2 ...' works but 'g++ ... -l1 -l2 ... foo.cpp' fails).

comment:2 Changed 6 years ago by shane

  • Milestone changed from New Tasks to Year 3 Task Backlog

comment:3 Changed 6 years ago by shane

  • Milestone changed from Year 3 Task Backlog to Next-Sprint-Proposed

comment:4 Changed 6 years ago by stephen

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

comment:5 Changed 6 years ago by stephen

  • Estimated Difficulty changed from 0.0 to 3

comment:6 follow-up: Changed 6 years ago by jreed

This ticket was automatically assigned to me. I don't yet see the problem with log4cplus.

Was there any error output you encountered?

comment:7 Changed 6 years ago by jreed

  • Owner changed from jreed to UnAssigned
  • Priority changed from blocker to minor
  • Status changed from new to assigned

comment:8 Changed 6 years ago by stephen

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

comment:9 in reply to: ↑ 6 Changed 6 years ago by fdupont

I was playing with 32 bit build on a 64 bit machine and this confused the system.

Anyway by principle LDFLAGS must be used for flags and LIBS for libraries, and
it is *not* the case when I tried, nor as far I can see today...

comment:10 Changed 6 years ago by jelte

And now we have run into more cases where it is a problem, see #1442. I propose we fix it as part of that ticket.

comment:11 Changed 6 years ago by shane

  • Owner changed from UnAssigned to jelte

Jelte, I see that #1442 has been resolved. Can we close this ticket too?

comment:12 Changed 6 years ago by jelte

  • Resolution set to fixed
  • Status changed from assigned to closed

It would appear so

Note: See TracTickets for help on using tickets.