Bug #268 | compiling failed on Linux with gcc compiler using branch-probabilities | ||
---|---|---|---|
Submitted: | 9 Apr 2003 23:24 | Modified: | 26 Apr 2003 5:51 |
Reporter: | Chiiwen Liou | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S2 (Serious) |
Version: | 4.1 | OS: | Linux (Linux Redhat 8.0) |
Assigned to: | Michael Widenius | CPU Architecture: | Any |
[9 Apr 2003 23:24]
Chiiwen Liou
[9 Apr 2003 23:32]
Chiiwen Liou
Suggest fixes resolve current errors, but there is still another errors need to resolve. ---------errors after first fixes----------------- gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local\"" -DDATADIR="\"/usr/local/var\"" -DSHAREDIR="\"/usr/local/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../regex -I. -g -O -DSAFE_MUTEX -O2 -fbranch-probabilities -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -c -o mysqld.o `test -f 'mysqld.cc' || echo './'`mysqld.cc mysqld.cc:0: warning: file mysqld.da not found, execution counts assumed to be zero mysqld.cc: In function `void* handle_connections_sockets(void*)': mysqld.cc:2944: invalid conversion from `size_socket*' to `socklen_t*' mysqld.cc:3017: invalid conversion from `size_socket*' to `socklen_t*'
[10 Apr 2003 0:12]
Chiiwen Liou
It need second fixes on configure (line 16935 to 16944). Of course, the real fix is in configure.in. 16930 #---START: Used in for client configure 16931 # Check base type of last arg to accept 16932 16933 ac_save_CXXFLAGS="$CXXFLAGS" 16934 16935 # Do not treat warnings as errors if we are linking against other libc 16936 # this is to work around gcc not being permissive on non-system includes 16937 # with respect to ANSI C++ 16938 # We also remove the -fbranch-probabilities option as this will give warnings 16939 # about not profiled code, which confuses configure 16940 if test "$ac_cv_cxx_compiler_gnu" = "yes" -a "$with_other_libc" = "no" 16941 then 16942 CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` 16943 fi 16944 16945 echo "$as_me:$LINENO: checking base type of last arg to accept" >&5 16946 echo $ECHO_N "checking base type of last arg to accept... $ECHO_C" >&6
[12 Apr 2003 12:41]
Chiiwen Liou
Here is a fix for configure.in that works. ----------- >diff configure.in configure.in.new 1877a1878,1882 > # Do not treat warnings as errors if we are linking against other libc > # this is to work around gcc not being permissive on non-system includes > # with respect to ANSI C++ > # We also remove the -fbranch-probabilities option as this will give warnings > # about not profiled code, which confuses configure 1880c1885 < CXXFLAGS="$CXXFLAGS -Werror" --- > CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'`
[14 Apr 2003 1:58]
Lenz Grimmer
Thanks for the info - assigned bug report to me to apply the patch.
[14 Apr 2003 8:14]
Chiiwen Liou
My previous fix is not complete. Here is a more complete one. --- mysql-4.1 <88> diff configure.in configure.in.new 1877a1878,1882 > # Do not treat warnings as errors if we are linking against other libc > # this is to work around gcc not being permissive on non-system includes > # with respect to ANSI C++ > # We also remove the -fbranch-probabilities option as this will give warnings > # about not profiled code, which confuses configure 1880c1885 < CXXFLAGS="$CXXFLAGS -Werror" --- > CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` 1912c1917 < CXXFLAGS="$CXXFLAGS -Werror" --- > CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` ------------- Now I have problems on config.h. The new config.h is not correct. I do not know why.... mysql-4.1 <93> diff config.h config.h.new 269c269 < #define SOCKET_SIZE_TYPE int --- > #define SOCKET_SIZE_TYPE socklen_t
[14 Apr 2003 18:07]
Chiiwen Liou
Here is the fix for correct config.h ---------------------- mysql-4.1 <75> diff acinclude.m4 acinclude.m4.new 81c81 < CXXFLAGS="$CXXFLAGS -Werror" --- > CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'` ---------------------- So there are 2 files need to modify (configure.in & acinclude.m4)
[25 Apr 2003 13:41]
Lenz Grimmer
Monty, ok to apply?
[26 Apr 2003 5:51]
Michael Widenius
Thank you for your bug report. This issue has been fixed in the latest development tree for that product. You can find more information about accessing our development trees at http://www.mysql.com/doc/en/Installing_source_tree.html Fixed in 4.0 tree; Will automaticly propagate to 4.1 tree...
[28 Apr 2003 2:41]
Lenz Grimmer
Fixed with this ChangeSet: ChangeSet@1.1473, 2003-04-26 20:43:28+03:00, monty@mashka.mysql.fi Fix for -fbranch-probabilites (bug 268)
[30 Apr 2003 21:09]
Chiiwen Liou
When this fix will propagate to 4.1 & 5.0?
[2 May 2003 2:02]
Lenz Grimmer
As soon as Monty will do the merge of 4.0 -> 4.1 (usually before a new 4.1 release is being cut) There is no definitive date for that yet, but it will very likely happen within this month.