Bug 292595 - mixer_oss4.cpp fails to compile.
Summary: mixer_oss4.cpp fails to compile.
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: Backend: OSS4 (show other bugs)
Version: 4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 14:47 UTC by Zhang Hongjiu
Modified: 2012-05-20 18:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to clear the error. (621 bytes, patch)
2012-01-27 14:47 UTC, Zhang Hongjiu
Details
fix std::tr1::shared_ptr usage with gcc-4.6.x (905 bytes, patch)
2012-05-12 19:27 UTC, Franz Trischberger
Details
don't crash at shutdown (3.33 KB, application/vnd.lotus-organizer)
2012-05-13 10:05 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhang Hongjiu 2012-01-27 14:47:06 UTC
Created attachment 68238 [details]
Patch to clear the error.

Version:           4 (using KDE 4.8.0) 
OS:                Linux

Here are part of my build.log.

[ 32%] Building CXX object kmix/CMakeFiles/kdeinit_kmixctrl.dir/core/mixer.o
In file included from /var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/backends/kmix-backends.cpp:82:0,
                 from /var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/core/mixer.cpp:31:
/var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/backends/mixer_oss4.cpp: In member function ‘virtual int Mixer_OSS4::open()’:
/var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/backends/mixer_oss4.cpp:433:55: error: no matching function for call to ‘VolumeChannel::VolumeChannel(Volume::ChannelMask)’
/var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/core/volume.h:171:3: note: candidates are: VolumeChannel::VolumeChannel()
/var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/core/volume.h:164:3: note:                 VolumeChannel::VolumeChannel(Volume::ChannelID)
/var/tmp/portage/kde-base/kmix-4.8.0/work/kmix-4.8.0/kmix/core/volume.h:162:1: note:                 VolumeChannel::VolumeChannel(const VolumeChannel&)

I made a patch to clear the error, but am not sure whether it really fixes the problem. I do not know what these variable means.

Reproducible: Always

Steps to Reproduce:
Use OSS4 ebuilds from either oss-overlay or bugzilla, and emerge kmix.


Expected Results:  
It should be compiled correctly.
Comment 1 Franz Trischberger 2012-02-07 13:15:27 UTC
The Patch works. It should be right, too.
VolumeChannel-Constructor need a Volume::ChannelID as first Parameter. Volume::MLEFT comes from Colume::ChannelMask.

I hope this gets fixed in kde-4.8.1.
Comment 2 Christian Esken 2012-03-27 22:11:41 UTC
KMix maintainer speaking: OSSv4 Backend is unmaintained.
I personally haven't checked whether this patch is already applied. Could somebody who uses OSSv4 please take a look. Even better apply it to 4.8 and trunk.
Comment 3 Michael Palimaka 2012-05-12 16:22:05 UTC
(In reply to comment #2)
> I personally haven't checked whether this patch is already applied. Could
> somebody who uses OSSv4 please take a look. Even better apply it to 4.8 and
> trunk.
It's not yet applied. If you approve, I am happy to commit it.
Comment 4 Franz Trischberger 2012-05-12 19:27:07 UTC
Created attachment 71051 [details]
fix std::tr1::shared_ptr usage with gcc-4.6.x

But with recent oss4 (checkout from the mercurial-repo) it just behaves weird. Changing master mixer in kmix changes several other mixers, too. I think it requires more work to get this fixed :(
Comment 5 Franz Trischberger 2012-05-13 10:05:10 UTC
Created attachment 71064 [details]
don't crash at shutdown

Two different shared_ptrs were created on one ptr. This was true even before, so I don't know why it did't crash.
MixerDevice::addToPool() created one, and Mixer_Backend::m_recommendedMaster was another one (through the implicit creation of a new shared_ptr in all those assignments). The patch only creates one shared_ptr through addToPool() and uses it later on.
Comment 6 Christian Esken 2012-05-16 19:55:42 UTC
The shared pointer code is new since 4.8.3. So it likely never worked on ossv4. If you manage to get it to work Franz, please go ahead and apply. The OSSv4 backend doesn't compile right now, so there is not much you could break.
Comment 7 Michael Palimaka 2012-05-17 18:46:22 UTC
I've pushed Franz's patch to master and KDE/4.8:

http://quickgit.kde.org/?p=kmix.git&a=commit&h=380102b7150228b7057bbaae4bc2a73f13d3a9fc

http://quickgit.kde.org/?p=kmix.git&a=commit&h=a0308d01123ec01bf19fd420273907ddf0a9fd6f

(The auto-close email bounced back to me.)
Comment 8 Christian Esken 2012-05-20 18:14:34 UTC
I'll close it then. Thanks, Franz and Michael.