[asterisk-bugs] [JIRA] (ASTERISK-25586) uuid_generate_random detection failure

Alexander Traud (JIRA) noreply at issues.asterisk.org
Thu Mar 8 08:06:13 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Traud updated ASTERISK-25586:
---------------------------------------

    Attachment: uuid_configure.patch

The displayed output of the script {{./configure}} suggests that the final result for {{uuid_generate_random}} is 'no'. However, internally the script does something completely different: It checks three possible locations for 'uuid_generate_random'. Actually, the last output should be 'checking for uuid_generate_random *in -lsystem*... no'.

Consequently, the described issue is of cosmetic nature, still horrible confusing. As you pointed out, no reason exists to do all three checks, always. When one of the previous checks succeeded, the rest should be skipped. That approach was taken in the attached patch. As a side effect it avoids that confusing configure output and therefore fixes this issue here. Or?

> uuid_generate_random detection failure
> --------------------------------------
>
>                 Key: ASTERISK-25586
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25586
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/BuildSystem
>    Affects Versions: 13.6.0
>            Reporter: John Nemeth
>            Severity: Minor
>              Labels: patch
>         Attachments: uuid_configure.patch
>
>
> configure.ac has the following (checked gitweb and trunk has the same):
> # Find required UUID support.
> #  * -luuid on Linux
> #  * -le2fs-uuid on OpenBSD
> #  * in libsystem on OS X
> AST_EXT_LIB_CHECK([LIBUUID], [uuid], [uuid_generate_random], [uuid/uuid.h], [])
> AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h]
> , [])
> AC_CHECK_FUNCS([uuid_generate_random], [SYSUUID=true], [SYSUUID=""])
> On my system (NetBSD with libuuid package installed), the first test returns "yes", and the rest return "no":
> checking for uuid_generate_random in -luuid... yes
> checking uuid/uuid.h usability... yes
> checking uuid/uuid.h presence... yes
> checking for uuid/uuid.h... yes
> checking for uuid_generate_random in -le2fs-uuid... no
> checking for uuid_generate_random... no
> The problem is that the result of the later tests overwrite the results of the earlier test.  Thus the final answer is "no", even though it should be "yes".
> I have marked this bug as "minor" because the test result isn't actually used.  This could be considered to be a seperate bug, i.e. the result should be used, or the test should be eliminated.
> i386devel: {1266} grep -r HAVE_UUID_GENERATE_RANDOM *
> configure:#define HAVE_UUID_GENERATE_RANDOM 1
> include/asterisk/autoconfig.h.in:#undef HAVE_UUID_GENERATE_RANDOM
> include/asterisk/autoconfig.h:/* #undef HAVE_UUID_GENERATE_RANDOM */



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list