clang:错误:没有这样的文件或目录:'_REENTRANT'

clang:错误:没有这样的文件或目录:'_REENTRANT'

我正在尝试安装UDUNITS-2图形可视化浏览器的包:视窗

有人能帮助我理解以下错误信息吗:

clang: error: no such file or directory: '_REENTRANT'

这里有一个类似的问题 --->Xcode 7.2-clang:错误:没有这样的文件或目录:

我的./configure输出:

brendan-darrer:Downloads brendandarrer$ cd src/
brendan-darrer:src brendandarrer$ ls
COPYRIGHT   INSTALL     NOTEBOOK    README      VERSION     admin       configure.in    perl        udunits
CUSTOMIZE   Makefile.in ORIGIN      RELEASE_NOTES   aclocal.m4  configure   lib     port
brendan-darrer:src brendandarrer$ ./configure
creating cache ./config.cache
configure: warning: reading configuration customizations
checking type of operating system... darwin
checking for c89... c89
checking for dependency generation mechanism... c89 -M
checking how to run the C preprocessor... c89 -E
checking the C preprocessor... works
checking for C const... yes
checking for C volatile... yes
checking for C signed... yes
checking for C function prototypes... yes
checking for standard C variadic functions... yes
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking for standard C string generation... yes
checking for standard C token pasting... yes
checking C void pointer... yes
checking type of machine... x86_64
checking for ar... ar
checking for tar flags... -chof
checking for ranlib... ranlib
checking binary distribution directory... /home/ftp/pub/binary/x86_64-darwin
checking the installation prefix... /Users/brendandarrer/Downloads
checking the installation exec-prefix... /Users/brendandarrer/Downloads/bin
checking for neqn... neqn
checking for tbl... tbl
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <stddef.h> for typedef size_t... declared
checking for ar... (cached) ar
checking for float.h... yes
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <stdlib.h> for typedef size_t... declared
checking for atexit... yes
checking C header file <stdlib.h> for function atexit()... declared
checking for getenv... yes
checking C header file <stdlib.h> for function getenv()... declared
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <string.h> for typedef size_t... declared
checking for strerror... yes
checking C header file <string.h> for function strerror()... declared
checking for strstr... yes
checking C header file <string.h> for function strstr()... declared
checking for memmove... yes
checking C header file <string.h> for function memmove()... declared
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c89: illegal option -- M
usage: c89 [-cEgs] [-D name[=value]] [-I directory] ... [-L directory] ...
       [-o outfile] [-O optlevel] [-U name]... operand ...
checking C header file <time.h> for typedef time_t... declared
checking C header file <time.h> for typedef size_t... declared
checking for difftime... yes
checking C header file <time.h> for function difftime()... declared
checking for strftime... yes
checking C header file <time.h> for function strftime()... declared
checking for perl... perl
checking for type of perl executable to create... dynamic
checking for position-independent compilation flags... ''
updating cache ./config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating udunits/Makefile
creating perl/Makefile.PL
creating port/master.mk
creating port/Makefile
creating port/misc/Makefile
creating port/fortc/Makefile
creating port/misc/udposix.h
creating port/misc/stdarg.h
creating port/misc/stddef.h
creating port/misc/stdlib.h
creating port/misc/string.h
creating port/misc/time.h
expanding `include's in file `Makefile'
expanding `include's in file `lib/Makefile'
expanding `include's in file `udunits/Makefile'
expanding `include's in file `perl/Makefile.PL'
expanding `include's in file `port/master.mk'
expanding `include's in file `port/Makefile'
expanding `include's in file `port/misc/Makefile'
expanding `include's in file `port/fortc/Makefile'
brendan-darrer:src brendandarrer$ make
Makefile:279: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:276: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:384: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:381: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:418: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:415: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:448: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:445: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:503: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:491: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:541: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:538: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'

making `all' in directory /Users/brendandarrer/Downloads/src/port

Makefile:263: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:260: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:368: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:365: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:402: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:399: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:432: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:429: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:487: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:475: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:525: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:522: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'
Makefile:263: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:260: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:368: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:365: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:402: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:399: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:432: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:429: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:487: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:475: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:525: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:522: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'

making `all' in directory /Users/brendandarrer/Downloads/src/port/misc

Makefile:285: warning: overriding commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:282: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/lib'
Makefile:390: warning: overriding commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:387: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/bin'
Makefile:424: warning: overriding commands for target `/Users/brendandarrer/Downloads/include'
Makefile:421: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/include'
Makefile:454: warning: overriding commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:451: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/etc'
Makefile:509: warning: overriding commands for target `/Users/brendandarrer/Downloads/man'
Makefile:497: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/man'
Makefile:547: warning: overriding commands for target `/Users/brendandarrer/Downloads/info'
Makefile:544: warning: ignoring old commands for target `/Users/brendandarrer/Downloads/info'
c89 -c -g -I.  -D_REENTRANT  uddummy.c
clang: error: no such file or directory: '_REENTRANT'
make[3]: *** [uddummy.o] Error 1
make[2]: *** [misc/all] Error 1
make[1]: *** [subdirs/all] Error 2
make: *** [port/all] Error 1
brendan-darrer:src brendandarrer$ 

答案1

通过执行以下代码解决了该问题:

brew install -s ncview

使用homebrew,为 Apple Mac 自动安装整个ncview软件包,包括它的依赖项。

看: katbormann 于 2016 年 7 月 13 日发表评论在 GitHub 帖子上。

相关内容