Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
arm的apache2交叉构建失败_Apache_Apache2_Arm_Cross Build - Fatal编程技术网

arm的apache2交叉构建失败

arm的apache2交叉构建失败,apache,apache2,arm,cross-build,Apache,Apache2,Arm,Cross Build,在跨建筑apache2.4.12中,我在编译过程中遇到以下错误: ptxdist/platform/build-target/httpd-2.4.12/modules/mappers -prefer-non-pic -static -c exports.c && touch exports.lo exports.c:4117:55: error: 'apr_hash_this_key' undeclared here (not in a function)

在跨建筑apache2.4.12中,我在编译过程中遇到以下错误:

    ptxdist/platform/build-target/httpd-2.4.12/modules/mappers  -prefer-non-pic -static -c exports.c && touch exports.lo
    exports.c:4117:55: error: 'apr_hash_this_key' undeclared here (not in a function)
    exports.c:4121:59: error: 'apr_hash_this_key_len' undeclared here (not in a function)
    exports.c:4125:55: error: 'apr_hash_this_val' undeclared here (not in a function)
    exports.c:4568:62: error: 'apr_sockaddr_is_wildcard' undeclared here (not in a function)
    exports.c:5307:55: error: 'apr_shm_create_ex' undeclared here (not in a function)
    exports.c:5323:55: error: 'apr_shm_attach_ex' undeclared here (not in a function)
似乎有一个肮脏的黑客在编译时从make_exports.awk文件生成httpd-2.4.12/server/exports.c


如何调整make_exports.awk文件以获得arm的工作交叉构建

解决方案是为apr-1.5.1创建一个补丁,该补丁禁用apr\u hash\u this\u key、apr\u hash\u this\u key\u len等等。然后重新编译apr、apr util和Apache2.4.12

diff -rupN AY/include/apr_hash.h AZ/include/apr_hash.h
--- AY/include/apr_hash.h   2015-02-27 10:35:07.436548295 +0100
+++ AZ/include/apr_hash.h   2015-02-27 10:33:30.038497258 +0100
@@ -171,21 +171,21 @@ APR_DECLARE(void) apr_hash_this(apr_hash
  * @param hi The iteration state
  * @return The pointer to the key
  */
-APR_DECLARE(const void*) apr_hash_this_key(apr_hash_index_t *hi);
+//APR_DECLARE(const void*) apr_hash_this_key(apr_hash_index_t *hi);

 /**
  * Get the current entry's key length from the iteration state.
  * @param hi The iteration state
  * @return The key length
  */
-APR_DECLARE(apr_ssize_t) apr_hash_this_key_len(apr_hash_index_t *hi);
+//APR_DECLARE(apr_ssize_t) apr_hash_this_key_len(apr_hash_index_t *hi);

 /**
  * Get the current entry's value from the iteration state.
  * @param hi The iteration state
  * @return The pointer to the value
  */
-APR_DECLARE(void*) apr_hash_this_val(apr_hash_index_t *hi);
+//APR_DECLARE(void*) apr_hash_this_val(apr_hash_index_t *hi);

 /**
  * Get the number of key/value pairs in the hash table.
diff -rupN AY/include/apr_network_io.h AZ/include/apr_network_io.h
--- AY/include/apr_network_io.h 2013-12-06 18:10:34.000000000 +0100
+++ AZ/include/apr_network_io.h 2015-02-27 11:50:10.847966181 +0100
@@ -730,7 +730,7 @@ APR_DECLARE(int) apr_sockaddr_equal(cons
  * @remark The return value will be non-zero if the address is
  * initialized and is the wildcard address.
  */
-APR_DECLARE(int) apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);
+//APR_DECLARE(int) apr_sockaddr_is_wildcard(const apr_sockaddr_t *addr);

 /**
 * Return the type of the socket.
diff -rupN AY/include/apr_shm.h AZ/include/apr_shm.h
--- AY/include/apr_shm.h    2015-02-27 12:00:01.119541200 +0100
+++ AZ/include/apr_shm.h    2015-02-27 12:02:01.294089137 +0100
@@ -111,12 +111,12 @@ APR_DECLARE(apr_status_t) apr_shm_create
  *         function will return the first usable byte of memory.
  * 
  */
-APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
+/*APR_DECLARE(apr_status_t) apr_shm_create_ex(apr_shm_t **m,
                                             apr_size_t reqsize,
                                             const char *filename,
                                             apr_pool_t *pool,
                                             apr_int32_t flags);
-
+*/
 /**
  * Remove named resource associated with a shared memory segment,
  * preventing attachments to the resource, but not destroying it.
@@ -164,11 +164,11 @@ APR_DECLARE(apr_status_t) apr_shm_attach
  *        structure for this process.
  * @param flags mask of APR_SHM_* (defined above)
  */
-APR_DECLARE(apr_status_t) apr_shm_attach_ex(apr_shm_t **m,
+/*APR_DECLARE(apr_status_t) apr_shm_attach_ex(apr_shm_t **m,
                                             const char *filename,
                                             apr_pool_t *pool,
                                             apr_int32_t flags);
-
+*/
 /**
  * Detach from a shared memory segment without destroying it.
  * @param m The shared memory structure representing the segment
diff -rupN AY/Makefile.in AZ/Makefile.in
--- AY/Makefile.in  2015-02-27 10:17:32.817392979 +0100
+++ AZ/Makefile.in  2015-02-27 10:17:44.075619396 +0100
@@ -113,7 +113,7 @@ apr.exp: exports.c export_vars.c
    @echo "#! lib@APR_LIBNAME@.so" > $@
    @echo "* This file was AUTOGENERATED at build time." >> $@
    @echo "* Please do not edit by hand." >> $@
-   $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
+   #$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
    $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@

 dox: