Summary: | sys-devel/llvm: fails to build on a uclibc system | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Anthony Basile <blueness> |
Component: | [OLD] Core system | Assignee: | Michał Górny <mgorny> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | CC: | alex, flameeyes, herrtimson, ryao |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=547848 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963, 570544 |
Description
Anthony Basile
![]() Here's an analysis of the problem using llvm-3.2_rc2. This comes with llvm.src/autoconf/m4/ltdl.m4 with versioning # serial 7 AC_LIB_LTDL Note that the most current version shipping with libtools is # serial 18 LTDL_INIT The older ltdl.m4 (but not the newer one) defines # AC_LTDL_FUNC_ARGZ # ----------------- AC_DEFUN([AC_LTDL_FUNC_ARGZ], [AC_CHECK_HEADERS([argz.h]) AC_CHECK_TYPES([error_t], [], [AC_DEFINE([error_t], [int], [Define to a type to use for `error_t' if it is not otherwise available.])], [#if HAVE_ARGZ_H # include <argz.h> #endif]) AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) ])# AC_LTDL_FUNC_ARGZ which assumes that error_t is provided by argz.h which is not present on a uclibc system. There error_t is provided by errno.h when #define _GNU_SOURCE. So the suggested fix is (thanks for the help Diego!) # AC_LTDL_FUNC_ARGZ # ----------------- AC_DEFUN([AC_LTDL_FUNC_ARGZ], [AC_CHECK_HEADERS([argz.h errno.h]) AC_CHECK_TYPES([error_t], [], [AC_DEFINE([error_t], [int], [Define to a type to use for `error_t' if it is not otherwise available.])], [#if HAVE_ARGZ_H # include <argz.h> #endif #if HAVE_ERRNO_H # define _GNU_SOURCE # include <errno.h> #endif]) AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) ])# AC_LTDL_FUNC_ARGZ and then pushed through their build system. However, llvm should probably seriously consider updating their build system, as even "pushing this through" requires ancient autotools. @Diego, notice I had to #define _GNU_SOURCE in the includes for AC_CHECK_TYPES. Is that okay? I'm sorry but this one is ancient and I don't have any uclibc around to play with. If you have issues with the current versions, please let me know -- but you'll probably need a patch ;-). |