Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/189.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/61.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
Android C宏编译错误(AOSP:external/clearsilver/util/neo_err.h)_Android_C_Macros_Android Source_Clearsilver - Fatal编程技术网

Android C宏编译错误(AOSP:external/clearsilver/util/neo_err.h)

Android C宏编译错误(AOSP:external/clearsilver/util/neo_err.h),android,c,macros,android-source,clearsilver,Android,C,Macros,Android Source,Clearsilver,我在C中有一个编译错误,涉及一个宏,这让我发疯。这不是我的代码,而是广泛使用的库的一部分。我会告诉你背后的故事,因为我知道会有人问我另外一个问题 我正试图通过GNU Make v.3.81在Ubuntu v.16.04上为Droid v.2.3构建Android开源项目(AOSP)。我遇到了许多错误,这些错误都与这个主要错误有关: external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ to

我在C中有一个编译错误,涉及一个宏,这让我发疯。这不是我的代码,而是广泛使用的库的一部分。我会告诉你背后的故事,因为我知道会有人问我另外一个问题

我正试图通过GNU Make v.3.81在Ubuntu v.16.04上为Droid v.2.3构建Android开源项目(AOSP)。我遇到了许多错误,这些错误都与这个主要错误有关:

external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
据“Ask Ubuntu”上的一个家伙说,他在安装
libswitch perl
后遇到了这个问题:

这似乎是一个非常奇怪的原因!我以前从未编译过AOSP,因此无法做出类似的声明。不管它值多少钱,我没有安装它

dpkg-query: package 'libswitch-perl' is not installed and no information is available
忽略源代码以外的任何内容,让我们深入了解更多细节。以下是相关的clearsilver代码:

#if defined(USE_C99_VARARG_MACROS)
#define nerr_raise(e,f,...) \
   nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
#elif defined(USE_GNUC_VARARG_MACROS)
#define nerr_raise(e,f,a...) \
   nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,##a)
#endif

NEOERR *nerr_raisef (const char *func, const char *file, int lineno,
                     NERR_TYPE error, const char *fmt, ...)
                     ATTRIBUTE_PRINTF(5,6);
错误发生在以下行:

nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
我厌倦了将宏定义移到nerr_raisef函数定义之后,这没有任何效果。我还尝试了以下几行(插入失败的行之前),以帮助找到问题:

#define mytest1 __PRETTY_FUNCTION__
#define myitest2 __FILE__
#define mytest3 __LINE__
#define mytest4(...) __VA_ARGS__
#define mytest5(e,f) nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f)
#define mytest6(e,f,...) nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f)
#define mytest7(e,f,...) nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
#define mytest8(e,f,...) \
   nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)

#ifdef nerr_raise
x
#endif 
这些都没问题。请注意,
mytest8
宏是完全相同的东西,有不同的名称,它可以编译!此外,不包括松散的
x
,即之前未定义nerr_上升

下面是我在运行
make
时得到的全部输出:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=imx53_smd
TARGET_BUILD_VARIANT=user
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ22
============================================
build/core/main.mk:303: implicitly installing apns-conf_sdk.xml
find: ‘frameworks/base/frameworks/base/docs/html’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘frameworks/base/frameworks/base/docs/html’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘frameworks/base/frameworks/base/docs/html’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘frameworks/base/frameworks/base/docs/html’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘frameworks/base/frameworks/base/docs/html’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
No private recovery resources for TARGET_DEVICE imx53_smd
host Java: droiddoc (out/host/common/obj/JAVA_LIBRARIES/droiddoc_intermediates/classes)
host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_util.c
host C: libneo_util <= external/clearsilver/util/neo_files.c
host C: libneo_util <= external/clearsilver/util/ulist.c
host C: libneo_util <= external/clearsilver/util/neo_hdf.c
host C: libneo_util <= external/clearsilver/util/neo_str.c
host C: libneo_util <= external/clearsilver/util/ulocks.c
host C: libneo_util <= external/clearsilver/util/neo_hash.c
In file included from external/clearsilver/util/ulist.c:19:0:
external/clearsilver/util/ulist.c: In function ‘uListInit’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/ulist.c:64:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory");
            ^
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/ulist.c:70:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory");
            ^
