[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] GramoFile



Mogens Jæger wrote:
> 
> Mogens Kjaer wrote:
> 
> > Det ville måske hjælpe lidt, hvis du fortalte HVILKE fejlmeddelelser,
> > du får.
> >
> > Mogens
> > --
> > Mogens Kjaer, Carlsberg Laboratory, Dept. of Chemistry
> > Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
> > Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
> > Email: sslug@sslug Homepage: http://www.crc.dk
> 
> Hej igen. Så vidt jeg kan se, forløber installationen korrekt indtil følgende
> 'svada':
> gcc -Wall -02 -DTURBO_MEDIAN -DTURBO_BUFFER    -c gramofile.c -o gramofile.o
> gramofile.c:43:  warning:  return type of 'main' is not 'int'
> senere dukker følgende op:
> /usr/include/bits/resource.h:109:  warning:  'RLIM_INFINITY' redefined
> /usr/include/asm/resource.h:25: warning: this is not the location of the
> previous definition
> bplay.c:83: warning: return type of 'main' is not 'int'
> bplay.c:  In function 'main':
> bplay.c:101: warning: implicit declaration of function 'basename'
> bplay.c:101: warning: assignment makes pointer from integer without a cast
> og mere af samme skuffe, alt sluttende men først:
> make [1]: *** [shmbuf.o] Error 1
> make [1]: Leaving directory '/usr/gramofile-1.5/bplaysrc'
> make [1]: *** [makeplay] Error 2
> 
> Jeg arbejder i en konsol (under KDE/RedHat 6.1) - via 'su' + password som
> root.
> 
> Er der i øvrigt en 'smart' måde at kopiere den form for output fra et
> installationsforløb til tekst program/mailprogram som her?

Ja:

make >& make.log

eller:

make >make.log 2>&1

hvis du kører bash.

De fejl, du har skrevet foroven, er kun warnings. Den rigtige fejl
kommer til sidst:

shmbuf.c: In function `initsems':
shmbuf.c:623: cast to union type from type not present in union
shmbuf.c:625: cast to union type from type not present in union
shmbuf.c: In function `cleanupsems':
shmbuf.c:636: cast to union type from type not present in union
shmbuf.c:637: cast to union type from type not present in union

Så må du finde shmbuf.c:

find . -name shmbuf.c -print

Og i linie 623 finder du:

if(semctl(disksemid[i], j, SETVAL, (union semun) disks) == -1)

Det lugter af, at "union semun" ikke findes.

Typisk er dette fordi, man har glemt at include en header fil.

cd /usr/include
grep -r semun *

giver: 

bits/sem.h:   union semun
linux/sched.h:  struct sem_undo *semundo;
linux/sem.h:union semun {
linux/sem.h:asmlinkage int sys_semctl (int semid, int semnum, int cmd,
union semun arg);
pgsql/config.h: * long locks.  For some reason union semun is never
defined in the
pgsql/config.h:/* Set to 1 if you have union semun */

Så kigger man i bits/sem.h:

/* The user should define a union like the following to use it for
arguments
   for `semctl'.

   union semun
   {
     int val;                           <= value for SETVAL
     struct semid_ds *buf;              <= buffer for IPC_STAT & IPC_SET 
     unsigned short int *array;         <= array for GETALL & SETALL
     struct seminfo *__buf;             <= buffer for IPC_INFO
   };

   Previous versions of this file used to define this union but this is 
   incorrect.  One can test the macro _SEM_SEMUN_UNDEFINED to see
whether 
   one must define the union or not.  */
#define _SEM_SEMUN_UNDEFINED    1

AHA!

Altså skal du i starten af shmbuf.c i gramofile-1.5/bplaysrc (efter alle
include sætningerne) skrive:

#ifdef _SEM_SEMUN_UNDEFINED
   union semun
   {
     int val;
     struct semid_ds *buf;
     unsigned short int *array; 
     struct seminfo *__buf; 
   };
#endif

- så virker det.

Mogens

-- 
Mogens Kjaer, Carlsberg Laboratory, Dept. of Chemistry
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: sslug@sslug Homepage: http://www.crc.dk


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:58 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *