In this article, I would like to document the problems encountered when upgrading from IBM XLC 10.1 to XLC 17.1 (IBM Open XL C/C++ for AIX 17.1.0) and how to fix the following 12 errors.
If you’ve encountered any other errors, feel free to share your comments with or without a solution.
1. Change cc to ibm-clang
First you need to change all the related cc
to ibm-clang
in the the global Makefile. for example:
- CC=cc |
And check following link of Mapping of options to map new Clang options if any.
2. error: unknown argument: ‘-qmakedep=gcc’
- GEN_DEPENDENTS_OPTIONS=-qmakedep=gcc -E -MF $@.1 > /dev/null |
3. should not return a value [-Wreturn-type]
- return -1; |
4. error: non-void function ‘main’ should return a value [-Wreturn-type]
- return; |
5. error: unsupported option ‘-G’ for target ‘powerpc64-ibm-aix7.3.0.0’
- LIB_101_FLAGS := -G |
6. Undefined symbol (libxxxx.so)
- LIB_10_FLAGS := -bexport:$(SRC)/makefiles/xxxx.def |
7. unsupported option -qlongdouble
- drv_connect.c.CC_OPTIONS=$(CFLAGS) -qlongdouble -brtl |
8. Undefined symbol: ._Z8u9_closei
- extern int u9_close(int fd) ; |
9. ERROR: Undefined symbol: .pow
- CXXLIBES = -lpthread -lC -lstdc++ |
10. ‘main’ (argument array) must be of type ‘char **’
- d_char *argv[]; |
11. first parameter of ‘main’ (argument count) must be of type ‘int’
- int main(char *argc, char *argv[]) |
12. ERROR: Undefined symbol: ._ZdaPv
- LIB_3_LIBS := -lverse -llog_nosig |
转载本站文章请注明作者和出处,请勿用于任何商业用途。欢迎关注公众号「DevOps攻城狮」