Bug #10663 Not compiled udf_example.cc
Submitted: 16 May 2005 11:13 Modified: 16 May 2005 16:59
Reporter: Nick Zakurin Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S2 (Serious)
Version:5.0.6-beta-20050515 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[16 May 2005 11:13] Nick Zakurin
Description:
Not compiled udf_example.cc

How to repeat:
[root@LINSERVER sql]# make udf_example.so
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/mysql\"" -DDATADIR="\"/var\"" -DSHAREDIR="\"/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../regex -I.  -I../include    -O2 -DDBUG_OFF -fPIC -O2 -mtune=opteron -march=opteron   -shared -o udf_example.so udf_example.cc
In file included from udf_example.cc:126:
../include/my_global.h:75:23: my_config.h: No such file or directory
In file included from udf_example.cc:126:
../include/my_global.h:520: error: `SOCKET_SIZE_TYPE' does not name a type
../include/my_global.h:790:2: #error "Neither int or long is of 4 bytes width"
../include/my_global.h:837: error: `off_t' does not name a type
../include/my_global.h:875: error: redeclaration of C++ built-in type `bool'
In file included from ../include/my_sys.h:36,
                 from udf_example.cc:127:
../include/m_ctype.h:134: error: `ulong' has not been declared
../include/m_ctype.h:134: error: `ulong' has not been declared
../include/m_ctype.h:134: error: ISO C++ forbids declaration of `nr1' with no type
../include/m_ctype.h:134: error: ISO C++ forbids declaration of `nr2' with no type
../include/m_ctype.h:159: error: `ulong' has not been declared
../include/m_ctype.h:160: error: ISO C++ forbids declaration of `wc' with no type
../include/m_ctype.h:161: error: `ulong' has not been declared
../include/m_ctype.h:162: error: ISO C++ forbids declaration of `wc' with no type
../include/m_ctype.h:183: error: expected identifier before '*' token
../include/m_ctype.h:184: error: ISO C++ forbids declaration of `ulong' with no type
../include/m_ctype.h:184: error: `ulong' declared as function returning a function
../include/m_ctype.h:184: error: ISO C++ forbids declaration of `strntoul' with no type
../include/m_ctype.h:193: error: expected identifier before '*' token
../include/m_ctype.h:194: error: ISO C++ forbids declaration of `ulong' with no type
../include/m_ctype.h:194: error: `ulong' declared as function returning a function
../include/m_ctype.h:194: error: ISO C++ forbids declaration of `scan' with no type
../include/m_ctype.h:194: error: `int my_charset_handler_st::ulong(int*)' and `int my_charset_handler_st::ulong(int*)' cannot be overloaded
../include/m_ctype.h:276: error: `ulong' has not been declared
../include/m_ctype.h:276: error: `ulong' has not been declared
../include/m_ctype.h:276: error: ISO C++ forbids declaration of `nr1' with no type
../include/m_ctype.h:276: error: ISO C++ forbids declaration of `nr2' with no type
../include/m_ctype.h:294: error: `ulong' has not been declared
../include/m_ctype.h:294: error: ISO C++ forbids declaration of `wc' with no type
../include/m_ctype.h:295: error: `ulong' has not been declared
../include/m_ctype.h:295: error: ISO C++ forbids declaration of `wc' with no type
../include/m_ctype.h:297: error: `ulong' does not name a type
../include/m_ctype.h:304: error: `ulong' does not name a type
In file included from udf_example.cc:127:
../include/my_sys.h:239: error: `ulong' does not name a type
../include/my_sys.h:241: error: `ulong' does not name a type
../include/my_sys.h:242: error: `ulong' does not name a type
../include/my_sys.h:258: error: `ulong' does not name a type
../include/my_sys.h:260: error: `ulong' does not name a type
../include/my_sys.h:454: error: `ulong' does not name a type
../include/my_sys.h:535: error: `uint32' does not name a type
In file included from udf_example.cc:127:
../include/my_sys.h:640: error: `RETSIGTYPE' has not been declared
../include/my_sys.h:640: error: ISO C++ forbids declaration of `func' with no type
../include/my_sys.h:681: error: `RETSIGTYPE' does not name a type
../include/my_sys.h:684: error: `RETSIGTYPE' does not name a type
../include/my_sys.h:688: error: `RETQSORTTYPE' does not name a type
../include/my_sys.h:759: error: `ulong' has not been declared
../include/my_sys.h:759: error: ISO C++ forbids declaration of `additional_size' with no type
../include/my_sys.h:791: error: `ulong' has not been declared
../include/my_sys.h:791: error: `ulong' has not been declared
../include/my_sys.h:791: error: ISO C++ forbids declaration of `parameter' with no type
../include/my_sys.h:791: error: ISO C++ forbids declaration of `parameter' with no type
../include/my_sys.h:792: error: `ulong' has not been declared
../include/my_sys.h:792: error: `ulong' has not been declared
../include/my_sys.h:792: error: ISO C++ forbids declaration of `parameter' with no type
../include/my_sys.h:792: error: ISO C++ forbids declaration of `parameter' with no type
../include/my_sys.h:793: error: `ulong' has not been declared
../include/my_sys.h:793: error: `ulong' has not been declared
../include/my_sys.h:793: error: ISO C++ forbids declaration of `len' with no type
../include/my_sys.h:793: error: ISO C++ forbids declaration of `complen' with no type
../include/my_sys.h:794: error: `ha_checksum' does not name a type
../include/my_sys.h:795: warning: `my_bit_log2' initialized and declared `extern'
../include/my_sys.h:795: error: `ulong' was not declared in this scope
../include/my_sys.h:798: warning: `my_sleep' initialized and declared `extern'
../include/my_sys.h:798: error: variable or field `my_sleep' declared void
../include/my_sys.h:798: error: `ulong' was not declared in this scope
../include/my_sys.h:799: error: `ulong' does not name a type
../include/my_sys.h:853: error: `ulong' does not name a type
../include/my_sys.h:857: warning: `thd_increment_bytes_sent' initialized and declared `extern'
../include/my_sys.h:857: error: variable or field `thd_increment_bytes_sent' declared void
../include/my_sys.h:857: error: `ulong' was not declared in this scope
../include/my_sys.h:858: warning: `thd_increment_bytes_received' initialized and declared `extern'
../include/my_sys.h:858: error: variable or field `thd_increment_bytes_received' declared void
../include/my_sys.h:858: error: `ulong' was not declared in this scope
../include/my_sys.h:859: warning: `thd_increment_net_big_packet_count' initialized and declared `extern'
../include/my_sys.h:859: error: variable or field `thd_increment_net_big_packet_count' declared void
../include/my_sys.h:859: error: `ulong' was not declared in this scope
In file included from ../include/mysql.h:57,
                 from udf_example.cc:129:
