我正在尝试安装特定版本的libxml2
。
我使用brew search libxml2
,但似乎只有一个结果可用。
Brew正在安装libxml2-2.9.4
但需要libxml2-2.9.0
版本,因此我尝试按source安装,并按照其中的说明进行操作,
但我得到了一些例外:
onfig.status: executing libtool commands
rm: libtoolT: No such file or directory
Done configuring
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in include
Making all in libxml
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in .
CC SAX.lo
CC entities.lo
CC encoding.lo
encoding.c:491:26: warning: cast from 'const unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align]
unsigned short* in = (unsigned short*) inb;
^~~~~~~~~~~~~~~~~~~~~
encoding.c:573:27: warning: cast from 'unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align]
unsigned short* out = (unsigned short*) outb;
^~~~~~~~~~~~~~~~~~~~~~
encoding.c:729:26: warning: cast from 'const unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align]
unsigned short* in = (unsigned short*) inb;
^~~~~~~~~~~~~~~~~~~~~
encoding.c:815:27: warning: cast from 'unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align]
unsigned short* out = (unsigned short*) outb;
^~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
CC error.lo
CC parserInternals.lo
CC parser.lo
parser.c:13492:43: warning: passing 'const xmlChar *' (aka 'const unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different
sign [-Wpointer-sign]
hdlr = xmlFindCharEncodingHandler(doc->encoding);
^~~~~~~~~~~~~
./include/libxml/encoding.h:175:42: note: passing argument to parameter 'name' here
xmlFindCharEncodingHandler (const char *name);
^
1 warning generated.
CC tree.lo
CC hash.lo
CC list.lo
CC xmlIO.lo
CC xmlmemory.lo
xmlmemory.c:328:9: warning: cast from 'char *' to 'MEMHDR *' (aka 'struct memnod *') increases required alignment from 1 to 8 [-Wcast-align]
p = CLIENT_2_HDR(ptr);
^~~~~~~~~~~~~~~~~
xmlmemory.c:113:26: note: expanded from macro 'CLIENT_2_HDR'
#define CLIENT_2_HDR(a) ((MEMHDR *) (((char *) (a)) - RESERVE_SIZE))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xmlmemory.c:434:9: warning: cast from 'char *' to 'MEMHDR *' (aka 'struct memnod *') increases required alignment from 1 to 8 [-Wcast-align]
p = CLIENT_2_HDR(ptr);
^~~~~~~~~~~~~~~~~
xmlmemory.c:113:26: note: expanded from macro 'CLIENT_2_HDR'
#define CLIENT_2_HDR(a) ((MEMHDR *) (((char *) (a)) - RESERVE_SIZE))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
CC uri.lo
CC valid.lo
CC xlink.lo
CC HTMLparser.lo
CC HTMLtree.lo
CC debugXML.lo
debugXML.c:2950:11: warning: comparison of array 'arg' equal to a null pointer is always false [-Wtautological-pointer-compare]
if ((arg == NULL) || (arg[0] == 0))
^~~ ~~~~
1 warning generated.
CC xpath.lo
xpath.c:4870:73: warning: passing 'xmlXPathFunction' (aka 'void (*)(struct _xmlXPathParserContext *, int)') to parameter of type 'void *' converts between void pointer and function
pointer [-Wpedantic]
return(xmlHashAddEntry2(ctxt->funcHash, name, ns_uri, XML_CAST_FPTR(f)));
^
./include/libxml/hash.h:56:29: note: expanded from macro 'XML_CAST_FPTR'
#define XML_CAST_FPTR(fptr) fptr
^~~~
./include/libxml/hash.h:131:34: note: passing argument to parameter 'userdata' here
void *userdata);
^
xpath.c:4951:24: warning: assigning to 'xmlXPathFunction' (aka 'void (*)(struct _xmlXPathParserContext *, int)') from 'void *' converts between void pointer and function pointer
[-Wpedantic]
XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt->funcHash, name, ns_uri);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpath.c:12402:13: warning: comparison of constant 'XML_NAMESPACE_DECL' (18) with expression of type 'xmlXPathTypeVal' is always false [-Wtautological-constant-out-of-range-compare]
if (type == XML_NAMESPACE_DECL)
~~~~ ^ ~~~~~~~~~~~~~~~~~~
xpath.c:13535:41: warning: assigning to 'xmlXPathFunction' (aka 'void (*)(struct _xmlXPathParserContext *, int)') from 'void *' converts between void pointer and function pointer
[-Wpedantic]
XML_CAST_FPTR(func) = op->cache;
^ ~~~~~~~~~
xpath.c:13562:31: warning: assigning to 'void *' from 'xmlXPathFunction' (aka 'void (*)(struct _xmlXPathParserContext *, int)') converts between void pointer and function pointer
[-Wpedantic]
op->cache = XML_CAST_FPTR(func);
^ ~~~~
In file included from xpath.c:185:
./trionan.c:194:1: warning: unused function 'trio_is_special_quantity' [-Wunused-function]
trio_is_special_quantity
^
./trionan.c:218:1: warning: unused function 'trio_is_negative' [-Wunused-function]
trio_is_negative
^
7 warnings generated.
CC xpointer.lo
CC xinclude.lo
CC nanohttp.lo
nanohttp.c:1526:38: warning: while loop has empty body [-Wempty-body]
while ( xmlNanoHTTPRecv(ctxt) > 0 ) ;
^
nanohttp.c:1526:38: note: put the semicolon on a separate line to silence this warning
1 warning generated.
CC nanoftp.lo
CC catalog.lo
CC globals.lo
CC threads.lo
threads.c:442:9: warning: comparison of function 'pthread_mutex_lock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (pthread_mutex_lock != NULL)
^~~~~~~~~~~~~~~~~~ ~~~~
threads.c:442:9: note: prefix with the address-of operator to silence this warning
if (pthread_mutex_lock != NULL)
^
&
threads.c:512:9: warning: comparison of function 'pthread_mutex_unlock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (pthread_mutex_unlock != NULL)
^~~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:512:9: note: prefix with the address-of operator to silence this warning
if (pthread_mutex_unlock != NULL)
^
&
threads.c:866:14: warning: comparison of function 'pthread_once' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if ((pthread_once != NULL) &&
^~~~~~~~~~~~ ~~~~
threads.c:866:14: note: prefix with the address-of operator to silence this warning
if ((pthread_once != NULL) &&
^
&
threads.c:867:14: warning: comparison of function 'pthread_getspecific' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_getspecific != NULL) &&
^~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:867:14: note: prefix with the address-of operator to silence this warning
(pthread_getspecific != NULL) &&
^
&
threads.c:868:14: warning: comparison of function 'pthread_setspecific' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_setspecific != NULL) &&
^~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:868:14: note: prefix with the address-of operator to silence this warning
(pthread_setspecific != NULL) &&
^
&
threads.c:869:14: warning: comparison of function 'pthread_key_create' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_key_create != NULL) &&
^~~~~~~~~~~~~~~~~~ ~~~~
threads.c:869:14: note: prefix with the address-of operator to silence this warning
(pthread_key_create != NULL) &&
^
&
threads.c:870:14: warning: comparison of function 'pthread_key_delete' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_key_delete != NULL) &&
^~~~~~~~~~~~~~~~~~ ~~~~
threads.c:870:14: note: prefix with the address-of operator to silence this warning
(pthread_key_delete != NULL) &&
^
&
threads.c:871:14: warning: comparison of function 'pthread_mutex_init' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_mutex_init != NULL) &&
^~~~~~~~~~~~~~~~~~ ~~~~
threads.c:871:14: note: prefix with the address-of operator to silence this warning
(pthread_mutex_init != NULL) &&
^
&
threads.c:872:14: warning: comparison of function 'pthread_mutex_destroy' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_mutex_destroy != NULL) &&
^~~~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:872:14: note: prefix with the address-of operator to silence this warning
(pthread_mutex_destroy != NULL) &&
^
&
threads.c:873:14: warning: comparison of function 'pthread_mutex_lock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_mutex_lock != NULL) &&
^~~~~~~~~~~~~~~~~~ ~~~~
threads.c:873:14: note: prefix with the address-of operator to silence this warning
(pthread_mutex_lock != NULL) &&
^
&
threads.c:874:14: warning: comparison of function 'pthread_mutex_unlock' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_mutex_unlock != NULL) &&
^~~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:874:14: note: prefix with the address-of operator to silence this warning
(pthread_mutex_unlock != NULL) &&
^
&
threads.c:875:14: warning: comparison of function 'pthread_cond_init' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_cond_init != NULL) &&
^~~~~~~~~~~~~~~~~ ~~~~
threads.c:875:14: note: prefix with the address-of operator to silence this warning
(pthread_cond_init != NULL) &&
^
&
threads.c:876:14: warning: comparison of function 'pthread_cond_destroy' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_cond_destroy != NULL) &&
^~~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:876:14: note: prefix with the address-of operator to silence this warning
(pthread_cond_destroy != NULL) &&
^
&
threads.c:877:14: warning: comparison of function 'pthread_cond_wait' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_cond_wait != NULL) &&
^~~~~~~~~~~~~~~~~ ~~~~
threads.c:877:14: note: prefix with the address-of operator to silence this warning
(pthread_cond_wait != NULL) &&
^
&
threads.c:878:14: warning: comparison of function 'pthread_equal' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_equal != NULL) &&
^~~~~~~~~~~~~ ~~~~
threads.c:878:14: note: prefix with the address-of operator to silence this warning
(pthread_equal != NULL) &&
^
&
threads.c:879:14: warning: comparison of function 'pthread_self' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_self != NULL) &&
^~~~~~~~~~~~ ~~~~
threads.c:879:14: note: prefix with the address-of operator to silence this warning
(pthread_self != NULL) &&
^
&
threads.c:879:14: note: suffix with parentheses to turn this into a function call
(pthread_self != NULL) &&
^
()
threads.c:880:14: warning: comparison of function 'pthread_cond_signal' not equal to a null pointer is always true [-Wtautological-pointer-compare]
(pthread_cond_signal != NULL)) {
^~~~~~~~~~~~~~~~~~~ ~~~~
threads.c:880:14: note: prefix with the address-of operator to silence this warning
(pthread_cond_signal != NULL)) {
^
&
threads.c:916:35: warning: comparison of function 'pthread_key_delete' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if ((libxml_is_threaded) && (pthread_key_delete != NULL))
^~~~~~~~~~~~~~~~~~ ~~~~
threads.c:916:35: note: prefix with the address-of operator to silence this warning
if ((libxml_is_threaded) && (pthread_key_delete != NULL))
^
&
threads.c:918:20: error: expected expression
once_control = PTHREAD_ONCE_INIT;
^
/usr/include/pthread.h:203:27: note: expanded from macro 'PTHREAD_ONCE_INIT'
#define PTHREAD_ONCE_INIT {_PTHREAD_ONCE_SIG_init, {0}}
^
18 warnings and 1 error generated.
make[2]: *** [threads.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
答案 0 :(得分:0)
你可能已经解决了这个问题,但是你试过了吗?
xcode-select install
即使你已经这样做了,我有时会发现我必须再次这样做,因为某些原因我还没有理解!