On 2021-01-16, Michael Labbé <mla...@gmail.com> wrote:
> realpath() is failing to compile for me on MacOS 11.1 on an Apple M1 Mac.  I
> encountered this when building GNU Global Tags from the most recent source
> archive at global-6.6.5.tar.gz
> <http://tamacom.com/global/global-6.6.5.tar.gz>.
>
> This is due to an error because realpath cannot be found. The fix is to
> modify configure to include stdlib.h.
>
> Line 14291 of configure on global-6.6.5:
>
> main(){ (void)realpath("/./tmp", (void *)0); return 0; }
> Insert one line before that:
>
> #include<stdlib.h>
> main(){ (void)realpath("/./tmp", (void *)0); return 0; }
> configure now succeeds.
>
> The Brew folks and the Global Tags folks told me to report the bug here.

This code does not come from Autoconf, so I'm unsure why you were asked
to report it here.

The code comes from the global package itself (in their configure.ac file):

  AC_RUN_IFELSE([AC_LANG_SOURCE([[
  main(){ (void)realpath("/./tmp", (void *)0); return 0; }
  ]])],[ac_cv_posix1_2008_realpath=yes],
  [ac_cv_posix1_2008_realpath=no])

This is the where the problem needs to be corrected.

Cheers,
  Nick

Reply via email to