LP #1031536: "fatal.cpp:24:10: error: '_exit' was not declared in this scope" while building HandlerSocket Plugin for MySQL
Description
Environment
Activity
**Comment from Launchpad by: Roel Van de Paar on: 05-03-2013 22:54:14
The unistd.h was inserted at some point into the right file in 5.1/5.5. Not sure at what commit. The +x issue is handled separately in bug 1144059.
**Comment from Launchpad by: Roel Van de Paar on: 26-11-2012 01:58:13
Discussed with Stewart on IRC. Also agreed to chmod +x for any .sh scripts in build (especially build-binary.sh) for which it makes sense.
**Comment from Launchpad by: Roel Van de Paar on: 27-08-2012 03:08:16
This bug cannot be fixed before the outstanding 5.1>5.5 merges are complete. 'bzr branch -r ancestor' as a possible workaround for this is not usable: it reverts to a revision before the HandlerSocket-Plugin-for-MySQL directory is available. Waiting for ping from Stewart/Laurynas.
**Comment from Launchpad by: Roel Van de Paar on: 01-08-2012 03:41:55
See https://code.launchpad.net/~stewart/percona-server/5.1-update-handlersocket/+merge/111758
**Comment from Launchpad by: Roel Van de Paar on: 31-07-2012 23:45:04
Thanks to Stewart:
=== modified file 'HandlerSocket-Plugin-for-MySQL/libhsclient/fatal.cpp'
— HandlerSocket-Plugin-for-MySQL/libhsclient/fatal.cpp 2011-01-10 13:39:35 +0000
+++ HandlerSocket-Plugin-for-MySQL/libhsclient/fatal.cpp 2012-07-31 23:36:53 +0000
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
+#include <unistd.h>
#include "fatal.hpp"
Fixes the issue. Stewart also mentioned that we should probably move handlersocket properly, and thereby
avoid doing the copy (cp -R HandlerSocket-Plugin-for-MySQL $(PERCONA_SERVER)/storage) while building.
**Reported in Launchpad by Roel Van de Paar last update 05-03-2013 22:54:29
The following issue may be seen while building the Percona server:
===============================
Making all in libhsclient
make[2]: Entering directory `/percona-server/5.5/Percona-Server/storage/HandlerSocket-Plugin-for-MySQL/libhsclient'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-config.lo -MD -MP -MF .deps/libhsclient_la-config.Tpo -c -o libhsclient_la-config.lo `test -f 'config.cpp' || echo './'`config.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-config.lo -MD -MP -MF .deps/libhsclient_la-config.Tpo -c config.cpp -fPIC -DPIC -o .libs/libhsclient_la-config.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-config.lo -MD -MP -MF .deps/libhsclient_la-config.Tpo -c config.cpp -o libhsclient_la-config.o >/dev/null 2>&1
mv -f .deps/libhsclient_la-config.Tpo .deps/libhsclient_la-config.Plo
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-escape.lo -MD -MP -MF .deps/libhsclient_la-escape.Tpo -c -o libhsclient_la-escape.lo `test -f 'escape.cpp' || echo './'`escape.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-escape.lo -MD -MP -MF .deps/libhsclient_la-escape.Tpo -c escape.cpp -fPIC -DPIC -o .libs/libhsclient_la-escape.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-escape.lo -MD -MP -MF .deps/libhsclient_la-escape.Tpo -c escape.cpp -o libhsclient_la-escape.o >/dev/null 2>&1
mv -f .deps/libhsclient_la-escape.Tpo .deps/libhsclient_la-escape.Plo
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-fatal.lo -MD -MP -MF .deps/libhsclient_la-fatal.Tpo -c -o libhsclient_la-fatal.lo `test -f 'fatal.cpp' || echo './'`fatal.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel27.1 -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT libhsclient_la-fatal.lo -MD -MP -MF .deps/libhsclient_la-fatal.Tpo -c fatal.cpp -fPIC -DPIC -o .libs/libhsclient_la-fatal.o
fatal.cpp: In function 'void dena::fatal_exit(const string&)':
fatal.cpp:24:10: error: '_exit' was not declared in this scope
make[2]: *** [libhsclient_la-fatal.lo] Error 1
make[2]: Leaving directory `/percona-server/5.5/Percona-Server/storage/HandlerSocket-Plugin-for-MySQL/libhsclient'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/percona-server/5.5/Percona-Server/storage/HandlerSocket-Plugin-for-MySQL'
make: *** [all] Error 2
===============================