[kde-solaris] Errors building kdemultimedia on SPARC/gcc

Mats Rojestal mats.rojestal at bredband.net
Wed Aug 17 17:09:21 CEST 2005


Hi Daniel,

Try this patch:

Index: mixer_sun.cpp
===================================================================
--- mixer_sun.cpp       (revision 437436)
+++ mixer_sun.cpp       (working copy)
@@ -135,7 +135,7 @@
  // FUNCTION    : Mixer::Mixer
  // DESCRIPTION : Class destructor.
  //======================================================================
-Mixer_SUN::~Mixer_SUN(int devnum) : Mixer_Backend(devnum)
+Mixer_SUN::~Mixer_SUN()
  {
     close();
  }
@@ -159,7 +159,7 @@
     if(audiodev.isNull())
       audiodev = "/dev/audio";
     audiodev += "ctl";
-   if ( ( fd = open( audiodev.data(), O_RDWR ) ) < 0 )
+   if ( ( fd = ::open( audiodev.data(), O_RDWR ) ) < 0 )
     {
        if ( errno == EACCES )
           return Mixer::ERR_PERM;


Regards Mats Röjestål

Daniel Rawson wrote:
> I'm (attempting) to build KDE 3.4.2 on Solaris 8/SPARC using gcc 3.2.2.  Caveat:  I don't know c++ ;-(
> 
> When building kmix from kdemultimedia, I get the following errors:
> 
> First error:
> --------------
> In file included from kmix-platforms.cpp:67,
>                  from mixer.cpp:33:
> mixer_sun.cpp:138: destructors may not have parameters
> mixer_sun.cpp: In destructor `virtual Mixer_SUN::~Mixer_SUN()':
> mixer_sun.cpp:138: `devnum' undeclared (first use this function)
> mixer_sun.cpp:138: (Each undeclared identifier is reported only once for each 
>    function it appears in.)
> mixer_sun.cpp:140: only constructors take base initializers
> mixer_sun.cpp:140: confused by earlier errors, bailing out
> 
> It appears that this can be fixed by changing line 138 of mixer_sun.cpp:
> 
> // Mixer_SUN::~Mixer_SUN(int devnum) : Mixer_Backend(devnum)
> Mixer_SUN::~Mixer_SUN()
> 
> Once that's done, I get another error:
> ---------------------------------------
> In file included from kmix-platforms.cpp:67,
>                  from mixer.cpp:33:
> mixer_sun.cpp: In member function `virtual int Mixer_SUN::open()':
> mixer_sun.cpp:163: no matching function for call to `Mixer_SUN::open(char*, int
>    )'
> mixer_sun.cpp:149: candidates are: virtual int Mixer_SUN::open()
> 
> 
> line 163 of mixer_sun.cpp is:
> 
> if ( ( fd = open( audiodev.data(), O_RDWR ) ) < 0 )
> 
> which looks about as normal as is possible <g>.  #include <fcntl.h> DOES appear at the top of mixer_sun.cpp, so the system "open()" call should be available.
> 
> I guess I'm missing something obvious :-<<
> 
> TIA . . .
> 
> Dan
> 
> 



More information about the kde-solaris mailing list