Opened 11 years ago
Closed 11 years ago
#626 closed defect (fixed)
Detection of uuid_unparse_lower in #368 is broken
Reported by: | Dagobert Michelsen | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.16 |
Component: | Build system | Version: | 1.3.1 |
Severity: | major | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Solaris |
Description
The detection of uuid_unparse_lower
in r12704 is broken, as the values of found
are true
and false
and the simple if
just checks if it is empty or not. This results in the test to always succeed and e.g. fail on Solaris which doesn't have uuid_unparse_lower
. The attached patch fixes the issue.
Attachments (2)
Change History (10)
by , 11 years ago
Attachment: | 0001-Check-for-explicit-value-or-HAVE_UUID_UNPARSE_LOWER-.patch added |
---|
comment:1 by , 11 years ago
Hmm, I don't think I intended to write it that way, and it's worth changing I think, but it looks to me like it actually works currently, since if X
runs command X and looks at its return code. Does that not work on Solaris for some reason?
$ for x in true false ; do echo "x=$x" ; if $x ; then echo yes ; fi ; done x=true yes x=false
I'm wondering if the problem you're hitting is actually something else.
comment:2 by , 11 years ago
Of course you are right, please discard my patch. The problem is as follows: the system has /usr/include/uuid/uuid.h without uuid_unparse_lower
and we have an additional /opt/csw/include/uuid/uuid.h with uuid_unparse_lower
which is detected. However, in the linking phase the -luuid
is too early hence the /usr/lib/libuuid.so
is pulled in missing the function resulting in the linkage error:
/bin/bash ./libtool --tag=CXX --mode=link /opt/SUNWspro/bin/CC -library=stlport4 -features=tmplife -xO3 -m32 -xarch=sparc -lm -lz -lm -luuid -lm -lnsl ...
Maybe the exact location of libuuid.so could be specified during configure-time?
comment:4 by , 11 years ago
Sure, just drop me a note if you need anything else. For now I worked around the issue by adding /opt/csw/lib to CXXFLAGS being before -luuid.
comment:5 by , 11 years ago
Component: | Other → Build system |
---|---|
Milestone: | → 1.3.2 |
Severity: | blocker → major |
So what's happening is that -luuid
gets added to XAPIAN_LDFLAGS
in configure, which ends up on the link line before $LDFLAGS
from the environment. The problem is that -l
options don't belong in *LDFLAGS
, though I'm not sure how easy this case is going to be to untangle. Still, we should try before 1.3.2.
comment:6 by , 11 years ago
Milestone: | 1.3.2 → 1.2.16 |
---|
Fixed in trunk r17578. We should probably backport this to 1.2, but it would be good to get confirmation that this definitely fixes the build for you.
comment:7 by , 11 years ago
And I've simplified the test for uuid_unparse_lower()
to avoid if $found
in r17579.
comment:8 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fix detection of uuid_unparse_lower