• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Installationsprobleme mit Programm

Ironman

Newbie
Hey!
Ich bräuchte mal eure Hilfe mich treibt die Installation eines Programms zu Weisglut ! Für die BioTools benötigt man laut Installationsanleitung ein GUI Programm namens 'Kaptain'. Leider ist es mir nicht gelungen dieses kleine Programm zu installieren, da es ständig irgendwelche Fehlermeldungen ausspuckt, die ich nicht verstehe und interpretieren kann.
'./configure' läuft einwandfrei und ohne Murren durch. Bei Ausführung von 'make' kommt dann folgende Ausgabe auf der Konsole.

Code:
linux:/home/Ironmike/kaptain-0.71 # make
make  all-recursive
make[1]: Entering directory `/home/Ironmike/kaptain-0.71'
Making all in doc
make[2]: Entering directory `/home/Ironmike/kaptain-0.71/doc'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/Ironmike/kaptain-0.71/doc'
Making all in examples
make[2]: Entering directory `/home/Ironmike/kaptain-0.71/examples'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/Ironmike/kaptain-0.71/examples'
Making all in kaptain
make[2]: Entering directory `/home/Ironmike/kaptain-0.71/kaptain'
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/qt/include -I/usr/X11R6/include  -D_REENTRANT  -O2 -fno-exceptions -fno-check-new  -c intermediate.cpp
intermediate.h:49: error: ISO C++ forbids declaration of ‘Kaptain’ with no type
intermediate.h:49: error: expected ‘;’ before ‘*’ token
intermediate.cpp: In constructor ‘Intermediate::Intermediate(Intermediate*)’:
intermediate.cpp:27: error: ‘my_kaptain’ was not declared in this scope
intermediate.cpp: In member function ‘std::string Intermediate::evaluate_special()’:
intermediate.cpp:245: error: ‘my_kaptain’ was not declared in this scope
intermediate.cpp: In member function ‘int Intermediate::get_selected_child()’:
intermediate.cpp:259: error: ‘class Intermediate’ has no member named ‘my_kaptain’
intermediate.cpp:260: error: ‘class Intermediate’ has no member named ‘my_kaptain’
intermediate.cpp:267: error: ‘my_kaptain’ was not declared in this scope
intermediate.cpp: In member function ‘int Intermediate::get_selected_checkbox()’:
intermediate.cpp:278: error: ‘my_kaptain’ was not declared in this scope
intermediate.cpp: In member function ‘void Intermediate::recieve(std::string)’:
intermediate.cpp:589: error: ‘my_kaptain’ was not declared in this scope
intermediate.cpp:629: error: ‘my_kaptain’ was not declared in this scope
make[2]: *** [intermediate.o] Fehler 1
make[2]: Leaving directory `/home/Ironmike/kaptain-0.71/kaptain'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/Ironmike/kaptain-0.71'
make: *** [all-recursive-am] Fehler 2
linux:/home/Ironmike/kaptain-0.71 #

Die Leute die ich bisher gefragt habe, wissen auch nichts damit anzufangen.
Dateien mit dem Namen kaptain.h und kaptain.cpp existieren.
Ich häng auchmal die Dateien intermediate.h und *.cpp an denn anscheinend spinnt er deswegen rum.
Ich wäre echt froh wenn mir da irgendjemand weiterhelfen könnte denn ich bin mit meinem eh schon sehr kleinem Latein schon am Ende.

Hier ist noch die Page von Kaptain http://kaptain.sourceforge.net/
Und bevor ihr fragt, Ja ich hab das Alternative Makefile auch getestet und es geht nicht. Die Installation die ich machen will findet man unter
http://userpage.fu-berlin.de/~sgmd/emboss-installation.html
Ich hab das ganze auch schonmal probiert mit entsprechenden *.rpm Files für Kaptain nur da sagt er mir dann, dass ihm irgendwelche Packages fehlen, was nicht sein kann da ich ALLES installiert habe !

Btw ich hab SuSe 10 und jedes mögliche Sch* Package installiert.
Danke schonmal !

Intermediate.cpp
Code:
#include "intermediate.h"
#include "grammar.h"
#include <iostream>
#include <sstream>
#include <assert.h>
#include <sys/types.h>
#include "kaptain.h"
#include <stdio.h>

extern char * special_names[];
extern char * modifier_names[];
extern int two_power[];
extern int extra_modifier_num;
extern int glob_parse_result;
extern list<Parameter *> * glob_param_list;
extern Parameter * glob_init_value;
extern int glob_parse_result;
extern void yy_scan_string(const char *);
extern int yyparse();


Intermediate::Intermediate(Intermediate * f)
{
  type=0;
  father=f;
  my_rule=0;
  my_kaptain=0;
  child_num=0;
  grammar=0;
  modifiers=0;
}


Intermediate::~Intermediate()
{
  list<Intermediate *>::iterator ip;
  for (ip=children.begin();
       ip!=children.end();
       ip++)
    if (*ip)
      delete *ip;
}


bool Intermediate::is(int i)
{ 
  bool result=(modifiers & i);
  //cout << "IS " << modifiers << " & " << i << " = " << result << endl;
  return result; 
  //return modifiers & i;
}


bool Intermediate::create_from(Grammar * gr, Rule * r)
{
  grammar=gr;
  my_rule=r;
  if (my_rule==0) return false;

  if (my_rule->my_intermediate) return false;

  my_rule->my_intermediate=this;

  if (my_rule->type > 0)
    {
      /* special symbol */
      type=SPEC;
      spec_type=my_rule->type;
    }
  else
    {
      assert(my_rule->disjunction!=0);

      /* a rule of a nonterminal */
      if (my_rule->disjunction->conjunctions.size()>1)
        {
          type=DISJ;
          list<Conjunction *>::iterator ci;
          for (ci=my_rule->disjunction->conjunctions.begin();
               ci!=my_rule->disjunction->conjunctions.end();
               ci++)
            if (*ci)
              {
                Intermediate * child=new Intermediate(this);
                child->type=CONJ;
                child->grammar=grammar;
                child->create_from_conjunction(*ci);
                children.push_back(child);
              }
          child_num=children.size();
               
        }
      else if (my_rule->disjunction->conjunctions.size()==1)
        {

          type=CONJ;
          Conjunction * only_child;
          only_child=*(my_rule->disjunction->conjunctions.begin());
          create_from_conjunction(only_child);
        }
      else type=INVALID;
    }

  textinfo[0]=my_rule->textinfo[0];
  textinfo[1]=my_rule->textinfo[1];  
  textinfo[2]=my_rule->textinfo[2];

  modifiers=my_rule->mods;

  if (type==INVALID)
    cerr << "INVALID Intermediate Object." << endl;

  return true;
}


void Intermediate::create_from_conjunction(Conjunction * c)
{
  //c->is_default;

  list<int>::iterator ii;
  for (ii=c->symbols.begin();
       ii!=c->symbols.end();
       ii++)
    if (*ii<0) /* only nonteminals */
      {
        Rule * child_rule=grammar->get_rule(*ii);
        if (child_rule)
          {
            Intermediate * child=new Intermediate(this);
            /* throw INVALID children */
            if (child->create_from(grammar, child_rule))
              children.push_back(child);
            else
              delete child;
          }
      }
            
      child_num=children.size();
}


void Intermediate::print(int tab)
{
  for (int i=0; i<tab; i++)
    cout << "  ";
  if (type==SPEC)
    cout << "SPEC " << special_names[spec_type-1] << " ";
  if (type==DISJ)
    cout << "DISJ ";
  if (type==CONJ)
    cout << "CONJ ";
  if (type==INVALID)
    cout << "INVALID ";
  if (my_rule && my_rule->get_left()!=0)
    cout << grammar->broker.get_string(my_rule->get_left()) << " ";
  else if (my_rule) 
    cout << "0 ";
  else
    cout << "NULL ";
  cout << children.size() << " ";
  if (! textinfo[0].empty()) 
    cout << textinfo[0] << " " << modifiers << " ";

  for (int i=0; i<extra_modifier_num; i++)
    if (modifiers & two_power[i])
      cout << modifier_names[i] << " ";

  cout << endl;

  list<Intermediate *>::iterator ii;
  for (ii=children.begin();
       ii!=children.end();
       ii++)
    if (*ii)
      (*ii)->print(tab+1);


}


bool Intermediate::empty()
{
  if (type==SPEC || type==DISJ) return false;

  if (children.size()==0)
    return textinfo[0].empty();
  
  list<Intermediate *>::iterator ii;
  for (ii=children.begin();
       ii!=children.end();
       ii++)
    if (*ii && !((*ii)->empty()))
      return false; /* has a nonempty child */
  
  /* all children are empty */
  return true;
}


/* get intermediate for a given rule */
Intermediate * Intermediate::get_intermediate(int nt)
{
  Rule * r=grammar->get_rule(nt);
  return r ? r->get_intermediate() : 0;
}


string Intermediate::evaluate_nonterminal(int nt, 
                                          bool consider_noeval)
{
  return grammar->evaluate_nonterminal(nt, consider_noeval);
}

string Intermediate::get_name()
{
  string s;
  if (my_rule && my_rule->get_left()!=0)
    s=grammar->broker.get_string(my_rule->get_left());
  return s;
}


bool Intermediate::is_default_widget()
{
  if (grammar->was_default_widget_done)
    return false;
  grammar->was_default_widget_done=true;
  return true;
}


int Intermediate::get_default_selection()
{
  int sel=0;
  if (my_rule && type==DISJ)
    sel=my_rule->get_default_selection();
  return sel;
}


string Intermediate::evaluate_special()
{
  string s;
  if (my_kaptain)
    s=my_kaptain->evaluate_special();
  return s;
}


int Intermediate::get_selected_child()
{
  list<Intermediate *>::iterator child;
  int selected=0;
  if (is(is_radioparent))
    {
      for (child=children.begin(); child!=children.end(); child++)
        {
          if ((*child)->my_kaptain 
				  && (*child)->my_kaptain->radio_is_selected())
            break;
          selected++;
        }
      if (child==children.end()) selected=0;
    }
  else
	 if (is(is_stack) && my_kaptain)
		{
		  selected=my_kaptain->get_selected_page();
		}
 return selected;
}


int Intermediate::get_selected_checkbox()
{
  int i=0;
  if (is(is_checkbox) && my_kaptain)
    i=my_kaptain->get_check_selected();
  return i;
}


int Intermediate::get_current_selection()
{
  return is(is_radioparent) || is(is_stack) ? 
	 get_selected_child() : get_selected_checkbox();
}


/* handling parameters */
/* No 0 : initial value */
/* No 1,2,... : parameters specified in parentheses */
/* If `glob_parse_result' is 1, `glob_param_list' and `glob_init_value'
   are regarded */
Parameter * Intermediate::get_parameter(int n)
{
  Parameter * par=0, * _initvalue=0;
  list<Parameter *> * _parameters=0;

  if (glob_parse_result==0 && my_rule)
    {
      _initvalue=my_rule->initvalue;
      _parameters=my_rule->parameters;
    }
  else
    if (glob_parse_result==1)
      {
        _initvalue=glob_init_value;
        _parameters=glob_param_list;
      }

  if (is_special() && my_rule && n>=0)
    {
      if (n==0)
        par=_initvalue;
      else if (_parameters) {
        int i=0;
        list<Parameter *>::iterator pp=_parameters->begin();
        while (pp!=_parameters->end()) {
          i++;
          if (i==n) {
            par=*pp;
            break;    
          }
          pp++;
        }
      }
    }
  return par;
}


int Intermediate::get_parameter_num()
{
  int result=0;
  if (is_special())
    if (glob_parse_result==0 && my_rule && my_rule->parameters)
      result=my_rule->parameters->size();
    else if (glob_parse_result==1 && glob_param_list)
      result=glob_param_list->size();
  return result;
}


bool Intermediate::parameter_type(int n, int ptype)
{
  Parameter * par=get_parameter(n);
  return  (par && par->type==ptype);
}


int Intermediate::get_int_parameter(int n)
{
  Parameter * par=get_parameter(n);
  int result = (par && par->type==T_NUMERAL || par->type==T_NONTERM) 
    ? par->value : -1;
  return result;
}


string Intermediate::get_string_parameter(int n)
{
  Parameter * par=get_parameter(n);
  string s = (par && (par->type==T_STRING || par->type==T_REGEXP)) 
    ? par->data : string() ;
  int size = s.size();
  if (size>1 && s[size-1]=='\n')
	 s.erase(size-1);
  return s;
}


void Intermediate::get_subst_parameter(int n, 
                                       string & pattern, 
                                       string & replacement, 
                                       bool & global_flag)
{
  Parameter * par=get_parameter(n);
  if (par)
    {
      pattern=par->data;
      replacement=par->data2;
      global_flag=par->value==1;
    }
}


void Intermediate::transduce()
{
  transduce_1();
  transduce_2();
}


void Intermediate::transduce_1()
{
  /* BOTTOM-UP */

  bool xis_framed=false;

  list<Intermediate *>::iterator ii;
  for (ii=children.begin();
       ii!=children.end();
       ii++)
    if (*ii) 
      {
        (*ii)->transduce_1();

        /* upspread SPEC rule
        if (children.size()==1 && (*ii)->is_special())
          {
            type=(*ii)->type;
            spec_type=(*ii)->spec_type;            
            delete *ii;
            *ii=0;
            break;
            inkabb a nagyapatol kellene -
          }
        */

        /* FIXME !!!!!!!!!!!! */
        /* get selection information before killing! */

        /* 1) transfer framing data to children */
        if (is(is_framed)) 
          {
            xis_framed=true;
            (*ii)->modifiers|=2; // framed;
          }

        if ((*ii)->children.size()==1 && (*ii)->my_rule==0)
          {
            Intermediate * zombie=*ii;
            *ii=*(zombie->children.begin());
				(*ii)->father=zombie->father;
            zombie->children.clear();
            delete zombie;
          }
        else
          if ((*ii)->children.size()==0 && (*ii)->my_rule==0)
            {
              Intermediate * zombie=*ii;
              *ii=0;
              delete zombie;
            }
      }

  if (xis_framed)            
    modifiers^=2; // framed
  children.remove(NULL);
}


void Intermediate::transduce_2()
{
  /* TOP-DOWN */

  /* remove :stack if not in disjunction */
  if (is(is_stack) && (!is_disjunction()
							  || is(is_tree)))
	 modifiers^=is_stack;

  if (is_disjunction() && !is(is_stack) && children.size()<=1)
    if (child_num<3)
      modifiers|=is_checkbox; // checkbox
    else
      modifiers|=is_checkbox | is_tristate;

  list<Intermediate *>::iterator ii;
  bool has_spec_child=false;
  for (ii=children.begin();
       ii!=children.end();
       ii++)
    if (*ii) 
      {
		  if ((*ii)->is_special()) has_spec_child=true;
		}

  /* remove :tree from direct specials */
  if (is(is_tree) && has_spec_child)
	 modifiers^=is_tree;

  int empty_child=0;
  for (ii=children.begin();
       ii!=children.end();
       ii++)
    if (*ii) 
      {
        if ((*ii)->empty()) empty_child++;
		  if ((*ii)->is_special()) has_spec_child=true;

        /* `@integer' and `:beside' special case */
        if (children.size()==1 &&
            (*ii)->is_special() && (*ii)->spec_type==1) // @integer
          (*ii)->modifiers|=(is(is_beside) 
                             ? is_right_aligned :
                               is_left_aligned);
          
        /* get label for a frame */
        if (is(is_framed) && children.size()==1 && textinfo[0].empty())
          {
            textinfo[0]=(*ii)->textinfo[0];
            (*ii)->textinfo[0]=string();
          }

        /* spread :detailed in a tree */
        if (is(is_tree) && is(is_detailed))
          (*ii)->modifiers|=is_detailed; // spread 'is_detailed'

        /* radio & checkbox work */
        if (is_disjunction())
          {
				if (is(is_stack))
				  modifiers|=is_stack;
				else if (children.size()>1 /*|| child_num>3 */)
              {
                modifiers|=is_radioparent;
                (*ii)->modifiers|=is_radio; // radio
              }
            else if (children.size()==1)
              {
                modifiers|=is_checkbox; // checkbox

                if (textinfo[0].empty())
                  {
                    textinfo[0]=(*children.begin())->textinfo[0];
                    (*children.begin())->textinfo[0]=string();
                  }
              }                      
          }

        (*ii)->transduce_2();
      }


  /*
  if (children.size()==3 && is(is_radioparent) 
      && (empty_child==2 && !(children.front()->empty())
          || empty_child==3))
    {
      modifiers|=is_tristate;
      modifiers^=is_radioparent;
      list<Intermediate *>::iterator ii;
      for (ii=children.begin();

           ii!=children.end();
           ii++)
        if (*ii) 
          {
            (*ii)->modifiers^=is_radio;
          }
    }
  */
}




