EMBOSS port for amd64

Nicolas Joly njoly at pasteur.fr
Mon Jan 5 10:34:05 UTC 2004


Hi,

I just tried EMBOSS on a bi-Opteron (amd64) machine running NetBSD
(-current), and noticed that it does not work.

EMBOSS 2.8.0 compilation is fine, but programs don't work :

njoly at calimero [~/EMBOSS-2.8.0]> ./emboss/revseq -help
zsh: segmentation fault (core dumped)  ./emboss/revseq -help

AMD64 platforms suffers from the `va_{start,args,end}' problem already
known on PPC machines (at least with gcc).

With the attached patch, all programs work as expected.

njoly at calimero [~]> uname -a
NetBSD calimero.sis.pasteur.fr 1.6ZG NetBSD 1.6ZG (GENERIC.MP) #13: Wed Dec 31 16:41:18 CET 2003 njoly at calimero.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/GENERIC.MP amd64

Thanks in advance.
Regards.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.
-------------- next part --------------
Index: ajax/ajfmt.c
===================================================================
RCS file: /home/repository/emboss/emboss/emboss/ajax/ajfmt.c,v
retrieving revision 1.30
diff -u -r1.30 ajfmt.c
--- ajax/ajfmt.c	2003/10/16 18:06:12	1.30
+++ ajax/ajfmt.c	2003/12/31 16:58:53
@@ -1411,7 +1411,7 @@
 AjPStr ajFmtStr(const char* fmt, ...)
 {
     va_list ap;
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     va_list save_ap;
 #endif
     ajint len = 32;
@@ -1420,13 +1420,13 @@
     fnew = ajStrNewL(len);
     va_start(ap, fmt);
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(save_ap, ap);
 #endif
 
     fnew->Len = ajFmtVfmtStrCL(&fnew->Ptr, 0, &fnew->Res, fmt, ap);
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
 	__va_copy(ap, save_ap);
 #endif
 
@@ -1462,7 +1462,7 @@
     AjPStr thys;
     va_list ap;
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     va_list save_ap;
 #endif
 
@@ -1471,7 +1471,7 @@
     ajStrModL(pthis, 32);
     thys = *pthis;
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(save_ap, ap);
 #endif
 
@@ -1542,7 +1542,7 @@
 {
     AjPStr thys;
     va_list ap;
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     va_list save_ap;
 #endif
     ajint len;
@@ -1552,7 +1552,7 @@
     ajStrModL(pthis, 32);
     thys = *pthis;
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(save_ap, ap);
 #endif
 
@@ -2045,19 +2045,19 @@
 {
     va_list ap;
     ajint   n;
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     va_list save_ap;
 #endif
 
     va_start(ap, fmt);
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(save_ap,ap);
 #endif
 
     n = fmtVscan(thys->Ptr,fmt,ap);
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(ap,save_ap);
 #endif
 
@@ -2086,19 +2086,19 @@
 {
     va_list ap;
     ajint   n;
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     va_list save_ap;
 #endif
 
     va_start(ap, fmt);
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(save_ap,ap);
 #endif
 
     n = fmtVscan(thys,fmt,ap);
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
     __va_copy(ap,save_ap);
 #endif
 
Index: ajax/ajfmt.h
===================================================================
RCS file: /home/repository/emboss/emboss/emboss/ajax/ajfmt.h,v
retrieving revision 1.10
diff -u -r1.10 ajfmt.h
--- ajax/ajfmt.h	2003/08/07 11:07:45	1.10
+++ ajax/ajfmt.h	2003/12/31 16:58:53
@@ -10,7 +10,7 @@
 #include <stdio.h>
 #include "ajexcept.h"
 
-#if defined(__PPC__) && defined(_CALL_SYSV)
+#if defined(__amd64__) || (defined(__PPC__) && defined(_CALL_SYSV))
 #define VALIST va_list
 #define VA_P(x) (x)
 #define VA_V(x) (x)


More information about the emboss-dev mailing list