NOVOTS KMS ´Ê»ã±í Glossary    ÁªÏµÎÒÃÇ Contact Us
²éѯ Search  
   
°´Àà±ðä¯ÀÀ Browse by Category
NOVOTS KMS .: Êý¾Ý¿â .: dz̸LevelDBÔÚubuntu 11.04ϱàÒëʧ°ÜµÄÎÊÌâ

dz̸LevelDBÔÚubuntu 11.04ϱàÒëʧ°ÜµÄÎÊÌâ

ÎÒÔÚ×îеÄubuntu11.04ϱàÒëleveldbµÄʱºò·¢ÏÖÎÊÌâ,µ«ÊÇÔÚ¸üÔçǰµÄÕâ¸ö°æ±¾ºÜÕý³££¬Í·ÎļþcstdatomicÕÒ²»µ½, ¼òµ¥µÄgoogleÏ·¢ÏÖ4.5µÄgccÕâ¸öÍ·Îļþ¸ÄÃû³Éatomic¡£

ÎÒÔÚ×îеÄubuntu11.04ϱàÒëleveldbµÄʱºò·¢ÏÖÎÊÌâ,µ«ÊÇÔÚ¸üÔçǰµÄÕâ¸ö°æ±¾ºÜÕý³££º

  1. yufeng@yufeng-laptop:/usr/src/leveldb$ make
  2. g++ -c -DLEVELDB_PLATFORM_POSIX -I. -I./include -std=c++0x -g2 db/db_bench.cc -o db/db_bench.o
  3. In file included from ./port/port.h:14:0,
  4.  from ./util/coding.h:17,
  5.  from ./db/dbformat.h:13,
  6.  from ./db/db_impl.h:9,
  7.  from db/db_bench.cc:8:
  8. ./port/port_posix.h:14:22: fatal error: cstdatomic: ûÓÐÄǸöÎļþ»òĿ¼
  9. compilation terminated.
  10. make: *** [db/db_bench.o] ´íÎó 1

ÎҵıàÒë»·¾³:

  1. $ cat /etc/lsb-release
  2. DISTRIB_ID=Ubuntu 
  3. DISTRIB_RELEASE=11.04
  4. DISTRIB_CODENAME=natty 
  5. DISTRIB_DESCRIPTION="Ubuntu 11.04" 
  6. $ gcc -v
  7. Using built-in specs.
  8. COLLECT_GCC=/usr/bin/gcc-4.5.real
  9. COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
  10. Target: x86_64-linux-gnu
  11. Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' 
  12. --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
  13. --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
  14. --program-suffix=-4.5 --enable-shared --enable-multiarch
  15. --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib
  16. --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext
  17. --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5
  18. --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/
  19. --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold
  20. --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror
  21. --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
  22. --host=x86_64-linux-gnu --target=x86_64-linux-gnu
  23. Thread model: posix
  24. gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

Í·ÎļþcstdatomicÕÒ²»µ½, ¼òµ¥µÄgoogleÏ·¢ÏÖ4.5µÄgccÕâ¸öÍ·Îļþ¸ÄÃû³Éatomic

It seems that cstdatomic was renamed to atomic in newer GCC versions.Replacing cstdatomic include with atomic include in the header worked for me.

½â¾ö·½·¨ºÜ¼òµ¥£º

ÐÞ¸Ä./port/port_posix.h:14 ³É

  1. #include  

ÏÖÔÚÔÙʵÑéÏ£º

  1. $ make
  2. ...
  3. #ÅܲâÊÔ°¸Àý
  4. $ make check

ÕâÆªÎÄÕ¶ÔÄã¶àÓÐÓã¿

Ïà¹ØÎÄÕÂ

article Éϰà×åʹÓõçÄÔÊdz£Ì¬ ¾ÅÕл¤×¡ÃÔÈ˵çÑÛ
Éϰà×åʹÓõçÄÔÊdz£Ì¬£¬Ëä˵³ÉÄêºóÊÓÁ¦±ä»¯²»´ó£¬µ...

(No rating)  8-26-2015    Views: 564   
article 100ÃÀÔª×î±ãÒËË«ºË»ú СÀ±½·ÊÖ»úÆÀ²â
       ...

(No rating)  7-25-2012    Views: 1039   
article ¶Å¾øÎÞЧ»áÒéÊ®±ØÎÊ

(No rating)  9-26-2011    Views: 1260   

Óû§ÆÀÓï

Ìí¼ÓÆÀÓï
µ±Ç°»¹Ã»ÓÐÆÀÓï.


.: .: .: .: .:
[ 怫 ]
±±¾©»¤º½¿Æ¼¼ÓÐÏÞ¹«Ë¾ 2006

Novots Technologies Limited