You are not logged in.

#1 2010-05-20 12:53:55

sati
Member
Registered: 2008-03-12
Posts: 22

Building Amaya

Has anyone successfully built Amaya recently? I keep getting the same errors regardless of which version of wxGTK I have installed. I presume this is the issue but am unsure.

../../thotlib/base/platform.c: In function 'ThotBool TtaFileCopy(const char*, const char*)':
../../thotlib/base/platform.c:332:48: error: cannot call constructor 'wxFile::wxFile' directly
../../thotlib/base/platform.c:332:48: error: for a function-style cast, remove the redundant '::wxFile'
../../thotlib/base/platform.c:334:45: error: cannot call constructor 'wxFile::wxFile' directly
../../thotlib/base/platform.c:334:45: error: for a function-style cast, remove the redundant '::wxFile'
make[1]: *** [base/platform.o] Error 1

Offline

#2 2010-05-20 17:31:44

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Building Amaya

The following builds, but amaya still behaves very strange when started.


PKGBUILD

# Mantainer: Zerial <fernando@zerial.org>
# Contributor: Dalius <dagis@takas.lt>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=amaya
pkgver=11.3.1
pkgrel=4
pkgdesc="W3C's Editor/Browser"
arch=('i686' 'x86_64')
url="http://www.w3.org/Amaya/"
license=('custom')
depends=('wxgtk' 'libgl' 'raptor')
makedepends=(imake)
options=('!makeflags')
source=(png_check_sig.patch wxFile.patch \
http://www.w3.org/Amaya/Distribution/amaya-sources-$pkgver.tgz)
md5sums=('9b1ba4f71f4eb0a623f013e0841b33b1'
         '1efa652c853627c6cbba3ae612552deb'
         '4a92b4e043fbd1add5b1e17fb7ed8755')

build() {
cd $srcdir/Amaya$pkgver

patch -p1 < $srcdir/png_check_sig.patch || return 1
patch -p1 < $srcdir/wxFile.patch || return 1
cd Amaya
mkdir GTK
cd GTK
export HOME=`pwd`

if [ "$CARCH" = "x86_64" ] ; then
[ $NOEXTRACT -eq 1 ] || cp ../../Mesa/configs/linux-x86-64 ../../Mesa/configs/current
else
[ $NOEXTRACT -eq 1 ] || cp ../../Mesa/configs/linux-x86 ../../Mesa/configs/current
fi

# [ $NOEXTRACT -eq 1 ] || ../configure --prefix=/usr/share --exec=/usr/share --datadir=/usr/share --enable-system-raptor --enable-system-wx
../configure --prefix=/usr/share --exec=/usr/share --datadir=/usr/share --enable-system-raptor --enable-system-wx
make || return 1
mkdir -p $startdir/pkg/usr/bin
make prefix=$startdir/pkg/usr/share install || return 1

ln -f -s ../share/Amaya/wx/bin/amaya $pkgdir/usr/bin/amaya && \
install -D -m644 $srcdir/Amaya$pkgver/Amaya/amaya/COPYRIGHT \
$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT || return 1
mkdir -p $pkgdir/usr/share/Amaya/lib
cp -a $srcdir/Amaya$pkgver/Amaya/GTK/Mesa/lib/libGL.so.1* $pkgdir/usr/share/Amaya/lib/ && \
cp -a $srcdir/Amaya$pkgver/Amaya/GTK/Mesa/lib/libGLU.so.1* $pkgdir/usr/share/Amaya/lib/ && \
chrpath -r /usr/share/Amaya/lib $pkgdir/usr/share/Amaya/wx/bin/amaya_bin && \
chrpath -r /usr/share/Amaya/lib $pkgdir/usr/share/Amaya/wx/bin/print
}

png_check_sig.patch

diff -Naur Amaya11.3.1.orig//Amaya/thotlib/image/pnghandler.c Amaya11.3.1.new/Amaya/thotlib/image/pnghandler.c
--- Amaya11.3.1.orig//Amaya/thotlib/image/pnghandler.c    2010-02-09 21:39:35.000000000 +0100
+++ Amaya11.3.1.new/Amaya/thotlib/image/pnghandler.c    2010-04-08 22:33:56.000000000 +0200
@@ -10,6 +10,7 @@
  *          R. Guetari (W3C/INRIA) - Initial Windows version
  */
 
+#include <png.h>
 #include "thot_gui.h"
 #include "thot_sys.h"
 #include "png.h"
@@ -134,7 +135,7 @@
 
     /* Checks the eight byte PNG signature*/
     fread (pbSig, 1, 8, pfFile);
-    if (!png_check_sig (pbSig, 8))
+    if (png_sig_cmp (pbSig, 0, 8))
         return NULL;    
     /* create the two png(-info) structures*/
     png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 
@@ -158,7 +159,7 @@
     png_init_io (png_ptr, pfFile);
     png_set_sig_bytes (png_ptr, 8);
     png_read_info (png_ptr, info_ptr);
-    png_get_IHDR(png_ptr, info_ptr, &lw, &lh, 
+    png_get_IHDR(png_ptr, info_ptr, (png_uint_32*)&lw, (png_uint_32*)&lh,
          &iBitDepth,
          &iColorType, NULL, NULL, NULL);    
    /* if less than 8 bits /channels => 8 bits / channels*/
@@ -169,13 +170,13 @@
       png_set_strip_16 (png_ptr);
     /* Grayscale =>RGB or RGBA */
     if (iColorType == PNG_COLOR_TYPE_GRAY || iColorType == PNG_COLOR_TYPE_GRAY_ALPHA)
-      png_set_gray_to_rgb (png_ptr);
+      png_set_expand_gray_1_2_4_to_8(png_ptr);
     /* Palette indexed colors to RGB */
     if (iColorType == PNG_COLOR_TYPE_PALETTE)
       png_set_palette_to_rgb (png_ptr);
     /* 8 bits / channel is needed */
     if (iColorType == PNG_COLOR_TYPE_GRAY && iBitDepth < 8) 
-      png_set_gray_1_2_4_to_8(png_ptr);
+      png_set_expand_gray_1_2_4_to_8(png_ptr);
     /* all transparency type : 1 color, indexed => alpha channel*/
     if (png_get_valid (png_ptr, info_ptr,PNG_INFO_tRNS)) 
       png_set_tRNS_to_alpha (png_ptr);
@@ -195,7 +196,7 @@
     /* Update the png in order to reach ou out pixels sprcification*/
     png_read_update_info (png_ptr, info_ptr);
     /* get again width, height and the new bit-depth and color-type*/
-    png_get_IHDR (png_ptr, info_ptr, &lw, &lh, 
+    png_get_IHDR (png_ptr, info_ptr, (png_uint_32*)&lw, (png_uint_32*)&lh, 
           &iBitDepth, 
           &iColorType, 
           NULL, NULL, NULL);
@@ -822,7 +823,7 @@
    TtaReadClose (fp);
    if (ret != 8)
       return FALSE;
-   ret = png_check_sig ((png_byte*)buf, 8);
+   ret = !png_sig_cmp ((png_byte*)buf, 0, 8);
    if (ret) return (TRUE);
    return(FALSE);

wxFile.patch

diff -Naur Amaya11.3.1.orig/Amaya/amaya/HTMLedit.c Amaya11.3.1.new/Amaya/amaya/HTMLedit.c
--- Amaya11.3.1.orig/Amaya/amaya/HTMLedit.c    2009-12-09 11:11:22.000000000 +0100
+++ Amaya11.3.1.new/Amaya/amaya/HTMLedit.c    2010-05-20 19:15:22.000000000 +0200
@@ -1689,7 +1689,7 @@
                 {
 #ifdef _WX
                   wxString tmpFile = TtaConvMessageToWX(tempURL);
-                  wxFile::wxFile (tmpFile, wxFile::write);
+                  wxFile (tmpFile, wxFile::write);
 #endif /* _WX */
                 }
             }
diff -Naur Amaya11.3.1.orig/Amaya/thotlib/base/platform.c Amaya11.3.1.new/Amaya/thotlib/base/platform.c
--- Amaya11.3.1.orig/Amaya/thotlib/base/platform.c    2009-12-02 12:23:07.000000000 +0100
+++ Amaya11.3.1.new/Amaya/thotlib/base/platform.c    2010-05-20 19:00:49.000000000 +0200
@@ -329,9 +329,9 @@
     {
       tmp = (char *)TtaGetMemory (strlen(targetFileName)+10);
       sprintf (tmp, "%s.tmp", targetFileName);
-      wxFile::wxFile (targetFile, wxFile::write);
+      wxFile (targetFile, wxFile::write);
       tmpFile = TtaConvMessageToWX(tmp);
-      wxFile::wxFile (tmpFile, wxFile::write);
+      wxFile (tmpFile, wxFile::write);
       result = wxFile::Exists(targetFile);
       if (result)
         result = wxConcatFiles (tmpFile, sourceFile, targetFile);

Offline

#3 2010-05-20 22:57:56

sati
Member
Registered: 2008-03-12
Posts: 22

Re: Building Amaya

Well thanks for the patch, I eventually got it to build, yet upon running the binary it does nothing. Doesn't crash, or eat cpu or anything out of the ordinary..the process starts and just does nothing..nothing in the terminal either, regardless of any flags (--help, --debug, etc) being supplied, peculiar..

Edit: Also noted that starting amaya once creates this hanging process but upon starting a second process the Amaya window briefly opens then closes..and the first processes crashes with the following:

* Amaya: Irrecoverable error ***/usr/bin/amaya: line 11: 13771 Segmentation fault      env XLIB_SKIP_ARGB_VISUALS=1 G_SLICE="always-malloc" $PREFIX/$AMAYA_INSTALLDIR/$AMAYAGUI/bin/amaya_bin "${1+$@}"

And then the second process continues to hang the same as the first one did previously.

Last edited by sati (2010-05-20 23:02:23)

Offline

#4 2010-05-21 10:46:45

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Building Amaya

Exactly the same here. Maybe it is time for an upstream bug report.

Offline

#5 2010-06-25 09:41:12

legolas558
Member
Registered: 2009-09-08
Posts: 97

Re: Building Amaya

broken - we don't have an HTML+CSS editor on Linux sad


.-.   ,---,---.--.
| |__  \ \ \ \`//.
`----'`--'`--'`--'

Offline

#6 2010-09-03 06:19:40

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Building Amaya

I have adopted amaya in the AUR, added all needed patches, and successfully built it, so everything should work now.

So....if the OP is reading this, I guess that would make this thread [SOLVED]. wink

Offline

Board footer

Powered by FluxBB