Re: Ming-0.4.4 released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



shige 10/27 2011
----------------

I tried to compile of ming-0.4.4, and I found some problems. I 
did it on Solaris 9 (Sparc).

1) When "make check", I saw the following message:

  Executing './test07 .' in /hoge/hoge/ming-0.4.4/test/Font
  open font file failed
  ./../Media//font-kerntest.fdb: No such file or directory
  Invokation of test builder './test07' returned 

I found the file "font-kerntest.fdb" at

 http://bugs.libming.org/attachment.cgi?id=29

and it should be included in the distribution.

2) I needed to change paths of the 1st line of test scripts:

 #!/usr/bin/python, #!/usr/bin/perl, #!/usr/bin/php

to the proper paths and I needed to add the following line:

  set_time_limit(0);

to test/Video/test0{1,4,5}.php, since my machine does not work
so fast. 

3) I used the patch below at the compilation. Especially, I think
it is serious for util/parser.c.

----- From here -----
diff -uN ming-0.4.4/configure.in.ORG ming-0.4.4/configure.in
--- ming-0.4.4/configure.in.ORG	Wed Oct 26 16:29:42 2011
+++ ming-0.4.4/configure.in	Thu Oct 27 13:02:59 2011
@@ -150,6 +150,8 @@
 		AC_MSG_ERROR([Can't build tcl extension, as tcl executable could not be found])
 	fi
 
+tclbindir=`dirname $TCL`
+
 tcllibdirs_default="\
 $prefix/lib/itcl \
 $prefix/lib \
@@ -157,7 +159,8 @@
 $HOME/lib \
 /usr/local/lib \
 /usr/lib64 \
-/usr/lib"
+/usr/lib \
+`dirname $tclbindir`/lib"
 
 	for i in $tcllibdirs_default; do
 	  for suf in 8.3 8.4 ""; do
@@ -193,7 +196,8 @@
 $HOME/include \
 /usr/local/include \
 /usr/include/tcl \
-/usr/include"
+/usr/include \
+`dirname $tclbindir`/include"
 
 	for i in $tclincdirs_default; do
 	   if test -f $i/tcl.h; then
diff -uN ming-0.4.4/test/actionscript/ActionScriptTest.c.ORG ming-0.4.4/test/actionscript/ActionScriptTest.c
--- ming-0.4.4/test/actionscript/ActionScriptTest.c.ORG	Wed Oct 26 15:33:18 2011
+++ ming-0.4.4/test/actionscript/ActionScriptTest.c	Thu Oct 27 10:04:05 2011
@@ -41,6 +41,46 @@
 #include <limits.h>
 #include <makeswf.h>
 
+#ifndef HAVE_VASPRINTF
+/* Workaround for the lack of vasprintf()
+ * As found on: http://unixpapa.com/incnote/stdio.html
+ * Seems to be Public Domain
+ */
+int
+vasprintf(char **ret, const char *format, va_list ap)
+{
+	va_list ap2;
+	int len = 100;        /* First guess at the size */
+
+	if ((*ret = (char *) malloc(len)) == NULL)
+	{
+	    return -1;
+	}
+	while (1)
+	{
+	    int nchar;
+	    va_copy(ap2, ap);
+	    nchar= vsnprintf(*ret, len, format, ap2);
+	    if (nchar > -1 && nchar < len)
+	    {
+		return nchar;
+	    }
+	    if (nchar > len)
+	    {
+		len= nchar+1;
+	    } else
+	    {
+		len*= 2;
+	    }
+	    if ((*ret = (char *) realloc(*ret, len)) == NULL)
+	    {
+		free(*ret);
+		return -1;
+	    }
+	}
+}
+#endif
+
 static SWFMovie
 compile(const char* filename, const char* ppfile, int version)
 {
diff -uN ming-0.4.4/util/parser.c.ORG ming-0.4.4/util/parser.c
--- ming-0.4.4/util/parser.c.ORG	Wed Oct 26 15:33:18 2011
+++ ming-0.4.4/util/parser.c	Thu Oct 27 10:15:43 2011
@@ -242,7 +242,7 @@
   int i;
 
   gerec->GlyphIndex = malloc((glyphbits+31)/32 * sizeof(UI32) );
-  for( i=0; glyphbits; i++ ) {
+  for( i=0; i <= glyphbits; i++ ) {
 	  if( glyphbits > 32 ) {
 	  	gerec->GlyphIndex[i] = readBits(f, 32);
 	  	glyphbits -= 32;
@@ -253,7 +253,7 @@
   }
 
   gerec->GlyphAdvance = malloc((advancebits+31)/32 * sizeof(UI32) );
-  for( i=0; advancebits; i++ ) {
+  for( i=0; i <= advancebits; i++ ) {
 	  if( advancebits > 32 ) {
 	  	gerec->GlyphAdvance[i] = readBits(f, 32);
 	  	advancebits -= 32;
diff -uN ming-0.4.4/util/read.c.ORG ming-0.4.4/util/read.c
--- ming-0.4.4/util/read.c.ORG	Wed Oct 26 15:33:18 2011
+++ ming-0.4.4/util/read.c	Thu Oct 27 10:17:20 2011
@@ -122,6 +122,7 @@
 {
   char data[8];
 
+#ifdef SWF_LITTLE_ENDIAN
   data[4] = readUInt8(f);
   data[5] = readUInt8(f);
   data[6] = readUInt8(f);
@@ -130,6 +131,17 @@
   data[1] = readUInt8(f);
   data[2] = readUInt8(f);
   data[3] = readUInt8(f);
+#else
+  data[3] = readUInt8(f);
+  data[2] = readUInt8(f);
+  data[1] = readUInt8(f);
+  data[0] = readUInt8(f);
+  data[7] = readUInt8(f);
+  data[6] = readUInt8(f);
+  data[5] = readUInt8(f);
+  data[4] = readUInt8(f);
+#endif
+
 
   return *((double *)data);
 }
@@ -138,10 +150,17 @@
 {
   char data[4];
 
+#ifdef SWF_LITTLE_ENDIAN
   data[0] = readUInt8(f);
   data[1] = readUInt8(f);
   data[2] = readUInt8(f);
   data[3] = readUInt8(f);
+#else
+  data[3] = readUInt8(f);
+  data[2] = readUInt8(f);
+  data[1] = readUInt8(f);
+  data[0] = readUInt8(f);
+#endif
 
   return *((float *)data);
 }
@@ -374,8 +393,6 @@
 {
 	_dumpBytes(f, length, 1 );
 }
-
-  int j=0, i, k, l=0;
 
 void dumpBuffer(unsigned char *buf, int length)
 {
----- To here -----

+=========================================================+
| Shigeharu TAKENO      NIigata Institute of Technology   |
|                        Kashiwazaki,Niigata 945-11 JAPAN |
|(shige@xxxxxxxxxxxxxx)  TEL(&FAX): +81-257-22-8161       |
+=========================================================+

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Ming-users mailing list
Ming-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ming-users


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux