[Botan-devel] Problem building 1.9.7

Jack Lloyd lloyd at randombit.net
Wed May 5 10:32:56 EDT 2010


On Wed, May 05, 2010 at 04:11:19PM +0200, Rickard Bellgrim wrote:
> 
> > Disabling all of these warnings is easy (and probably I should try to
> > remember to do so when doing releases, or else add some sort of
> > --maintainer-mode build option). Edit src/build-data/cc/gcc.txt
> > and comment out the long warning_flags setting on line 15 and
> > perhaps uncomment the shorter one with just -W -Wall.
> 
> Thank you, got me on step closer:
> 
> g++ -Ibuild/include -O3 -finline-functions -march=i686 -momit-leaf-frame-pointer -D_REENTRANT -ansi -Wno-long-long -fpermissive -W -Wall -fPIC -fvisibility=hidden -c src/utils/cpuid.cpp -o build/lib/cpuid.o
> src/utils/cpuid.cpp:31:21: error: cpuid.h: No such file or directory
> src/utils/cpuid.cpp: In function ?Botan::u32bit Botan::<unnamed>::get_x86_cache_line_size()?:
> src/utils/cpuid.cpp:55: error: ?__get_cpuid? was not declared in this scope
> src/utils/cpuid.cpp:59: error: ?__get_cpuid? was not declared in this scope
> src/utils/cpuid.cpp:64: error: ?__get_cpuid? was not declared in this scope
> D::x86_processor_flags()?:
> src/utils/cpuid.cpp:152: error: ?__get_cpuid? was not declared in this scope
> make: *** [build/lib/cpuid.o] Error 1
> 
> (The cpuid.h is there)

This is looking not for botan's cpuid.h but the one included in
GCC. It looks like it's not available in earlier versions of GCC,
unfortunately; I also got a report this causes problems on MacOS X's
GCC. So this code will have to be replaced using explicit asm blocks.

Short term workaround is to grab cpuid.h from GCC's SVN and install it
somewhere that it will be found (eg /usr/include or
/usr/local/include).

http://gcc.gnu.org/viewcvs/trunk/gcc/config/i386/cpuid.h?content-type=text%2Fplain&view=co

-Jack



More information about the botan-devel mailing list