in examples/sndfile-play.c there are three function calls that should be replaced. Reproducible: Always Steps to Reproduce: compile libsndfile with OSS installed and the correct soundcard.h file being used... NOT the one that ships with the kernel. the one from 4front technologies. Actual Results: compile error. Expected Results: compile.
Created attachment 115750 [details, diff] a patch that replaces the bad function calls with correct ones. it compiles fine. Also look at the part in the ebuild I attached as well to make sure ALSA users don't get this.
Created attachment 115751 [details] ebuild for sndfile-play.patch checks if user has alsa flag or not and then applies patch if they don't. see the unpack section
(In reply to comment #0) > NOT the one that ships with the kernel. the one from 4front technologies. ??? Post the compile errors plus emerge --info. (No idea what 'correct soundcard.h from 4front technologies' are you talking about; note that we don't support stuff that's not in portage, so if that's your problem, you'll need to take this to 4front technologies or whoever it is.)
Here is some of the error. sion-script=./Symbols.linux -Wl,-soname -Wl,libsndfile.so.1 -o .libs/libsndfile.so.1.0.17 (cd .libs && rm -f libsndfile.so.1 && ln -s libsndfile.so.1.0.17 libsndfile.so.1) (cd .libs && rm -f libsndfile.so && ln -s libsndfile.so.1.0.17 libsndfile.so) rm -fr .libs/libsndfile.lax mkdir .libs/libsndfile.lax rm -fr .libs/libsndfile.lax/libgsm.a mkdir .libs/libsndfile.lax/libgsm.a (cd .libs/libsndfile.lax/libgsm.a && x86_64-pc-linux-gnu-ar x /var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/src/GSM610/.libs/libgsm.a) rm -fr .libs/libsndfile.lax/libg72x.a mkdir .libs/libsndfile.lax/libg72x.a (cd .libs/libsndfile.lax/libg72x.a && x86_64-pc-linux-gnu-ar x /var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/src/G72x/.libs/libg72x.a) copying selected object files to avoid basename conflicts... ln .libs/libsndfile.lax/libg72x.a/g72x.o .libs/libsndfile.lax/lt1-g72x.o || cp .libs/libsndfile.lax/libg72x.a/g72x.o .libs/libsndfile.lax/lt1-g72x.o x86_64-pc-linux-gnu-ar cru .libs/libsndfile.a sndfile.o common.o file_io.o command.o pcm.o ulaw.o alaw.o float32.o double64.o ima_adpcm.o ms_adpcm.o gsm610.o dwvw.o vox_adpcm.o interleave.o strings.o dither.o broadcast.o aiff.o au.o g72x.o avr.o caf.o ircam.o macbinary3.o macos.o mat4.o mat5.o nist.o paf.o pvf.o raw.o svx.o voc.o htk.o dwd.o ogg.o rx2.o sd2.o sds.o txw.o wve.o w64.o wav_w64.o wav.o xi.o flac.o .libs/libsndfile.lax/libgsm.a/short_term.o .libs/libsndfile.lax/libgsm.a/rpe.o .libs/libsndfile.lax/libgsm.a/gsm_option.o .libs/libsndfile.lax/libgsm.a/table.o .libs/libsndfile.lax/libgsm.a/gsm_destroy.o .libs/libsndfile.lax/libgsm.a/gsm_decode.o .libs/libsndfile.lax/libgsm.a/add.o .libs/libsndfile.lax/libgsm.a/long_term.o .libs/libsndfile.lax/libgsm.a/preprocess.o .libs/libsndfile.lax/libgsm.a/gsm_create.o .libs/libsndfile.lax/libgsm.a/decode.o .libs/libsndfile.lax/libgsm.a/code.o .libs/libsndfile.lax/libgsm.a/gsm_encode.o .libs/libsndfile.lax/libgsm.a/lpc.o .libs/libsndfile.lax/lt1-g72x.o .libs/libsndfile.lax/libg72x.a/g723_40.o .libs/libsndfile.lax/libg72x.a/g723_24.o .libs/libsndfile.lax/libg72x.a/g723_16.o .libs/libsndfile.lax/libg72x.a/g721.o x86_64-pc-linux-gnu-ranlib .libs/libsndfile.a rm -fr .libs/libsndfile.lax creating libsndfile.la (cd .libs && rm -f libsndfile.la && ln -s ../libsndfile.la libsndfile.la) make[3]: Leaving directory `/var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/src' make[2]: Leaving directory `/var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/src' make[1]: Leaving directory `/var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/src' Making all in examples make[1]: Entering directory `/var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/examples' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../src -I./../src -march=athlon64 -O2 -pipe -std=gnu99 -W -Wall -Wdeclaration-after-statement -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -c sndfile-info.c x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../src -I./../src -march=athlon64 -O2 -pipe -std=gnu99 -W -Wall -Wdeclaration-after-statement -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -c sndfile-play.c sndfile-play.c: In function ‘linux_open_dsp_device’: sndfile-play.c:430: error: ‘SOUND_PCM_SETFMT_is_obsolete_use_SNDCTL_DSP_SETFMT_instead’ undeclared (first use in this function) sndfile-play.c:430: error: (Each undeclared identifier is reported only once sndfile-play.c:430: error: for each function it appears in.) sndfile-play.c:435: error: ‘SOUND_PCM_WRITE_CHANNELS_is_obsolete_use_SNDCTL_DSP_CHANNELS_instead’ undeclared (first use in this function) sndfile-play.c:440: error: ‘SOUND_PCM_WRITE_RATE_is_obsolet_use_SNDCTL_DSP_SPEED_instead’ undeclared (first use in this function) make[1]: *** [sndfile-play.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/media-libs/libsndfile-1.0.17/work/libsndfile-1.0.17/examples' make: *** [all-recursive] Error 1 !!! ERROR: media-libs/libsndfile-1.0.17 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' environment, line 3580: Called src_compile libsndfile-1.0.17.ebuild, line 45: Called die !!! emake failed !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/var/tmp/portage/media-libs/libsndfile-1.0.17/temp/build.log'. gaillard-gentoo ~ # and my emerge --info gaillard@gaillard-gentoo ~ $ emerge --info Portage 2.1.2.2 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 x86_64) ================================================================= System uname: 2.6.19-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3400+ Gentoo Base System release 1.12.9 Timestamp of tree: Thu, 05 Apr 2007 23:50:01 +0000 ccache version 2.4 [disabled] dev-java/java-config: 1.3.7, 2.0.31 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/" LC_ALL="en_US.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X amd64 bash-completion berkdb bitmap-fonts cairo cdr cli cracklib crypt dbus dvd dvdr eds encode fam firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv ipv6 jack jpeg ldap libg++ mad mikmod mp3 mpeg ncurses nls nptl nptlonly nvidia ogg opengl oss pam pcre perl png ppds pppd python quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv zlib" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS gaillard@gaillard-gentoo ~ $ I understand you don't support third party stuff but this is just a fix for those of use who do use the current OSS. Is that not allowed?
Oh, sorry the soundcard.h i refer to is the one that comes with the current OSS and replaces the one in the linux sources. the ones in /usr/include/linux and /usr/include/sys are the ones i mean.
Does this break people who use in kernel oss?
(In reply to comment #5) > Oh, sorry the soundcard.h i refer to is the one that comes with the current OSS > and replaces the one in the linux sources. the ones in /usr/include/linux and > /usr/include/sys are the ones i mean. I don't see what are you talking about here? You've overwritten the glibc headers with some third-party cruft apparently, what kind of support are you expecting here? # grep -Rni soundcard.h libsndfile-1.0.17/ libsndfile-1.0.17/examples/sndfile-play.c:40: #include <sys/soundcard.h> $ grep SOUND_PCM_SETFMT_is_obsolete_use_SNDCTL_DSP_SETFMT /usr/include/sys/soundcard.h $ # equery b /usr/include/sys/soundcard.h [ Searching for file(s) /usr/include/sys/soundcard.h in *... ] sys-libs/glibc-2.5-r1 (/usr/include/sys/soundcard.h) (In reply to comment #6) > Does this break people who use in kernel oss? No, it breaks people who overwrite system headers with some '4front technologies' ones.
(In reply to comment #7) > (In reply to comment #5) > > Oh, sorry the soundcard.h i refer to is the one that comes with the current OSS > > and replaces the one in the linux sources. the ones in /usr/include/linux and > > /usr/include/sys are the ones i mean. > > I don't see what are you talking about here? You've overwritten the glibc > headers with some third-party cruft apparently, what kind of support are you > expecting here? > > # grep -Rni soundcard.h libsndfile-1.0.17/ > libsndfile-1.0.17/examples/sndfile-play.c:40: #include > <sys/soundcard.h> > > $ grep SOUND_PCM_SETFMT_is_obsolete_use_SNDCTL_DSP_SETFMT > /usr/include/sys/soundcard.h > $ > > # equery b /usr/include/sys/soundcard.h > [ Searching for file(s) /usr/include/sys/soundcard.h in *... ] > sys-libs/glibc-2.5-r1 (/usr/include/sys/soundcard.h) > > (In reply to comment #6) > > Does this break people who use in kernel oss? > > No, it breaks people who overwrite system headers with some '4front > technologies' ones. > I am not expecting support i just thought this would help people who use the updated OSS... is that not allowed? Why all the hostile talk?? Just trying to help guys...
(In reply to comment #7) [snip] > No, it breaks people who overwrite system headers with some '4front > technologies' ones. > No, my question was "does this patch break compilation with in kernel oss"
(In reply to comment #9) > (In reply to comment #7) > [snip] > > No, it breaks people who overwrite system headers with some '4front > > technologies' ones. > > > > No, my question was "does this patch break compilation with in kernel oss" > I am not very experienced but people who use alsa shouldn't be effected because it checks for the alsa use flag, but now people that use the in kernel oss I don't know. I beleive those function calls are only in the newer API but i'll check.
(In reply to comment #9) > (In reply to comment #7) > [snip] > > No, it breaks people who overwrite system headers with some '4front > > technologies' ones. > > > > No, my question was "does this patch break compilation with in kernel oss" > looks like the soundcard.h header in the linux source provides all the 3 functions this patch changes the calls for, so i assume it will be alright but i don't have a means to test. If anyone else does that would be great.
(In reply to comment #9) > No, my question was "does this patch break compilation with in kernel oss" This thing does not compile against kernel, as shown above. And this bug doesn't belong here, it should go to http://www.mega-nerd.com/libsndfile/bugs.html if anywhere. It doesn't affect Gentoo at all.