external/clearsilver/util/ulist.c: In function ‘uListPop’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/ulist.c:124:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_OUTOFRANGE, "uListPop: empty list");
            ^
In file included from external/clearsilver/java-jni/j_neo_util.c:6:0:
external/clearsilver/java-jni/j_neo_util.c: In function ‘jni_fileload_cb’:
external/clearsilver/java-jni/../util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/java-jni/j_neo_util.c:257:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT,
            ^
external/clearsilver/java-jni/../util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/java-jni/j_neo_util.c:268:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT,
            ^
In file included from external/clearsilver/util/neo_files.c:26:0:
external/clearsilver/util/neo_files.c: In function ‘ne_listdir_fmatch’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_files.c:219:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT, "Invalid call to ne_listdir_fmatch");
            ^
In file included from external/clearsilver/util/neo_hdf.c:24:0:
external/clearsilver/util/neo_hdf.c: In function ‘_alloc_hdf’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:62:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise (NERR_NOMEM, "Unable to allocate memory for hdf element");
            ^
In file included from external/clearsilver/util/neo_str.c:22:0:
external/clearsilver/util/neo_str.c: In function ‘string_appendvf’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_str.c:167:14: note: in expansion of macro ‘nerr_raise’
       return nerr_raise(NERR_NOMEM, 
              ^
external/clearsilver/util/neo_str.c: In function ‘string_array_split’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_str.c:223:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise (NERR_ASSERT, "separator must be at least one character");
            ^
external/clearsilver/util/neo_hdf.c: In function ‘hdf_set_attr’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:409:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT, "Unable to set attribute on none existant node");
            ^
external/clearsilver/util/neo_hdf.c: In function ‘_set_value’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:648:14: note: in expansion of macro ‘nerr_raise’
       return nerr_raise(NERR_NOMEM, "Unable to allocate memory");
              ^
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:795:16: note: in expansion of macro ‘nerr_raise’
         return nerr_raise(NERR_NOMEM, "Unable to allocate memory");
                ^
external/clearsilver/util/neo_hdf.c: In function ‘hdf_set_valuevf’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:869:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_NOMEM, "Unable to allocate memory for format string");
            ^
external/clearsilver/util/neo_hdf.c: In function ‘_copy_attr’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:1028:14: note: in expansion of macro ‘nerr_raise’
       return nerr_raise(NERR_NOMEM, "Unable to allocate copy of HDF_ATTR");
              ^
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:1036:14: note: in expansion of macro ‘nerr_raise’
       return nerr_raise(NERR_NOMEM, "Unable to allocate copy of HDF_ATTR");
              ^
In file included from external/clearsilver/util/ulocks.c:22:0:
external/clearsilver/util/ulocks.c: In function ‘fLock’:
external/clearsilver/util/neo_err.h:102:75: error: expected expression before ‘)’ token
    nerr_raise_errnof(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                           ^
external/clearsilver/util/ulocks.c:96:12: note: in expansion of macro ‘nerr_raise_errno’
     return nerr_raise_errno (NERR_LOCK, "File lock failed");
            ^
In file included from external/clearsilver/util/neo_hash.c:18:0:
external/clearsilver/util/neo_hash.c: In function ‘ne_hash_init’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hash.c:30:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_NOMEM, "Unable to allocate memory for NE_HASH");
            ^
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hash.c:41:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_NOMEM, "Unable to allocate memory for NE_HASHNODES");
            ^
external/clearsilver/util/neo_hdf.c: In function ‘hdf_write_string’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:1342:28: note: in expansion of macro ‘nerr_raise’
     if (*s == NULL) return nerr_raise(NERR_NOMEM, "Unable to allocate empty string");
                            ^
external/clearsilver/util/neo_hash.c: In function ‘ne_hash_insert’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hash.c:91:14: note: in expansion of macro ‘nerr_raise’
       return nerr_raise(NERR_NOMEM, "Unable to allocate NE_HASHNODE");
              ^
