Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471300 - media-libs/libsdl fails to compile against x11-libs/libX11-1.5.99.902
Summary: media-libs/libsdl fails to compile against x11-libs/libX11-1.5.99.902
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 471604 (view as bug list)
Depends on:
Blocks: 471098
  Show dependency tree
 
Reported: 2013-05-26 06:00 UTC by Ryan Hill (RETIRED)
Modified: 2014-06-19 10:51 UTC (History)
16 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (libsdl-1.2.15-r3:20130526-060835.log,43.68 KB, text/plain)
2013-05-26 06:00 UTC, Ryan Hill (RETIRED)
Details
libsdl-1.2-fix-compilation-libX11.patch (libsdl-1.2-fix-compilation-libX11.patch,2.20 KB, patch)
2013-06-02 15:05 UTC, Azamat H. Hackimov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2013-05-26 06:00:50 UTC
Created attachment 349202 [details]
build log

libtool: compile:  x86_64-pc-linux-gnu-gcc -O2 -march=native -g -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/video/x11/SDL_x11dyn.c  -fPIC -DPIC -o build/.libs/SDL_x11dyn.o
In file included from ./src/video/x11/SDL_x11dyn.c:96:0:
./src/video/x11/SDL_x11sym.h:168:92: error: conflicting types for '_XData32'
 SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
                                                                                            ^
In file included from ./src/video/x11/SDL_x11dyn.h:34:0,
                 from ./src/video/x11/SDL_x11dyn.c:26:
