Summary: | app-emulation/emul-linux-x86-soundlibs-20100220-r1: libsndfile: SF_INFO struct ordering incorrect | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marc Joliet <marcec> |
Component: | [OLD] Library | Assignee: | Gentoo Sound Team <sound> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | amd64, esigra, pacho |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 165270 | ||
Attachments: |
simple test program
audio file used by test program simple test program |
Description
Marc Joliet
2010-04-05 16:57:19 UTC
Created attachment 226649 [details]
simple test program
Created attachment 226651 [details]
audio file used by test program
CCing sound team since I don't know where could be the problem :-( Sound Team: emul package is providing media-libs/libsndfile-1.0.21 Thanks a lot Created attachment 226663 [details]
simple test program
Uploaded a slightly modified version of the test program that fixes two stupid errors I should've noticed: wrong sizeof() parameter and use of free() instead of sf_close().
Just a note: the test program prints the correct data when compiled under Ubuntu 9.10 (32 bits, libsndfile-1.0.20). I just tested with app-emulation/emul-linux-x86-soundlibs-20091231-r1 and get the same incorrect results. So far my only idea is that this might have to do with struct packing/padding or similar gcc options. More info for Sound team related with options used in emul chroot: [ebuild R ] media-libs/libsndfile-1.0.21 USE="alsa -minimal -sqlite" 0 kB emerge --info: Portage 2.1.7.17 (default/linux/amd64/dev/32bit-userland, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-tuxonice-r6 i686) ================================================================= System uname: Linux-2.6.32-tuxonice-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-1.12.13 Timestamp of tree: Fri, 09 Apr 2010 07:00:01 +0000 app-shells/bash: 4.0_p37 dev-lang/python: 2.6.4-r1 dev-python/pycrypto: 2.1.0_beta1 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.6.3, 1.9.6-r2, 1.11.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc: 4.3.4 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -mtune=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests buildpkg distlocks fixpackages multilib-strict news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-logs userfetch" GENTOO_MIRRORS="http://mirrors.sfo1.gni.com/Gentoo/ http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="es_ES.UTF-8" LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu" MAKEOPTS="-j3 --quiet" PKGDIR="/packages/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="accessibility acpi amd64 berkdb bindist cli cpudetection cracklib crypt cxx dri fortran gdbm gif iconv ipv6 jpeg kerberos ldap mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl png pppd readline reflection session spl sse sse2 ssl sysfs tiff unicode xinerama xorg zlib" ALSA_CARDS="*" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 intel mach64 mga neomagic nv r128 radeon radeonhd rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Aha, I found out how to solve this. You need to define "_FILE_OFFSET_BITS=64", i.e. compile with "gcc -m32 -lsndfile -D_FILE_OFFSET_BITS=64 libsndfile_test.c -o libsndfile_test", then the output of libsndfile_test is correct. According to http://www.suse.de/~aj/linux_lfs.html, I need make sure to use the same _FILE_OFFSET_BITS as the library I'm using. I'm still a bit confused though, since the relevant section in "info libc 'Feature Test Macros'" says the macro does nothing on 64 bit systems (unless it is only referring to the function redefinitions), so why does it matter here? Still valid with 20100611? Yes, I still need to define _FILE_OFFSET_BITS=64 as per comment #8. Sound team, what do you think about appending -D_FILE_OFFSET_BITS=64 when use x86 && [ "$(get_libdir)" = "lib32" ] ? (In reply to comment #11) > Sound team, what do you think about appending -D_FILE_OFFSET_BITS=64 when > use x86 && [ "$(get_libdir)" = "lib32" ] > ? > I guess you want: inherit flag-o-matic toolchain-funcs [[ $(tc-arch) == "x86" ]] && append-lfs-flags My idea was to mimic pango way of handling building of emul packages that, in summary, needs to check it's running on "x86" but with /usr/lib32 instead of /usr/lib as LIBDIR: function multilib_enabled() { has_multilib_profile || ( use x86 && [ "$(get_libdir)" = "lib32" ] ) } (from pango ebuilds) actually no need for those checks, appending largefile flags is safe enough without them, therefore: + 12 Jun 2010; Samuli Suominen <ssuominen@gentoo.org> + libsndfile-1.0.21.ebuild: + append-lfs-flags wrt #313259 by Marc Joliet. + closing as FIXED, the fix will be available automatically with next emul- packages. Great! Thanks a lot And reopen, can't use largefile flags here, see bug 335728. Would be safe to use it only for emul 32 libs? (In reply to comment #17) > Would be safe to use it only for emul 32 libs? > 20110129 still doesn't append lfs flags then, probably this is still valid :-|, but I repeat previous question (for the next emul set) (In reply to comment #17) > Would be safe to use it only for emul 32 libs? Samuli, what do you think about this? Thanks (In reply to comment #13) > My idea was to mimic pango way of handling building of emul packages that, in > summary, needs to check it's running on "x86" but with /usr/lib32 instead of > /usr/lib as LIBDIR: > > function multilib_enabled() { > has_multilib_profile || ( use x86 && [ "$(get_libdir)" = "lib32" ] ) > } > (from pango ebuilds) This was used now, + 27 Sep 2011; Samuli Suominen <ssuominen@gentoo.org> libsndfile-1.0.25.ebuild: + Use largefile flags when building emul-linux- pkgs wrt #313259 by Marc Joliet + and Pacho Ramos |