external/clearsilver/util/neo_hash.c: In function ‘_hash_resize’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hash.c:229:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_NOMEM, "Unable to allocate memory to resize NE_HASH");
            ^
external/clearsilver/util/neo_hdf.c: In function ‘hdf_read_file’:
external/clearsilver/util/neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
external/clearsilver/util/neo_hdf.c:1834:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT, "Can't read NULL file");
            ^
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_files.o] Error 1
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/ulist.o] Error 1
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_str.o] Error 1
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/ulocks.o] Error 1
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_hash.o] Error 1
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_hdf.o] Error 1
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/bin/bash: jar: command not found
make: *** [out/host/common/obj/JAVA_LIBRARIES/droiddoc_intermediates/javalib.jar] Error 127
============================================
平台版本代号=REL
平台_版本=2.3.4
目标产品=imx53\U smd
目标\构建\变量=用户
目标模拟器=错误
目标\构建\类型=发布
目标\构建\应用程序=
目标=手臂
主机_ARCH=x86
主机操作系统=linux
主机\构建\类型=发布
BUILD_ID=GRJ22
============================================
build/core/main.mk:303:隐式安装apns-conf_sdk.xml
查找:“frameworks/base/frameworks/base/docs/html”:没有这样的文件或目录
查找:“out/target/common/docs/gen”:没有这样的文件或目录
查找:“frameworks/base/frameworks/base/docs/html”:没有这样的文件或目录
查找:“out/target/common/docs/gen”:没有这样的文件或目录
查找:“frameworks/base/frameworks/base/docs/html”:没有这样的文件或目录
查找:“out/target/common/docs/gen”:没有这样的文件或目录
查找:“frameworks/base/frameworks/base/docs/html”:没有这样的文件或目录
查找:“out/target/common/docs/gen”:没有这样的文件或目录
查找:“frameworks/base/frameworks/base/docs/html”:没有这样的文件或目录
查找:“out/target/common/docs/gen”:没有这样的文件或目录
目标设备imx53\U smd没有专用恢复资源
主机Java:droiddoc(out/host/common/obj/Java_库/droiddoc_中间体/类)

host C:libclearsilver jni我现在在AOSP构建中遇到了一个新错误,看起来这将是一场可怕的无休止的战斗,除非我解决一些关于我的环境、配置或其他更基本的问题。不过,我确实用以下方法解决了这个特定的bug

我没有运行整个AOSP make,而是尝试编译一个被此宏阻塞的文件:

cd external/clearsilver/util
gcc -I/[my full path...]/external/clearsilver neo_files.c
结果

In file included from neo_files.c:26:0:
neo_files.c: In function ‘ne_listdir_fmatch’:
neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
neo_files.c:219:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT, "Invalid call to ne_listdir_fmatch");
gcc -g -O2 -Wall -I..  -fPIC -o neo_err.o -c neo_err.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_files.o -c neo_files.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_misc.o -c neo_misc.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_rand.o -c neo_rand.c
gcc -g -O2 -Wall -I..  -fPIC -o ulist.o -c ulist.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_hdf.o -c neo_hdf.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_str.o -c neo_str.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_date.o -c neo_date.c
gcc -g -O2 -Wall -I..  -fPIC -o wildmat.o -c wildmat.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_hash.o -c neo_hash.c
gcc -g -O2 -Wall -I..  -fPIC -o ulocks.o -c ulocks.c
gcc -g -O2 -Wall -I..  -fPIC -o rcfs.o -c rcfs.c
gcc -g -O2 -Wall -I..  -fPIC -o skiplist.o -c skiplist.c
gcc -g -O2 -Wall -I..  -fPIC -o dict.o -c dict.c
gcc -g -O2 -Wall -I..  -fPIC -o filter.o -c filter.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_net.o -c neo_net.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_server.o -c neo_server.c
ar cr ../libs/libneo_utl.a neo_err.o neo_files.o neo_misc.o neo_rand.o ulist.o neo_hdf.o neo_str.o neo_date.o wildmat.o neo_hash.o ulocks.o rcfs.o skiplist.o dict.o filter.o neo_net.o neo_server.o 
ranlib ../libs/libneo_utl.a
然后,根据John Bollinger的建议,我使用gcc-E:

