Bug #88036 Linking CXX executable ../../../runtime_output_directory/pfs_connect_attr-t
Submitted: 10 Oct 2017 1:13 Modified: 11 Oct 2017 3:16
Reporter: 浩 王 Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:8.0.3-rc OS:CentOS (6.5)
Assigned to: CPU Architecture:Any
Tags: 8.0.3 make Linking CXX executable

[10 Oct 2017 1:13] 浩 王
Description:
[ 51%] Built target sql_main
[ 51%] Linking CXX executable ../../../runtime_output_directory/pfs_connect_attr-t
../../temptable/libtemptable.a(handler.cc.o): In function `temptable::Handler::delete_table(char const*, dd::Table const*)':
/opt/mysql-server-8.0/sql/table.h:3358: undefined reference to `_ZTHN9temptable6tablesE'
/opt/mysql-server-8.0/sql/table.h:3358: undefined reference to `_ZTHN9temptable6tablesE'
/opt/mysql-server-8.0/sql/table.h:3358: undefined reference to `_ZTHN9temptable6tablesE'
../../temptable/libtemptable.a(handler.cc.o): In function `temptable::Handler::open(char const*, int, unsigned int, dd::Table const*)':
/opt/mysql-server-8.0/sql/table.h:3358: undefined reference to `_ZTHN9temptable6tablesE'
/opt/mysql-server-8.0/sql/table.h:3358: undefined reference to `_ZTHN9temptable6tablesE'
../../temptable/libtemptable.a(handler.cc.o):/opt/mysql-server-8.0/sql/table.h:3358: more undefined references to `_ZTHN9temptable6tablesE' follow
collect2: error: ld returned 1 exit status
make[2]: *** [runtime_output_directory/pfs_connect_attr-t] Error 1
make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
make: *** [all] Error 2

How to repeat:
# cmake ..  -DWITH_BOOST=/opt/boost_1_64_0
CMake Deprecation Warning at CMakeLists.txt:44 (CMAKE_POLICY):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- Running cmake version 3.9.3
-- Configuring with MAX_INDEXES = 64U
-- CMAKE_GENERATOR: Unix Makefiles
-- SIZEOF_VOIDP 8
-- MySQL 8.0.3-rc
-- Packaging as: mysql-8.0.3-rc-Linux-x86_64
-- Local boost dir /opt/boost_1_64_0
-- Found /opt/boost_1_64_0/boost/version.hpp 
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 106400
-- BOOST_INCLUDE_DIR /opt/boost_1_64_0
-- NUMA library missing or required version not available
-- WITH_PROTOBUF=bundled
-- PROTOBUF_VERSION_NUMBER is #define GOOGLE_PROTOBUF_VERSION 2006001
-- You need to set WITH_CURL. This variable needs to point to curl library.
-- Performing Test HAVE_Wimplicit-fallthrough=2
-- Performing Test HAVE_Wimplicit-fallthrough=2 - Failed
-- Using cmake version 3.9.3
-- Not building NDB
-- MYSQLX - Text log of protobuf messages enabled
-- Creating LDAP authentication SASL client library.
-- Required SASL header is missing. Skipping the LDAP SASL client authentication plugin.
-- Library mysqlclient depends on OSLIBS -lpthread;m;rt;dl
-- GMOCK_SOURCE_DIR:/opt/mysql-server-8.0/source_downloads/googletest-release-1.8.0/googlemock
-- GTEST_LIBRARIES:gmock;gtest
CMake Deprecation Warning at scripts/CMakeLists.txt:355 (CMAKE_POLICY):
  The OLD behavior for policy CMP0007 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- CONFIG_CLIENT_LIBS -lpthread -lm -lrt -ldl
-- CONFIG_LIBS_PRIVATE -lpthread -lm -lrt -ldl
-- INSTALL mysqlclient.pc lib/pkgconfig
-- Skipping deb packaging on unsupported platform .
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: _GNU_SOURCE;_FILE_OFFSET_BITS=64;HAVE_CONFIG_H;RAPIDJSON_NO_SIZETYPEDEFINE;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;_USE_MATH_DEFINES;HAVE_LIBEVENT1
-- CMAKE_C_FLAGS:  -Wall -Wextra -Wformat-security -Wvla -Wmissing-format-attribute -Wundef -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS:  -Wall -Wextra -Wformat-security -Wvla -Wmissing-format-attribute -Wundef -Woverloaded-virtual -Wno-missing-field-initializers -Wlogical-op
-- CMAKE_C_LINK_FLAGS: 
-- CMAKE_CXX_LINK_FLAGS: 
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O3 -fPIC -g -fno-omit-frame-pointer  -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -fPIC -g -fno-omit-frame-pointer -std=c++11  -DDBUG_OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/mysql-server-8.0/bld
#make 
...
[ 51%] Built target sql_main
[ 51%] Linking CXX executable ../../../runtime_output_directory/pfs_connect_attr-t
[10 Oct 2017 22:30] Miguel Solorzano
cmake output

Attachment: cmake-bug88036.txt (text/plain), 19.75 KiB.

[10 Oct 2017 22:33] Miguel Solorzano
make output

Attachment: make-bug88036.txt (text/plain), 201.21 KiB.

[10 Oct 2017 22:39] Miguel Solorzano
Thank you for the bug report. I couldn't repeat on CentOS 7.0:

miguel@tikal:~/mysql-8.0.3-rc $ runtime_output_directory/mysqld --version
/home/miguel/mysql-8.0.3-rc/runtime_output_directory/mysqld  Ver 8.0.3-rc-log for Linux on x86_64 (Source distribution)
miguel@tikal:~/mysql-8.0.3-rc $ 

Please see attached files foe cmake and make output.

miguel@tikal:~/mysql-8.0.3-rc $ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.4.1708 (Core) 
Release:        7.4.1708
Codename:       Core
miguel@tikal:~/mysql-8.0.3-rc $
[11 Oct 2017 3:16] 浩 王
This bug couldn't repeat on CentOS 7.2,gcc-4.8.5
Just on CentOS 6.5,gcc-4.8.2,