Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: _builtin_prefetch - Compile Error

From: Marko Mäkelä <marko.makela(at)oracle.com>
Date: Sat Sep 01 2007 - 14:30:12 EDT


Dear Jan-Oliver,

> I try to install MySQL-5.0.37 from source on a Solaris system with SunOS
> 5.9.
>
> And if I then type 'make',
> I get the following error message
>
> /opt/gnu/bin/g++:
> Sorry, g++-3.0.4 isn't installed for solaris 5.9.
> I'll try g++-3.0.4 for solaris 2.8,
> but all bets are off.
> Undefined first referenced
> symbol in file
> __builtin_prefetch ../innobase/dict/libdict.a(dict0dict.o)
> ld: fatal: Symbol referencing errors. No output written to .libs/mysqld

The header file innobase/include/univ.i defines UNIV_PREFETCH_R and UNIV_PREFETCH_RW in terms of __builtin_prefetch() on GCC version 2 or later. (You can blame me for defining these macros.)

Apparently, the compiler version that you are using is not supporting this feature. As a workaround, please replace the preceding #if statement:

#if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)

with

#if 0

so that dummy versions of these macros will be defined. (The __INTEL_COMPILER check was needed, because icc pretends to be gcc but didn't handle __builtin_expect correctly.)

Do you need help?X

I have understood that GCC should recognize these __builtin functions on all target platforms (but it might ignore them on some instruction set architectures). What is the underlying ISA? SPARCv9?

Best regards,

	Marko Mäkelä
	Innobase Oy/Oracle Corp.
-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Sat Sep 1 14:32:33 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:17 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library