gcc -E -I/[my full path...]/external/clearsilver neo_files.c
截断结果

...
  if (files == 
# 218 "neo_files.c" 3 4
              ((void *)0)
# 218 "neo_files.c"
                  )
    return nerr_raisef(__PRETTY_FUNCTION__,"neo_files.c",219,NERR_ASSERT,"Invalid call to ne_listdir_fmatch",);

...
如果查看宏展开到的行的最末端,您会看到:

... NERR_ASSERT,"Invalid call to ne_listdir_fmatch",);
注意参数列表末尾的逗号!这就是问题所在

解决方案是什么?使用
##u变量u参数
。在宏观上。在以下情况下,##前缀将删除前导逗号:

nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,##__VA_ARGS__)
我在neo_err.h文件中对其他一些宏也重复了这一点。然后,我不仅可以编译一个文件,还可以运行整个模块的make:

make
结果

In file included from neo_files.c:26:0:
neo_files.c: In function ‘ne_listdir_fmatch’:
neo_err.h:88:69: error: expected expression before ‘)’ token
    nerr_raisef(__PRETTY_FUNCTION__,__FILE__,__LINE__,e,f,__VA_ARGS__)
                                                                     ^
neo_files.c:219:12: note: in expansion of macro ‘nerr_raise’
     return nerr_raise(NERR_ASSERT, "Invalid call to ne_listdir_fmatch");
gcc -g -O2 -Wall -I..  -fPIC -o neo_err.o -c neo_err.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_files.o -c neo_files.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_misc.o -c neo_misc.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_rand.o -c neo_rand.c
gcc -g -O2 -Wall -I..  -fPIC -o ulist.o -c ulist.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_hdf.o -c neo_hdf.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_str.o -c neo_str.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_date.o -c neo_date.c
gcc -g -O2 -Wall -I..  -fPIC -o wildmat.o -c wildmat.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_hash.o -c neo_hash.c
gcc -g -O2 -Wall -I..  -fPIC -o ulocks.o -c ulocks.c
gcc -g -O2 -Wall -I..  -fPIC -o rcfs.o -c rcfs.c
gcc -g -O2 -Wall -I..  -fPIC -o skiplist.o -c skiplist.c
gcc -g -O2 -Wall -I..  -fPIC -o dict.o -c dict.c
gcc -g -O2 -Wall -I..  -fPIC -o filter.o -c filter.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_net.o -c neo_net.c
gcc -g -O2 -Wall -I..  -fPIC -o neo_server.o -c neo_server.c
ar cr ../libs/libneo_utl.a neo_err.o neo_files.o neo_misc.o neo_rand.o ulist.o neo_hdf.o neo_str.o neo_date.o wildmat.o neo_hash.o ulocks.o rcfs.o skiplist.o dict.o filter.o neo_net.o neo_server.o 
ranlib ../libs/libneo_utl.a
成功


现在,关于AOSP噩梦的下一个问题…

显然,以下是我的真实答案:

在Ubuntu11.10上构建IceCreamSandwich 4.0.x(及更早版本) 更新的版本失败了…要么降级到Ubuntu 10.04,要么使用主版本 分支,可以在Ubuntu 11.10及更新版本上编译

我使用的源代码是别人为一个非常定制的AOSP编写的,刚刚交给我的是一个巨大的tarball。我不能搞砸我使用的回购协议的哪个分支。显然,我别无选择,只能设置整个单独的操作系统


哎呀!(或类似的东西…

这就是全部错误吗?通常,g++会添加更多信息(注释),例如,关于使用该宏的位置。通常原因可能是宏调用中缺少定义(空)。还有其他错误与此相关。如果有帮助的话,我会把它们贴出来。谢谢查看修订后的文章。值得一提的是,您引用的libswitch perl问题似乎不太可能与您的相关。它只涉及一个类似的语法问题。你应该考虑为受影响的文件获取预处理的源文本(通过代码> Gcc-E)。检查错误的线路至少应该告诉您出了什么问题,这可能有助于找出原因。