../include/mysql_com.h:426: error: `ulong' does not name a type
In file included from udf_example.cc:131:
../include/m_string.h:224: error: `ulong' does not name a type
udf_example.cc:133: error: `pthread_mutex_t' does not name a type
make: *** [udf_example.so] Error 1
[root@LINSERVER sql]#
[16 May 2005 16:59] MySQL Verification Team
I was unable to repeat:

miguel@hegel:~/dbs/mysql-5.0/sql$ file udf_example.so
udf_example.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
miguel@hegel:~/dbs/mysql-5.0/sql$
[23 Nov 2005 5:37] Scott McNaught
I am also experiencing this problem.

# uname -a

SunOS lasun159 5.9 Generic_117171-15 sun4u sparc SUNW,Sun-Blade-1500

When running make

g++ -DDEFAULT_BASEDIR=\"/usr/local\"  -DDATADIR="\"/usr/local/var\""  -DDEFAULT_CHARSET_HOME="\"/usr/local\""  -DSHAREDIR="\"/usr/local/share/mysql\""  -DDEFAULT_HOME_ENV=MYSQL_HOME  -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX  -DHAVE_CONFIG_H -I. -I. -I.. -I../include  -I../include -I.     -O -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -c -o my_new.o my_new.cc
In file included from mysys_priv.h:17,
                 from my_new.cc:22:
../include/my_global.h:891: error: redeclaration of C++ built-in type `bool'
*** Error code 1
make: Fatal error: Command failed for target `my_new.o'
Current working directory /var/spool/pkg/mysql-5.0.16/mysys
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /var/spool/pkg/mysql-5.0.16
*** Error code 1
make: Fatal error: Command failed for target `all'

Eventually managed to compile by commenting out this line, and putting it back in when needed.
[28 Mar 2006 19:31] Shrenik Bhura
Just changed the code in my_globals.h line 75 from #include<my_config.h> to #include<config.h> and it works.

The problem is in the file name generated by configure. It should have been my_config.h instead of config.h

-SB