void Intermediate::send(string message, char separ)
{
  if (is_special() && father)
    /* send throuh SPEC's father */
    father->send(message);
  else if (my_rule)
	 if (separ!=0)
    /* send directly */
		my_rule->send(separ+message);
	 else
		my_rule->send(message, false);
}


void Intermediate::recieve(string message)
{
  if (children.size()==1 &&
      children.front()->is_special())
    /* process at the SPEC child */
    children.front()->recieve(message);
  else
    {
      /* process here */
      if (is_special())
        {
          yy_scan_string(message.c_str());
          glob_parse_result=-1;
          glob_param_list=0;
          glob_init_value=0;
          if (yyparse()==0 && glob_parse_result==1 && my_kaptain)
            {
              /* save old parameters, initvalue */

              /* reset the widget */
              my_kaptain->create_special();

              /* restore old parameters, initvalue 
                 if the new ones are 0 */
              my_rule->set_special(0, glob_param_list, 
                                   glob_init_value);

              glob_parse_result=0; 
              glob_init_value=0;
              glob_param_list=0;
              // get_parameter now works again
              // on my_rule's params

            }
          /* garbage collection */
          if (glob_init_value)
            delete glob_init_value;
          if (glob_param_list)
            {
              list<Parameter *>::iterator pi;
              for (pi=glob_param_list->begin();
                   pi!=glob_param_list->end();
                   pi++)
                if (*pi)
                  delete (*pi);
              delete glob_param_list;
            }
        }
		else /* not special */
		  if (type==DISJ && message[0]=='=')
			 if (message[1]!='\r' && message[1]!='\n')
				{
				  int res=0;
				  if (sscanf(message.c_str()+1,"%d",&res)==1)
					 {
						my_kaptain->select_it(res);
					 }
				}
			 else
				{
				  int res=0;
				  ostringstream reply;
				  res=get_current_selection();
				  reply << res;
				  send(reply.str(),'=');				  
				}
    }

}

