Bug #94202 | FreeBSD12 Mysql5.7 İnstall Make install clean gcc7.4 | ||
---|---|---|---|
Submitted: | 4 Feb 2019 23:22 | Modified: | 11 Mar 2019 12:31 |
Reporter: | Samet Abdullah Sarıgül | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Errors | Severity: | S3 (Non-critical) |
Version: | mysql57-server-5.7.24_4 | OS: | FreeBSD (Mysql 5.7 Server) |
Assigned to: | CPU Architecture: | x86 (FreeBSD12) | |
Tags: | return pthread_self(); |
[4 Feb 2019 23:22]
Samet Abdullah Sarıgül
[4 Feb 2019 23:26]
Samet Abdullah Sarıgül
static inline my_thread_os_id_t my_thread_os_id() { #ifdef HAVE_PTHREAD_THREADID_NP /* macOS. Be careful to use this version first, and to not use SYS_gettid on macOS, as SYS_gettid has a different meaning compared to linux gettid(). */ uint64_t tid64; pthread_threadid_np(nullptr, &tid64); return (pid_t)tid64; #else #ifdef HAVE_SYS_GETTID /* Linux. See man gettid See GLIBC Bug 6399 - gettid() should have a wrapper https://sourceware.org/bugzilla/show_bug.cgi?id=6399 */ return syscall(SYS_gettid); #else #ifdef _WIN32 /* Windows */ return GetCurrentThreadId(); #else #ifdef HAVE_PTHREAD_GETTHREADID_NP /* FreeBSD 10.2 */ return pthread_getthreadid_np(); #else #ifdef HAVE_INTEGER_PTHREAD_SELF # ifdef __DragonFly__ return syscall(SYS_lwp_gettid); # else /* Unknown platform, fallback. */ return pthread_self(); # endif #else /* Feature not available. */ return 0; #endif /* HAVE_INTEGER_PTHREAD_SELF */ #endif /* HAVE_PTHREAD_GETTHREADID_NP */ #endif /* _WIN32 */ #endif /* HAVE_SYS_GETTID */ #endif /* HAVE_SYS_THREAD_SELFID */ } It is useful to hide the code to bypass the error, but it may not work correctly. #ifdef HAVE_INTEGER_PTHREAD_SELF # ifdef __DragonFly__ return syscall(SYS_lwp_gettid); # else /* Unknown platform, fallback. */ /* return pthread_self(); */ # endif #else /* Feature not available. */ return 0; #endif /* HAVE_INTEGER_PTHREAD_SELF */
[5 Feb 2019 17:13]
Terje Røsten
Hi! Any reason you can't use clang as compiler? Clang is the default compiler on FreeBSD, and the standard compiler for MySQL on FreeBSD.
[12 Feb 2019 11:31]
Tor Didriksen
MySQL 5.7 is C++03 rather than C++11 In compiler_options.cmake we have: # GCC 6 has C++14 as default, set it explicitly to the old default. EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GXX_VERSION) IF(GXX_VERSION VERSION_EQUAL 6.0 OR GXX_VERSION VERSION_GREATER 6.0) SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -std=gnu++03") ENDIF()
[12 Feb 2019 11:39]
Tor Didriksen
oops, I looked at the warnings only, maybe there is a wrong feature test. Be sure to include -std=gnu++03 in your CXX flags though, otherwise cmake feature tests may fail for the wrong reason.
[12 Feb 2019 15:31]
Tor Didriksen
even if I do this: cmake <path to source> -DCMAKE_C_COMPILER=gcc7 -DCMAKE_CXX_COMPILER=g++7 -DFORCE_UNSUPPORTED_COMPILER=1 -DWITH_DEFAULT_COMPILER_OPTIONS=0 I see: grep HAVE_PTHREAD_GETTHREADID_NP CMakeCache.txt //Test HAVE_PTHREAD_GETTHREADID_NP HAVE_PTHREAD_GETTHREADID_NP:INTERNAL=1 grep HAVE_PTHREAD_GETTHREADID_NP CMakeFiles/* CMakeFiles/CMakeOutput.log:Performing C SOURCE FILE Test HAVE_PTHREAD_GETTHREADID_NP succeeded with the following output: CMakeFiles/CMakeOutput.log:/usr/local/bin/gcc7 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_PTHREAD_GETTHREADID_NP -o CMakeFiles/cmTC_7e6d3.dir/src.c.o -c /export/home/tmp/didrik/5.7-review/CMakeFiles/CMakeTmp/src.c CMakeFiles/CMakeOutput.log:/usr/local/bin/gcc7 -DHAVE_PTHREAD_GETTHREADID_NP CMakeFiles/cmTC_7e6d3.dir/src.c.o -o cmTC_7e6d3 -lm -lcrypt -lpthread -lrt -latomic -lexecinfo What is the error message in CMakeFiles/CMakeError.log ??
[12 Mar 2019 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".