handlersocket/database.cpp compile error

Bug #1477885 reported by Goetz T. Fischer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Triaged
Low
Unassigned
5.7
Invalid
Undecided
Unassigned

Bug Description

5.6.25 with tokudb, solaris 11.2, x86, sunpro 5.12

[ 87%] Building CXX object plugin/HandlerSocket-Plugin-for-MySQL/CMakeFiles/handlersocket.dir/handlersocket/database.cpp.o
cd /build/obj/plugin/HandlerSocket-Plugin-for-MySQL && /opt/solarisstudio12.3/bin/CC -Dhandlersocket_EXPORTS -DHAVE_RWLOCK_T -DDBUG_OFF -DHAVE_CONFIG_H -DPIC -DMYSQL_DYNAMIC_PLUGIN -fast -xchip=core2 -m64 -features=extensions -features=no%extinl -noex -features=no%rtti -xinline=%auto -library=sunperf -library=stlport4 -KPIC -I/build/obj/include -I/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/libhsclient -I/build/percona-server-5.6.25-73.1/include -I/build/percona-server-5.6.25-73.1/sql -I/build/percona-server-5.6.25-73.1/regex -fno-rtti -fno-exceptions -fPIC -o CMakeFiles/handlersocket.dir/handlersocket/database.cpp.o -c /build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/database.cpp
CC: Warning: Option -fno-rtti passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored otherwise
Unexpected flag 'no%rtti' for 'features'.
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/database.hpp", line 75: Warning: Identifier expected instead of "}".
"/opt/solarisstudio12.3/prod/include/CC/stlport4/stl/_auto_ptr.h", line 75: Error: Could not find a match for std::__ptr_base::__set(volatile dena::database_i*) needed in std::auto_ptr<volatile dena::database_i>::auto_ptr(volatile dena::database_i*).
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/database.cpp", line 218: Where: While instantiating "std::auto_ptr<volatile dena::database_i>::auto_ptr(volatile dena::database_i*)".
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/database.cpp", line 218: Where: Instantiated from non-template code.
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/database.cpp", line 1156: Warning: Identifier expected instead of "}".
1 Error(s) and 2 Warning(s) detected.

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

I was not able to hit this specific problem because of many others (like missing -lsocket etc). I hope to resolve them eventually...

Revision history for this message
Goetz T. Fischer (g-fischer) wrote :

for linker problems like this just edit the related "link.txt" file

Revision history for this message
Goetz T. Fischer (g-fischer) wrote :

actually, you don't have to fight your way through to where the error comes up. the error message is quite obvious. any developer who knows that part of the program should know what to do

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

I ended up with this so far:

[ 86%] Building CXX object plugin/HandlerSocket-Plugin-for-MySQL/CMakeFiles/handlersocket.dir/handlersocket/hstcpsvr_worker.cpp.o
In file included from /home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/libhsclient/string_buffer.hpp:17:0,
                 from /home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/database.hpp:17,
                 from /home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr.hpp:18,
                 from /home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.hpp:12,
                 from /home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp:21:
/home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp: In member function Б─≤void dena::hstcpsvr_worker::do_exec_on_index(char*, char*, char*, char*, dena::hstcpsvr_conn&)Б─≥:
/home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/libhsclient/allocator.hpp:38:47: error: Б─≤allocaБ─≥ was not declared in this scope
  static_cast<typ *>(alloca((len) * sizeof(typ)))
                                               ^
/home/openxs/git/percona-server/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp:764:28: note: in expansion of macro Б─≤DENA_ALLOCA_ALLOCATEБ─
   string_ref *const flds = DENA_ALLOCA_ALLOCATE(string_ref, fldnum);
                            ^
make[2]: *** [plugin/HandlerSocket-Plugin-for-MySQL/CMakeFiles/handlersocket.dir/handlersocket/hstcpsvr_worker.cpp.o] Error 1
make[1]: *** [plugin/HandlerSocket-Plugin-for-MySQL/CMakeFiles/handlersocket.dir/all] Error 2
make: *** [all] Error 2

Revision history for this message
Goetz T. Fischer (g-fischer) wrote :

please turn on verbose output so that the actual compile line is visible

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Goetz T. Fischer (g-fischer) wrote :

i had a peek ahead and got hit by:

"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp", line 764: Error: The function "alloca" must have a prototype.
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp", line 764: Error: Using static_cast to convert from int to dena::string_ref* not allowed.
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp", line 884: Error: The function "alloca" must have a prototype.
"/build/percona-server-5.6.25-73.1/plugin/HandlerSocket-Plugin-for-MySQL/handlersocket/hstcpsvr_worker.cpp", line 884: Error: Using static_cast to convert from int to dena::string_ref* not allowed.

the first one is just a missing alloca.h (seems they didn't test this with anything but gcc and are not afraid of gcc-isms either) but then we're back to the previous auto_ptr issue again.
this handler socket package seems to be one of those "oh, gcc is not the only compiler?" cases.

i read about it and from what i've seen i don't need it. any way to disable it? because it's quite a pity, everything else seems decent

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

I was able to repeat error from the initial description it with Percona Server 5.6.25-73.1 without TokuDB after implementing fixes, suggested in bug #1479372

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Sveta, can you copy this report to upstream at https://github.com/DeNA/HandlerSocket-Plugin-for-MySQL ?

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3296

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.