intermediate.h
Code:
#ifndef INTERMEDIATE__HH
#define INTERMEDIATE__HH

#include <list>
#include <string>

using namespace std;

class Grammar;
class Rule;
class Conjunction;
class Parameter;

#define INVALID 0
#define DISJ 1
#define CONJ 2
#define SPEC 3

#define is_tabbed     1
#define is_framed     2
#define is_horizontal 4
#define is_wizard     8
#define is_subdialog  16
#define is_reverse    32
#define is_noeval     64
#define is_double     128
#define is_beside     256
#define is_tree       512
#define is_detailed   1024
#define is_stack      2048
#define is_checkbox   4096
#define is_tristate   8192
#define is_radioparent 16384
#define is_left_aligned 32768
#define is_right_aligned 65536
#define is_radio      131072

class Intermediate
{
  friend class Kaptain;
  friend class Rule;

  list<Intermediate *> children;
  Intermediate * father;
  int type;
  int child_num; // before deleting some...

  Rule * my_rule;
  Kaptain * my_kaptain;
  Grammar * grammar;

  string textinfo[3];
  int spec_type;
  int modifiers;

public:
  Intermediate(Intermediate *);
  ~Intermediate();

  bool is_disjunction() { return type==DISJ; }
  bool is_conjunction() { return type==CONJ; }
  bool is_special()     { return type==SPEC; }