/usr/include/X11/Xlibint.h:595:12: note: previous declaration of '_XData32' was here
 extern int _XData32(
            ^
make: *** [build/SDL_x11dyn.lo] Error 1



Portage 2.2.0_alpha177 (default/linux/amd64/13.0/developer, gcc-4.8.0, glibc-2.17, 3.9.2-gentoo x86_64)
=================================================================
System uname: Linux-3.9.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-3920XM_CPU_@_2.90GHz-with-gentoo-2.2
KiB Mem:    32597924 total,   2166548 free
KiB Swap:    1048572 total,   1048572 free
Timestamp of tree: Sun, 26 May 2013 04:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.6.8-r1, 2.7.5, 3.1.5-r1, 3.2.5, 3.3.2
dev-util/ccache:          3.1.9::local
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.2
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.5.4, 4.6.4, 4.7.3::local, 4.7.4_pre9999::toolchain, 4.8.0, 4.8.1_pre9999::toolchain
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local gcc-porting toolchain dirtyepic
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -g -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -g -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n"
FCFLAGS="-O2 -march=native -g -pipe"
FEATURES="assume-digests binpkg-logs ccache clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict test test-fail-continue unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -g -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-05-26 10:19:37 UTC
There is a suggested fix in the upstream bug report, but it might break compilation against older libX11 (didn't test).
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-05-28 16:10:46 UTC
*** Bug 471604 has been marked as a duplicate of this bug. ***
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-05-28 16:12:22 UTC
The patch indeed breaks compile against older versions, so when it is applied, the ebuild needs to depend on >=x11-libs/libX11-1.5.99.901
Comment 4 Jimis Hol 2013-05-28 16:35:32 UTC
I have x11-libs/libX11-1.5.99.902 but the compilation fails as
media-libs/libsdl-1.2.15-r3 failed (compile phase)

Portage 2.1.12.2 (default/linux/amd64/13.0/desktop/gnome, gcc-4.7.3, glibc-2.17, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-Intel-R-_Core-TM-_i5_CPU_M_460_@_2.53GHz-with-gentoo-2.2
KiB Mem:     3847584 total,    544784 free
KiB Swap:    5241852 total,   5197236 free
Timestamp of tree: Tue, 28 May 2013 15:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5, 3.2.5, 3.3.2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.2
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Broadcom AdobeFlash-10.3"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.cc.uoc.gr/mirrors/linux/gentoo/ ftp://ftp.cc.uoc.gr/mirrors/linux/gentoo/"
LANG="el_GR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l3.95"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 aperfmperf apic arat arch_perfmon berkdb branding bts bzip2 cairo cdda cdr clflush cli cmov colord consolekit constant_tsc cracklib crypt cups cx16 cx8 cxx dbus de dri ds_cpl dtes64 dts dvd dvdr eds emboss encode ept est evo exif fam firefox flac flexpriority fortran fpu fxsr gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ht iconv ida java jpeg lahf_lm lcms ldap libnotify libsecret lm mad mca mce mmx mng modules monitor mp3 mp4 mpeg msn msr mtrr mudflap multilib nautilus ncurses networkmanager nls nonstop_tsc nopl nptl nx ogg opengl openmp pae pam pango pat pbe pcre pdcm pdf pebs pge png pni policykit popcnt ppds pse pse36 pulseaudio qt3support rdtscp readline rep_good sdl sep session socialweb spell ss sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg syscall tcpd tiff tm tm2 tpr_shadow truetype tsc udev udisks unicode upower usb v4l v4l2 vme vmx vnmi vorbis vpid wxwidgets x264 xcb xml xtopology xtpr xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="el" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 5 Jimis Hol 2013-05-28 16:41:26 UTC
my last lines of build.log with few greek characters are

/bin/sh ./libtool --mode=compile x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe  -I./include -D_GNU_SOURCE=1 -fvisibility=hidden  -D_REENTRANT   -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/video/x11/SDL_x11dyn.c  -o build/SDL_x11dyn.lo
libtool: compile:  x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -D_REENTRANT -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/video/x11/SDL_x11dyn.c  -fPIC -DPIC -o build/.libs/SDL_x11dyn.o
In file included from ./src/video/x11/SDL_x11dyn.c:96:0:
./src/video/x11/SDL_x11sym.h:168:1: σφάλμα: conflicting types for ‘_XData32’
In file included from ./src/video/x11/SDL_x11dyn.h:34:0,
                 from ./src/video/x11/SDL_x11dyn.c:26:
/usr/include/X11/Xlibint.h:595:12: σημείωση: previous declaration of ‘_XData32’ was here
make: *** [build/SDL_x11dyn.lo] Error 1
emake failed
 [31;01m*[0m ERROR: media-libs/libsdl-1.2.15-r3 failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m          ebuild.sh, line   93:  Called src_compile
 [31;01m*[0m        environment, line 2858:  Called __eapi2_src_compile
 [31;01m*[0m   phase-helpers.sh, line  632:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m   		emake || die "emake failed"

If you need more data remind me how to emerge with log files in english
Thank you
Comment 6 Wendy 2013-05-29 11:27:53 UTC
I used the patch from #1 and edited the ebuild to include epatch_user before epatch.This made it cleanly compile on my system
Comment 7 Jeff 2013-05-29 19:11:35 UTC
(In reply to Wendy from comment #6)
> I used the patch from #1 and edited the ebuild to include epatch_user before
> epatch.This made it cleanly compile on my system

I used the same method and it compiled clean.

Thanks Wendy.
Comment 8 Mark (voidzero) 2013-05-30 17:28:26 UTC
Wendy thanks, that made it work indeed.
Comment 9 Michael Hampicke 2013-05-30 21:26:25 UTC
I can confirm this bug, also the suggested patch worked for me.
Comment 10 Łukasz Dubiel 2013-05-31 07:45:54 UTC
Patch works for me too.
Comment 11 Azamat H. Hackimov 2013-06-02 15:05:45 UTC
Created attachment 349910 [details, diff]
libsdl-1.2-fix-compilation-libX11.patch

This patch backward compatible with old libX11 version. Please test it.
Comment 12 Dominique Michel 2013-06-02 17:10:35 UTC
Here on ~ams64, your last patch fail with

libtool: compile:  x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -ggdb -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/video/x11/SDL_x11gamma.c  -fPIC -DPIC -o build/.libs/SDL_x11gamma.o
In file included from ./src/video/x11/SDL_x11dyn.c:96:0:
./src/video/x11/SDL_x11sym.h:171:1: error: conflicting types for ‘_XData32’
In file included from ./src/video/x11/SDL_x11dyn.h:34:0,
                 from ./src/video/x11/SDL_x11dyn.c:26:
/usr/include/X11/Xlibint.h:595:12: note: previous declaration of ‘_XData32’ was here
make: *** [build/SDL_x11dyn.lo] Error 1

when the first patch did work (libsdl-1.2.15-r3 and libX11-1.5.99.902)
Comment 13 Azamat H. Hackimov 2013-06-02 17:24:03 UTC
(In reply to Dominique Michel from comment #12)

Forgot to mention, you should call eautoreconf after patching in src_prepare().
Please retest with it.
Comment 14 Tony Vroon (RETIRED) gentoo-dev 2013-06-02 20:32:31 UTC
+*libsdl-1.2.15-r4 (02 Jun 2013)
+
+  02 Jun 2013; Tony Vroon <chainsaw@gentoo.org> +libsdl-1.2.15-r4.ebuild,
+  +files/libsdl-1.2.15-const-xdata32.patch:
+  Patch by Azamat H. Hackimov to address build failures against recent libX11,
+  closes bug #471300.
Comment 15 Dominique Michel 2013-06-02 20:41:59 UTC
(In reply to Azamat H. Hackimov from comment #13)
> (In reply to Dominique Michel from comment #12)
> 
> Forgot to mention, you should call eautoreconf after patching in
> src_prepare().
> Please retest with it.

Same problem again. Only the first patch work. With the second one, I try with eautoreconf and with and without elibtooloze, but without success.
Comment 16 orionbelt2 2014-06-18 10:00:24 UTC
This bug resurfaced recently in the stable version of libsdl (1.2.15-r4):

https://forums.gentoo.org/viewtopic-t-993228-highlight-firefox.html

It seems that it has been fixed in 1.2.15-r5 which is currently masked. If there are no other outstanding issues, it sounds like a good time for a version bump.
Comment 17 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-06-18 10:57:54 UTC
The forum user tried to build -r2, where this bug is not fixed.
If libsdl-1.2.15-r4 fails to build, please open a new bug report and attach the build.log.
Comment 18 Julian Ospald 2014-06-18 11:22:36 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #17)
> The forum user tried to build -r2, where this bug is not fixed.
> If libsdl-1.2.15-r4 fails to build, please open a new bug report and attach
> the build.log.

correct, there is no significant difference between -r4 and -r5, except:
* multilib support
* removal of DirectFB USE flag
Comment 19 orionbelt2 2014-06-18 14:37:58 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #17)
> The forum user tried to build -r2, where this bug is not fixed.
> If libsdl-1.2.15-r4 fails to build, please open a new bug report and attach
> the build.log.

OK, this is weird... You are right, it was libsdl-1.2.15-r2 that i was trying to build and that's why it failed, so this problem is solved.

However, the reason why i had missed the version number is because 1.2.15-r4 is the most recent stable version, so i had assumed without checking that "emerge world" would try to build 1.2.15-r4. But now i see that portage wants to build media-libs/libsdl-1.2.15-r2 instead, and produces the following warning:

# emerge -pv media-libs/libsdl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD ] media-libs/libsdl-1.2.15-r2 [1.2.15-r5] USE="X alsa joystick opengl sound video xinerama xv -aalib -custom-cflags -dga -directfb% -fbcon -ggi -libcaca -nas -oss (-ps3) -pulseaudio -static-libs (-svga) -tslib" ABI_X86="(-32%) (-64%*) (-x32%)" 0 kB

Total: 1 package (1 downgrade), Size of downloads: 0 kB

WARNING: One or more updates have been skipped due to a dependency conflict:

media-libs/libsdl:0

  (media-libs/libsdl-1.2.15-r4::gentoo, ebuild scheduled for merge) conflicts with
    >=media-libs/libsdl-1.2.13-r1[sound,video,abi_x86_64(-)] required by (media-video/ffmpeg-2.2.3-r1::gentoo, installed)


Why does media-libs/libsdl-1.2.15-r4 conflict with the requirement >=media-libs/libsdl-1.2.13-r1 ?  Last time i checked, 15 >= 13 evaluated to True.

To check whether the problem is caused by the masked ffmpeg that i use, i checked for differences in the requirement for libsdl in the ebuilds of media-video/ffmpeg-2.2.3-r1 and of the stable version media-video/ffmpeg-1.2.6. The difference is that ffmpeg-2.2.3-r1 adds ${MULTILIB_USEDEP} (which is not there in 1.2.6), which apparently expands to abi_x86_64(-) above... I suppose this is some kind of reference to the 64bit ABI, but i do not see how this might affect the choice of libsdl version... I was too lazy to downgrade ffmpeg to see if that solves the problem, but i can try it if you ask me to.
Comment 20 Julian Ospald 2014-06-18 19:42:40 UTC
looks like this is related to #513718
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-19 10:51:49 UTC
(In reply to Julian Ospald (hasufell) from comment #20)
> looks like this is related to #513718

Yes, it is. I will fix ffmpeg's deps as soon as media-libs/opus keywords are fixed.