This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Build fails in ossaudiodev.c with missing macros
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gward Nosy List: akuchling, danielparks, gward
Priority: normal Keywords:

Created on 2003-10-29 09:05 by danielparks, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sf-832236.patch gward, 2004-05-05 01:56 #ifdef out the problematic values
Messages (5)
msg18794 - (view) Author: Daniel Parks (danielparks) Date: 2003-10-29 09:05
I'm building Python 2.3.2 with no configure flags on MkLinux 
Pre-R1. uname -a:

Linux gondor.middle.earth 2.0.37-osfmach3 
GENERIC_08alpha-20 Fri Jul 30 11:07:38 PDT 1999 ppc 
unknown

The missing macros are: 
SOUND_MIXER_DIGITAL1, SOUND_MIXER_DIGITAL2, 
SOUND_MIXER_DIGITAL3, SOUND_MIXER_PHONEIN, 
SOUND_MIXER_PHONEOUT, SOUND_MIXER_VIDEO, 
SOUND_MIXER_RADIO, SOUND_MIXER_MONITOR, 
SNDCTL_DSP_GETODELAY

I commented out two lines in setup.py and it seems to have 
built correctly. I would test it, but I need to go to bed, and I 
will forget to add this bug tomorrow.

I will update this if Python actually works.
msg18795 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-12-23 19:21
Logged In: YES 
user_id=11375

The fix is probably straightforward; add #ifdef <macro>...#endif
around each use of the problematic macros.  If you do this, please 
submit a patch.
msg18796 - (view) Author: Greg Ward (gward) (Python committer) Date: 2004-05-05 01:56
Logged In: YES 
user_id=14422

Attached patch should fix the problem; I've emailed it to
the original reporter to verify that it does.  Will
checkin/merge/close slip when I hear from him, or in a few
days if I don't hear from him.
msg18797 - (view) Author: Daniel Parks (danielparks) Date: 2004-05-08 23:57
Logged In: YES 
user_id=317142

Compiled Python 2.3.3 with the attached patch (sf-832236.patch). The 
build was successful. This is all I really wanted.

[daniel@gondor Python-2.3.3]$ sudo ./python Lib/test/
test_ossaudiodev.py
Password:
playing test sound file...
elapsed time: 5.4 sec
Traceback (most recent call last):
  File "Lib/test/test_ossaudiodev.py", line 124, in ?
    test()
  File "Lib/test/test_ossaudiodev.py", line 122, in test
    test_setparameters()
  File "Lib/test/test_ossaudiodev.py", line 87, in test_setparameters
    raise RuntimeError("unable to set audio sampling parameters: "
RuntimeError: unable to set audio sampling parameters: you must have 
really weird audio hardware

I had to run the test as root because /dev/dsp was not accessible by 
other users.

The audio clip played, but completely was unintelligible -- it sounded like 
a mistuned radio.

This is the same machine as above; it is a PowerMac 7200/75, with 
whatever sound hardware is on the motherboard. I know that esound 
works properly on a PowerMac 6100/66 (which probably has similar 
audio hardware), but this is not nearly important enough for me to 
pursue. However, I am happy to test any patches.
msg18798 - (view) Author: Greg Ward (gward) (Python committer) Date: 2004-05-11 01:35
Logged In: YES 
user_id=14422

OK, that's good enough -- I was just concerned about
breaking the build, not about getting audio working under an
obsolete version of Linux on ancient hardware.

Fixed in Modules/ossaudiodev.c rev 1.34.8.1 (release23-maint
branch) and rev 1.35 (trunk).
History
Date User Action Args
2022-04-11 14:56:00adminsetgithub: 39471
2003-10-29 09:05:21danielparkscreate