Bug 9890 - Reverse the order of adding paths to CPPPATH and LIBPATH in check()
Reverse the order of adding paths to CPPPATH and LIBPATH in check()
Status: NEW
Product: Samba 4.0
Classification: Unclassified
Component: Build
4.0.5
All All
: P5 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 13:11 UTC by Vadim Zhukov
Modified: 2013-05-17 08:50 UTC (History)
0 users

See Also:


Attachments
Patch to fix issue (733 bytes, patch)
2013-05-16 13:12 UTC, Vadim Zhukov
no flags Details
Patch to fix issue via git format-patch (1.11 KB, patch)
2013-05-17 08:50 UTC, Vadim Zhukov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Zhukov 2013-05-16 13:11:51 UTC
When processing configure time checks, there is a Samba-specific hook activated for each check being made. This hooks looks into CPPPATH and LIBPATH, and, if the default path supplied by configure option does not present there, adds those to respective lists in those variables. I do not know, why, but new paths are prepended to this list instead of being appended to it. As a result, the results of previous configure checks are not reliable anymore, because they were made in a different environment, not looking at the directories added later. This could (and break) some setups, especially on *BSD, when base system and additional packages install headers and/or libraries with the same name.

The patch below reverses the order of paths being appended. I suspect this could be wrong, because this seems an obvious decision for initial implementation, but there are no comments in the code describing the reasons to do this either way.
Comment 1 Vadim Zhukov 2013-05-16 13:12:24 UTC
Created attachment 8892 [details]
Patch to fix issue
Comment 2 Vadim Zhukov 2013-05-17 08:50:07 UTC
Created attachment 8901 [details]
Patch to fix issue via git format-patch