小樱 发表于 2018/1/19 17:45

kangle 3.5.12源代码编译报错的解决方法 libaio异步io

报错如下
checking for timegm... yes
checking for accept4... yes
checking for writev... yes
checking for iconv_open in -liconv... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating extworker/Makefile
config.status: creating module/webdav/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
# make -j 4
Making all in src
make: Entering directory `/root/kangle-3.5.12.11/src'
makeall-am
make: Entering directory `/root/kangle-3.5.12.11/src'
depbase=`echo cache.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      g++ -DHAVE_CONFIG_H -I.    -I../module/access -I../module/whm -O2 -g -DNDEBUG-D_REENTRANT -DLINUX -D_LARGE_FILE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -MT cache.o -MD -MP -MF $depbase.Tpo -c -o cache.o cache.cpp &&\
      mv -f $depbase.Tpo $depbase.Po
depbase=`echo KConfig.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      g++ -DHAVE_CONFIG_H -I.    -I../module/access -I../module/whm -O2 -g -DNDEBUG-D_REENTRANT -DLINUX -D_LARGE_FILE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -MT KConfig.o -MD -MP -MF $depbase.Tpo -c -o KConfig.o KConfig.cpp &&\
      mv -f $depbase.Tpo $depbase.Po
depbase=`echo forwin32.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      g++ -DHAVE_CONFIG_H -I.    -I../module/access -I../module/whm -O2 -g -DNDEBUG-D_REENTRANT -DLINUX -D_LARGE_FILE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -MT forwin32.o -MD -MP -MF $depbase.Tpo -c -o forwin32.o forwin32.cpp &&\
      mv -f $depbase.Tpo $depbase.Po
depbase=`echo garbage_c.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      g++ -DHAVE_CONFIG_H -I.    -I../module/access -I../module/whm -O2 -g -DNDEBUG-D_REENTRANT -DLINUX -D_LARGE_FILE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -MT garbage_c.o -MD -MP -MF $depbase.Tpo -c -o garbage_c.o garbage_c.cpp &&\
      mv -f $depbase.Tpo $depbase.Po
depbase=`echo HttpCore.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      g++ -DHAVE_CONFIG_H -I.    -I../module/access -I../module/whm -O2 -g -DNDEBUG-D_REENTRANT -DLINUX -D_LARGE_FILE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -MT HttpCore.o -MD -MP -MF $depbase.Tpo -c -o HttpCore.o HttpCore.cpp &&\
      mv -f $depbase.Tpo $depbase.Po
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from KAcl.h:28,
               from KAccess.h:23,
               from KTable.h:30,
               from http.h:38,
               from cache.cpp:29:
KAsyncFile.h:6:20: error: libaio.h: No such file or directory
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from KAcl.h:28,
               from KModelManager.h:5,
               from KConfig.cpp:37:
KAsyncFile.h:6:20: error: libaio.h: No such file or directory
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from cache.h:32,
               from garbage_c.cpp:29:
KAsyncFile.h:6:20: error: libaio.h: No such file or directory
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from cache.h:32,
               from HttpCore.cpp:30:
KAsyncFile.h:6:20: error: libaio.h: No such file or directory
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from KAcl.h:28,
               from KAccess.h:23,
               from KTable.h:30,
               from http.h:38,
               from cache.cpp:29:
KAsyncFile.h:21: error: field ‘iocb’ has incomplete type
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from cache.h:32,
               from garbage_c.cpp:29:
KAsyncFile.h:21: error: field ‘iocb’ has incomplete type
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from KAcl.h:28,
               from KModelManager.h:5,
               from KConfig.cpp:37:
KAsyncFile.h:21: error: field ‘iocb’ has incomplete type
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from cache.h:32,
               from HttpCore.cpp:30:
KAsyncFile.h:21: error: field ‘iocb’ has incomplete type
make: *** Error 1
make: *** Waiting for unfinished jobs....
make: *** Error 1
make: *** Error 1
make: *** Error 1
make: Leaving directory `/root/kangle-3.5.12.11/src'
make: *** Error 2
make: Leaving directory `/root/kangle-3.5.12.11/src'
make: *** Error 1
# make install
Making install in src
make: Entering directory `/root/kangle-3.5.12.11/src'
depbase=`echo cache.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      g++ -DHAVE_CONFIG_H -I.    -I../module/access -I../module/whm -O2 -g -DNDEBUG-D_REENTRANT -DLINUX -D_LARGE_FILE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -MT cache.o -MD -MP -MF $depbase.Tpo -c -o cache.o cache.cpp &&\
      mv -f $depbase.Tpo $depbase.Po
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from KAcl.h:28,
               from KAccess.h:23,
               from KTable.h:30,
               from http.h:38,
               from cache.cpp:29:
KAsyncFile.h:6:20: error: libaio.h: No such file or directory
In file included from KDiskCache.h:8,
               from KHttpObject.h:10,
               from KAcl.h:28,
               from KAccess.h:23,
               from KTable.h:30,
               from http.h:38,
               from cache.cpp:29:
KAsyncFile.h:21: error: field ‘iocb’ has incomplete type
make: *** Error 1
make: Leaving directory `/root/kangle-3.5.12.11/src'
make: *** Error 1
# /vhs/kangle/bin/kangle
-bash: /vhs/kangle/bin/kangle: No such file or directory

yum -y install libaio-devel
安装这个运行库

页: [1]
查看完整版本: kangle 3.5.12源代码编译报错的解决方法 libaio异步io