You are not logged in.

#1 2006-11-07 13:54:14

dmtry
Member
From: Maa
Registered: 2006-11-07
Posts: 12

effectv don't compile. error: conflicting types for 'trunc'

hello all.
i'm full newbie, so please, be kind smile

I try to install effectv from AUR, but when i try to 'make' - i receive error:

error: conflicting types for 'trunc' 

then i download sources and try to compile them - and again receive this error.
Please advice, what should i do to correct this error?

Thank you and sorry for my english.

Offline

#2 2006-11-07 14:35:31

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: effectv don't compile. error: conflicting types for 'trunc'

message deleted, forum was screwing up the code....
redone in next message

Offline

#3 2006-11-07 15:05:56

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: effectv don't compile. error: conflicting types for 'trunc'

Please contact the author of the PKGBUILD to have it changed in the AUR. This fixes your issues:

PKGBUILD

# Contributor: Luiz Ribeiro <luizribeiro>

pkgname=effectv
pkgver=0.3.11
pkgrel=1
pkgdesc="EffecTV is a real-time video effector. You can watch TV or video through amazing effectors."
url="http://effectv.sourceforge.net/"
depends=('sdl')
makedepends=('nasm')
conflicts=()
license=
install=
source=('http://jaist.dl.sourceforge.net/sourceforge/effectv/effectv-0.3.11.tar.gz'  
    'gcc.patch' 'timedist.patch')
md5sums=('71570b71009df0f1ff53e31de6f50cee')

build() {
    cd $startdir/src/$pkgname-$pkgver

     patch -Np0 < $startdir/src/gcc.patch || return 1       
    patch -Np0 < $startdir/src/timedist.patch || return 1

    sed -i -e 's_/usr/local_/usr_g' config.mk

    make || return 1
    mkdir -p $startdir/pkg/usr/bin
    mkdir -p $startdir/pkg/usr/man/man1
    make install INSTALL=/bin/install -c DESTDIR=$startdir/pkg || return 1
}

gcc.patch : fixes compile problem

--- utils.c.orig    2006-02-14 15:06:17.000000000 +0100
+++ utils.c    2006-08-30 22:47:19.514145536 +0200
@@ -26,7 +26,7 @@
 /*
  * HSI color system utilities
  */
-static int trunc(double f)
+static int trunc_color(double f)
 {
     int i;
 
@@ -44,9 +44,9 @@
     Gv=1+S*sin(H);
     Bv=1+S*sin(H+2*M_PI/3);
     T=255.999*I/2;
-    *r=trunc(Rv*T);
-    *g=trunc(Gv*T);
-    *b=trunc(Bv*T);
+    *r=trunc_color(Rv*T);
+    *g=trunc_color(Gv*T);
+    *b=trunc_color(Bv*T);
 }
 
 /*

timedist.patch : fixes bug

This is a quick fix for bugs of effectv-0.3.11. TimeDistortion has a border
crossing bug and a buffer uninitializing bug.

Index: effects/timedist.c
===================================================================
--- effects/timedist.c    (revision 478)
+++ effects/timedist.c    (working copy)
@@ -27,7 +27,16 @@
 static int plane;
 static int *warptime[2];
 static int warptimeFrame;
+static int bgIsSet;
 
+static int setBackground(RGB32 *src)
+{
+    image_bgset_y(src);
+    bgIsSet = 1;
+
+    return 0;
+}
+
 effect *timeDistortionRegister(void)
 {
     effect *entry;
@@ -70,6 +79,7 @@
 
     plane = 0;
     image_set_threshold_y(MAGIC_THRESHOLD);
+    bgIsSet = 0;
 
     state = 1;
     return 0;
@@ -94,6 +104,9 @@
     int *p, *q;
 
     memcpy(planetable[plane], src, PIXEL_SIZE * video_area);
+    if(!bgIsSet) {
+        setBackground(src);
+    }
     diff = image_bgsubtract_update_y(src);
 
     p = warptime[warptimeFrame    ] + video_width + 1;
@@ -109,7 +122,7 @@
         q += 2;
     }
 
-    q = warptime[warptimeFrame ^ 1] + video_width + 1;
+    q = warptime[warptimeFrame ^ 1];
     for(i=0; i<video_area; i++) {
         if(*diff++) {
             *q = PLANES - 1;

Offline

#4 2006-11-12 03:17:40

dmtry
Member
From: Maa
Registered: 2006-11-07
Posts: 12

Re: effectv don't compile. error: conflicting types for 'trunc'

thank you, but:

==> Making package: effectv 0.3.11-1 (Sun Nov 12 09:04:56 MSK 2006)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Found effectv-0.3.11.tar.gz in build dir
==>     Found gcc.patch in build dir
==>     Found timedist.patch in build dir
==> WARNING: MD5sums are missing or incomplete.  Cannot verify source integrity.
==> Extracting Sources...
==>     tar --use-compress-program=gzip -xf effectv-0.3.11.tar.gz
==> Removing existing pkg/ directory...
==> Starting build()...
missing header for unified diff at line 3 of patch
patching file utils.c
Hunk #1 succeeded at 26 with fuzz 2.
Hunk #2 FAILED at 44.
1 out of 2 hunks FAILED -- saving rejects to file utils.c.rej
==> ERROR: Build Failed.  Aborting...

and i can not correct it

Offline

#5 2006-11-14 23:51:29

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: effectv don't compile. error: conflicting types for 'trunc'

ic, somehow the patches got corrupted, I will give a direct link for the above two, save them under the the correct names:
timedist.patch:
http://mirror.phy.olemiss.edu/mirror/ge … dist.patch

gcc.patch:
http://mirror.phy.olemiss.edu/mirror/ge … sion.patch

md5sums=('71570b71009df0f1ff53e31de6f50cee' '4c00dd78d8176537b7b674714fc6ad17'
         'b2119be4d4f1c4de2ef1e812882b07c1')

Offline

Board footer

Powered by FluxBB