ogle-0.9.2.tar.gz compiling problem on linux FC4 and quick fix.

stephen <[email protected]> Thu, 29 Sep 2005 12:24:42 +0800
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
Hi
I just got ogle compiled on both my computers and it seems to work great,
a big thankyou to all developers for this.

I had a compile error with
ogle-0.9.2.tar.gz
which i had to fix to get it to compile is all
am not that clued up on these problems but details are below
My two systems are a latop and a desktop both running FC4
Laptop System Dell PrecisionM60 running Fedora core 4 with P4 centrino 2ghz
and NVidia QuadroFX Go1000 graphics.

Desktop System Fedora core 4 with P4 2.6ghz ATI9200 graphics card.

compile environment version
 >gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--enable-checking=release --with-system-zlib --enable-__cxa_atexit 
--disable-libunwind-exceptions --enable-libgcj-multifile 
--enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk 
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre 
--host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)

I downloaded and unzipped the
ogle-0.9.2.tar.gz file and ran
 >./configure
 >make

the error was in file ac3dec_wrap.c
the compiler complained about the pointer variable
char *program_name
was allready declared in file
debug_print.h
so i shifted the real declaration line in
ac3dec_wrap.c
to before the include statement for debug_print.h
it compiled happily after this.
Please see section of ac3dec_wrap.c below which i had to adjust.

Regards Steve.

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/shm.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>

#ifndef SHM_SHARE_MMU
#define SHM_SHARE_MMU 0
#endif

#include <ogle/msgevents.h>

static char *program_name;
/// stephen shifted this statement to here as otherwise it complains about/
/// program_name allready being declared in debug_print.h  and /
/// stops compiling/

#include "debug_print.h"
#include "common.h"
#include "queue.h"
#include "timemath.h"
#include "sync.h"
static int get_q();
static int attach_ctrl_shm(int shmid);
static int attach_stream_buffer(uint8_t stream_id, uint8_t subtype, int shmid);

static void handle_events(MsgEventQ_t *q, MsgEvent_t *ev);
/// removed by stephen 
// static char *program_name;/

static FILE *outfile;

static int ctrl_data_shmid;
static ctrl_data_t *ctrl_data;
static ctrl_time_t *ctrl_time;

the rest of the file is unchanged.