From owner-freebsd-hackers Sun Sep 2 3:46:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from loops.nilpotent.org (loops.nilpotent.org [12.17.163.70]) by hub.freebsd.org (Postfix) with SMTP id 51BBF37B403 for ; Sun, 2 Sep 2001 03:46:02 -0700 (PDT) Received: (qmail 61136 invoked from network); 2 Sep 2001 10:45:55 -0000 Received: from unknown (root@63.100.203.228) by loops.nilpotent.org with QMTP; 2 Sep 2001 10:45:55 -0000 Received: (qmail 800 invoked by uid 500); 2 Sep 2001 10:43:44 -0000 To: freebsd-hackers@freebsd.org Subject: .so and threads, and stereo /dev/dsp, freebsd 4.3-stable. From: fn@hungry.org (Faried Nawaz) Organization: Integral Domains Date: 02 Sep 2001 15:43:21 +0459 Message-ID: Lines: 50 User-Agent: Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I checked out quakeforge (http://www.quakeforge.net/) from their cvs tree, and tried building it on FreeBSD yesterday. It mostly worked, but I ran into two odd problems. Quakeforge uses plugins to handle sound; there is an OSS plugin for the normal system sound libs, and an SDL plugin if you have libsdl installed. It can also build other plugins (there are ones for ALSA, SGI, etc) depending on one's platform. When I build sdl from ports, its configure script sees that it can use gcc -thread, and builds libsdl with threads support. The downside is that I need to use libc_r when I link against other apps. When quakeforge builds a .so for its sdl sound plugin, it uses something like "gcc -thread -shared ... -o libsound_sdl.so"; which all nice and good, except it doesn't pull in libc_r. So, when quakeforge runs with the sdl sound plugin, it complains about not being able to find the pthread_cond_wait symbol. Is there something special I need to do to make gcc link with -lc_r for gcc -shared -thread code? Next: the OSS plugin builds but doesn't seem to work properly. At some point, it tries to set /dev/dsp to stereo, and fails: tmp = 0; if (shm->channels == 2) tmp = 1; rc = ioctl (audio_fd, SNDCTL_DSP_STEREO, &tmp); if (rc < 0) { perror (snd_dev); Con_Printf ("Could not set %s to stereo=%d", snd_dev, shm->chann els); close (audio_fd); return 0; } I have a Creative 128 card which identifies itself as pcm0: port 0x6800-0x683f irq 10 at device 10.0 on pci0 What can I do here to make quakeforge use the sound card? Faried. -- "...the first are last, the blessed get wired the best is yet to come..." self name. superstar! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message