  bool is(int i);

  bool empty();

  /* interface to grammar */
  Intermediate * get_intermediate(int);
  string evaluate_nonterminal(int, bool);
  string get_name();
  bool is_default_widget();
  int get_default_selection();

  /* interface to kaptain */
  int get_selected_child();
  int get_selected_checkbox();
  int get_current_selection();
  string evaluate_special();

  /* parameters and initvalue */
  Parameter * get_parameter(int);
  int get_parameter_num();
  bool parameter_type(int, int);
  int get_int_parameter(int);
  string get_string_parameter(int);
  void get_subst_parameter(int, string &, string &, bool &);

  bool create_from(Grammar *, Rule *);
  void create_from_conjunction(Conjunction *);

  void transduce();
  void transduce_1();  
  void transduce_2();

  void print(int);

  void recieve(string);
  void send(string message, char separ=':');
};

#endif // INTERMEDIATE__HH
 

admine

Ultimate Guru
Ich hab das ganze auch schonmal probiert mit entsprechenden *.rpm Files für Kaptain nur da sagt er mir dann, dass ihm irgendwelche Packages fehlen, was nicht sein kann da ich ALLES installiert habe !
Aber evt. in falscher Version ?
Btw. ist das rpm auch ein rpm für SuSE ?
 
OP
I

Ironman

Newbie
ja laut der seite wo ich downgeloadet habe ist es für
Suse 10.0 also genau für die Version die ich installiert hab
 

konqui

Hacker
hallo,

meinst du dieses programm ?
-> http://kaptain.sourceforge.net/

wenn ja:

http://kaptain.sourceforge.net/ schrieb:
Release 0.72 is compatible with Qt 3.3 and gcc-3.3.

suse10:~ # rpm -qa |grep gcc
gcc-c++-4.0.2_20050901-3
libgcc-4.0.2_20050901-3
gcc-4.0.2_20050901-3

IMHO wuerde ich sagen, das du fuer das programm eine andere version des c-kompilers brauchst.
 
Oben