Bug #23256 doesn't build on alpha
Submitted: 13 Oct 2006 12:10 Modified: 6 Nov 2006 15:08
Reporter: Arkadiusz Miskiewicz (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.27-BK, 5.0.26 OS:
Assigned to: Alexey Kopytov CPU Architecture:Any

[13 Oct 2006 12:10] Arkadiusz Miskiewicz
Description:

mysql server doesn't build on linux/alpha:

stacktrace.c: In function `print_stacktrace':
stacktrace.c:189: error: `SIGRETURN_FRAME_COUNT' undeclared (first use in this function)
stacktrace.c:189: error: (Each undeclared identifier is reported only once
stacktrace.c:189: error: for each function it appears in.)
make[4]: *** [stacktrace.o] Error 1

How to repeat:
build on linux/alpha

Suggested fix:
Such change was done for other arches but someone forgot to update alpha:

diff -urN mysql-5.0.26.org/libmysqld/stacktrace.c mysql-5.0.26/libmysqld/stacktrace.c
--- mysql-5.0.26.org/libmysqld/stacktrace.c	2006-10-04 13:24:21.000000000 +0200
+++ mysql-5.0.26/libmysqld/stacktrace.c	2006-10-13 14:03:32.000000000 +0200
@@ -186,7 +186,7 @@
 
 #if defined(__alpha__) && defined(__GNUC__)
     uchar** new_fp = find_prev_fp(pc, fp);
-    if (frame_count == SIGRETURN_FRAME_COUNT - 1)
+    if (frame_count == sigreturn_frame_count - 1)
     {
       new_fp += 90;
     }
diff -urN mysql-5.0.26.org/sql/stacktrace.c mysql-5.0.26/sql/stacktrace.c
--- mysql-5.0.26.org/sql/stacktrace.c	2006-10-04 13:24:21.000000000 +0200
+++ mysql-5.0.26/sql/stacktrace.c	2006-10-13 14:03:32.000000000 +0200
@@ -186,7 +186,7 @@
 
 #if defined(__alpha__) && defined(__GNUC__)
     uchar** new_fp = find_prev_fp(pc, fp);
-    if (frame_count == SIGRETURN_FRAME_COUNT - 1)
+    if (frame_count == sigreturn_frame_count - 1)
     {
       new_fp += 90;
     }
[13 Oct 2006 12:36] Valeriy Kravchuk
Thank you for a bug report. In 5.0.27-BK (sql/stacktrace.c) we still have:

...
#if defined(__i386__) || defined(__x86_64__)
    uchar** new_fp = (uchar**)*fp;
    fprintf(stderr, "%p\n", frame_count == sigreturn_frame_count ?
            *(fp + SIGRETURN_FRAME_OFFSET) : *(fp + 1));
#endif /* defined(__386__)  || defined(__x86_64__) */

#if defined(__alpha__) && defined(__GNUC__)
    uchar** new_fp = find_prev_fp(pc, fp);
    if (frame_count == SIGRETURN_FRAME_COUNT - 1)
    {
      new_fp += 90;
    }
...
[18 Oct 2006 15:38] Mads Martin Joergensen
This is not a problem since we don't support alpha anymore.
[18 Oct 2006 16:44] Arkadiusz Miskiewicz
That's a shame especially that you have a working patch in this bugreport.
[19 Oct 2006 14:49] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/13990

ChangeSet@1.2592, 2006-10-19 18:49:37+04:00, kaa@polly.local +1 -0
  Fix for bug #23256 "doesn't build on alpha"
  - compilation on the Alpha platform was broken because the Alpha-specific code was not updated after replacing the SIGRETURN_FRAME_COUNT constant with a variable
[20 Oct 2006 10:32] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/14037

ChangeSet@1.2578, 2006-10-20 14:31:47+04:00, kaa@polly.local +1 -0
  Fix for bug #23256 "doesn't build on alpha"
  - compilation on the Alpha platform was broken because the Alpha-specific code was not updated after replacing the SIGRETURN_FRAME_COUNT constant with a variable
[28 Oct 2006 18:08] Christian Hammers
Even if you don't officially support alpha, please make sure that it at least works there as most distributions do support alpha and ending up with no libmysqlclient.so would cause many troubles with other packages.

thanks,

-christian- / Debian
[6 Nov 2006 15:08] MC Brown
A note has been added to the 4.1.23 and 5.1.13 changelog, and the 5.0.30 release notes.