Bug #26766 Can't compile Falcon SE 5.2.3 on Solaris 10 / x86
Description:
I was trying to compile 5.2.3 with falcon SE on Solaris 10 x86. During compile I got these errors:
g++ -DHAVE_CONFIG_H -D_REENTRANT -D_PTHREADS -DENGINE -DSTORAGE_ENGINE -DNAMESPACE=Nfs -D_DEBUG -DMEM_DEBUG -I. -I. -I../.. -I../../include -I../../include -I../../regex -I../../sql -I. -I./TransformLib -I/usr/local/include -I/usr/local/include -DMYSQL_DYNAMIC_PLUGIN -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -fimplicit-templates -fexceptions -MT ha_falcon_la-DeferredIndex.lo -MD -MP -MF .deps/ha_falcon_la-DeferredIndex.Tpo -c DeferredIndex.cpp -fPIC -DPIC -o .libs/ha_falcon_la-DeferredIndex.o
DeferredIndex.cpp: In member function `void DeferredIndex::addNode(IndexKey*, int32)':
DeferredIndex.cpp:169: error: `memmove' was not declared in this scope
DeferredIndex.cpp:220: error: `memmove' was not declared in this scope
DeferredIndex.cpp:226: error: `memmove' was not declared in this scope
DeferredIndex.cpp:270: error: `memmove' was not declared in this scope
DeferredIndex.cpp:285: error: `memmove' was not declared in this scope
DeferredIndex.cpp:293: error: `memmove' was not declared in this scope
DeferredIndex.cpp: In member function `bool DeferredIndex::deleteNode(IndexKey*, int32)':
DeferredIndex.cpp:696: error: `memmove' was not declared in this scope
*** Error code 1
make: Fatal error: Command failed for target `ha_falcon_la-DeferredIndex.lo'
Current working directory /export/home/root/sources/mysql-5.2.3-falcon-alpha/storage/falcon
I fingured, that memmove() is a string.h function, so included that in DeferredIndex.cpp. Ran make again, DeferredIndex.cpp would compile, but now it stopped at:
if g++ -DHAVE_CONFIG_H -D_REENTRANT -D_PTHREADS -DENGINE -DSTORAGE_ENGINE -DNAMESPACE=Nfs -D_DEBUG -DMEM_DEBUG -I. -I . -I../.. -I../../include -I../../include -I../../regex -I../../sql -I. -I./TransformLib -I/usr/local/include -I/us r/local/include -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -fimplicit-templates -fexce ptions -MT libhafalcon_a-Hdr.o -MD -MP -MF ".deps/libhafalcon_a-Hdr.Tpo" -c -o libhafalcon_a-Hdr.o `test -f 'Hdr.cpp' || echo './'`Hdr.cpp; \
then mv -f ".deps/libhafalcon_a-Hdr.Tpo" ".deps/libhafalcon_a-Hdr.Po"; else rm -f ".deps/libhafalcon_a-Hdr.Tpo"; exit 1; fi
Hdr.cpp: In static member function `static void Hdr::create(Dbb*, FileType, TransId, const char*)':
Hdr.cpp:67: error: `strlen' was not declared in this scope
*** Error code 1
make: Fatal error: Command failed for target `libhafalcon_a-Hdr.o'
Current working directory /export/home/root/sources/mysql-5.2.3-falcon-alpha/storage/falcon
*** Error code 1
Well I figured, that it must be some higher up, as strlen is a string.h function to. Included it in Engine.h this time. Tried to compile again and it came to:
if g++ -DHAVE_CONFIG_H -D_REENTRANT -D_PTHREADS -DENGINE -DSTORAGE_ENGINE -DNAMESPACE=Nfs -D_DEBUG -DMEM_DEBUG -I. -I. -I../.. -I../../include -I../../include -I../../regex -I../../sql -I. -I./TransformLib -I/usr/local/include -I/usr/local/include -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -fimplicit-templates -fexceptions -MT libhafalcon_a-MACAddress.o -MD -MP -MF ".deps/libhafalcon_a-MACAddress.Tpo" -c -o libhafalcon_a-MACAddress.o `test -f 'MACAddress.cpp' || echo './'`MACAddress.cpp; \
then mv -f ".deps/libhafalcon_a-MACAddress.Tpo" ".deps/libhafalcon_a-MACAddress.Po"; else rm -f ".deps/libhafalcon_a-MACAddress.Tpo"; exit 1; fi
MACAddress.cpp: In static member function `static int MACAddress::getAddresses()':
MACAddress.cpp:98: error: `SIOCGIFHWADDR' was not declared in this scope
MACAddress.cpp:99: error: 'struct ifreq' has no member named 'ifr_hwaddr'
*** Error code 1
make: Fatal error: Command failed for target `libhafalcon_a-MACAddress.o'
Current working directory /export/home/root/sources/mysql-5.2.3-falcon-alpha/storage/falcon
Now if I'm not mistaken SIOCGIFHWADDR is a ioctl macro, that isn't available on Solaris. That would make the falcon SE effectively unavailable on Solaris too, or am I missing something? I would expect, that the missing string.h would affect other platforms too.
Using gcc 3.4.6 and the following configure:
./configure --prefix=/usr/local/ms --sysconfdir=/usr/local/ms/etc/mysql --localstatedir=/usr/local/var/mysql --enable-shared --enable-static --enable-assembler --enable-local-infil --with-extra-charsets=all --with-pic --with-pthread --with-zlib-dir=/usr/local --with-libwrap --with-error-inject --with-fast-mutexes --with-atomic-ops=up --with-big-tables --with-ssl --with-plugins=all --with-ndb-test --with-ndb-docs --with-embedded-server --with-embedded-privilege-control --without-docs
I am able to build sucessfully if I add --without-plugin-flacon.
How to repeat:
run configure with falcon SE enabled and make.
Suggested fix:
Add string.h to Engine.h
Replace SIOCGIFHWADDR with it's Solaris equivalent
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.