Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 571610

Summary: dev-dotnet/libgdiplus-3.12: too few arguments to function 'EGifCloseFile'
Product: Gentoo Linux Reporter: Erik Zeek <zeekec>
Component: Current packagesAssignee: dotnet project <dotnet>
Status: RESOLVED FIXED    
Severity: normal CC: anton.kochkov, che, gentoo, gmt, jhyeon, mark+gentoobugs, noein93, owmcclung, rose, thanasis, xaviermiller
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 451324    
Attachments: Build log.
giflib.patch
libgdiplus-3.12-giflib-quantizebuffer.patch

Description Erik Zeek 2016-01-12 02:47:32 UTC
Created attachment 422610 [details]
Build log.

gifcodec.c:1215:2: error: too few arguments to function 'EGifCloseFile'
  EGifCloseFile (fp); 
  ^
In file included from gifcodec.c:38:0:
/usr/include/gif_lib.h:132:5: note: declared here
 int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
     ^

# emerge -pv /usr/include/gif_lib.h

Calculating dependencies        ... done!                    
[ebuild   R    ] media-libs/giflib-5.1.2:0/7::gentoo  USE="-static-libs" ABI_X86="32 (64) (-x32)" 0 KiB



# emerge --info '=dev-dotnet/libgdiplus-3.12::gentoo'
Portage 2.2.26 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.3.0, glibc-2.22-r1, 4.4.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.0-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.2
KiB Mem:    16409140 total,   2360280 free
KiB Swap:   10491892 total,  10491892 free
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.4.1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /gentoo/portage
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: -1000

grub2-themes
    location: /gentoo/local/layman/grub2-themes
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/grub2-themes-overlay.git
    masters: gentoo
    priority: 50

kde
    location: /gentoo/local/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

science
    location: /gentoo/local/layman/science
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sci.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /gentoo/local/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

x11
    location: /gentoo/local/layman/x11
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/x11
    masters: gentoo
    priority: 50

zeekec
    location: /gentoo/local/portage
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb -mtune=native -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /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="-O2 -pipe -ggdb -mtune=native -march=native"
DISTDIR="/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going -j 3 --rebuild-if-new-slot=y --backtrack=30"
FCFLAGS="-O2 -pipe -ggdb -mtune=native -march=native"
FEATURES="assume-digests binpkg-logs candy cgroup clean-logs collision-protect compress-build-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -ggdb -mtune=native -march=native"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8 --load-average=15"
PKGDIR="/gentoo/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-i --no-p --omit-dir-times"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/gentoo/tmp"
USE="256-color 3des 3dnow 3dnowext 3ds 64bit R S3TC X a2ps a52 aac aacplus aacs aalib accessibility ace acl acoustid acpi additions addressbook adolc aes aesicm aften agg aimodules aio airplay akonadi alac alaw alevt alisp all_sfx alsa amd64 amr amrenc anacron analitza ancient android animgif ansi ant ao apache apache2 apm apng arcfour archive armadillo arpack asdf asn asn1 asyncns atm atsc attica audacious audio audiofile audit auth authdaemond auto-completion autoipd automap automount autotools autotrace avahi ayatana baremetal bash-completion bazaar bcmath bdf berkdb bidi bitmap bittorrent bl blas blender blksha1 bloodsuckermaps bluray bookmarks boost branding btrfs bugzilla builder bwscheduler bzip2 c++0x cairo cal3d calendar canberra canna caps ccache cdda cddb cdf cdinstall cdparanoia cdr cdrom cdsound cegui celt cgi chardet charmap cheats chm chroot cilk clamav clang classbrowser cli client client-libs cloudprint clucene clutter cmake collab collada color colordiff compress context contrast contrib convert-mozilla-cookies corefonts cpufreq_bench cpumining cracklib cramfs crashreporter cron crypt cryptsetup csc cscope css ctype cups curl curlwrappers custom-optimization cvs cvsgraph cxx d d3d9 dap data dbus debug-frame debug-utils declarative demo designer designer-plugin desktopglobe detex development devhelp device-mapper dga dhcp dia dirac discouraged distinct-l djvu dlna dmraid dns docbook doctool dolphin doom doomsday dot double-precision down-root downloadorder dri dri3 drm drmaa drmkms dtmf dts dv dvb dvd dvdnav dvdr dvi dvipdfm ebook editor egl eigen elf elfutils emacs embedded emboss emf emovix enca encode enscript epspdf epub ethernet evdev excel exceptions exif expoblending extensions extra extra-algorithms extra-cardsets extra-ciphers extraengine extras faac faad facebook facedetect faillog fakevim fam fancy fastcgi fat fax fbcondecor fcgi fdk festival ffmpeg fftw filter finger firefox firewalld firmware fits flac flash flatfile flickr fluidsynth fmod fontconfig fontforge fonts foomaticdb fortran fortran95 fortune fpx frei0r ftp fullscreen fuse g3dvl gadu gallium games gbm gcj gcrypt gd gdal gdbm geoclue geoip geolocation geonames geos ghcbootstrap gif gimp git gkrellm glade glamor glep gles2 glgd glib gltf glut gmath gme gml gmp gmtfull gmttria gnome-keyring gnome-online-accounts gnuplot go gold google gopher gost gpac gpg gphoto2 gpm grammar graphics graphite graphviz grass groupwise gsf gsl gsm gstreamer gtk gtk3 gtkhtml gts gui guidexml guile gzip gzip-el h224 h281 h323 hash hbci hddtemp hdf hdf5 hdri help hesiod heterogeneous hexen high-ints highlight history hostip hou hpijs hscolour html htmlreport http httpd humanities hunspell hwinfo hyphenation i18n ical iconv icoutils icq icu id3tag ide idea idn ieee1394 ignore-case image imagemagick imaging imap imlib importd inifile inkjar inotify introspection ipod ipv6 ipython irc isag ithreads ivr jabber jadetex jai java java6 javacomm javascript jbig jce jimi jit jmf john jpeg jpeg2k json kate kde kdecards kdenlive kdepim kdrive kernel kernel-patch keymap kipi kontact kpathsea kvm ladspa lame lapack lasi latex lcms ldap legacy-systray lensfun libass libburn libffi libkms liblockfile libnotify libsamplerate libsecret libssh2 libtiger libv4l libvirtd libwww lightning lights live lldb llvm lm_sensors localstorage lock log log4j logrotate logviewer logwatch lqr lto lua luatex lvm lxc lyrics lz4 lzma lzo mad madde mail maildir manual map mapimg maps math mathml matplotlib matroska maui mbrola md5sum mdadm mdnsresponder-compat media mediawiki melt memmap mercurial metadata-analysis-api metapost metis mhash midi mikmod mime minizip mixer mjpeg mmap mms mmx mmxext mng mod modpack module modules mono mopac7 mount mozdom mozilla mp3 mp3tunes mp4 mpeg mpi_njtree mplayer mpqc mtp mudflap multilib multimedia multiprocess multitarget multiuser musepack music musicbrainz mysql mysqli na_dd na_dtv na_icons nas nat natspec nbconvert ncat ncurses ndiff nepomuk net netcdf nethack netpbm network network-cron networking networkmanager new-clx nfs nfsdcld nfsv4 nfsv41 nls nmap-update nntp nocd nominatim notebook nowin nowlistening nping npp nptl nsplugin nss nsscache nssdb ntfs ntfsprogs ntp numa numpy nut nuv nvtt oauth objc objc++ objc-gc ocr octave odbcmanual odf ofa offensive offlinehelp ofx ogg ogm okteta okular omega oom openal openbabel opencv openexr opengl openinventor openmax openmp openssl opensslcrypt openstreetmap optimization opus orc osc oscar osd osdmenu osgapps osmesa otr ots pager pam pam_ssh pango panorama paranoidmsg parcheck parse-clocks parted patented pbins pbs pci pcntl pcre pcre16 pdf pdfannotextractor pdl2 pdo pep8 perl pgm pgo pgplot phonon phyp physfs pink pipe pkcs11 plasma player playlist plazes plotutils plugins png pnm policykit pop popcnt portage positioning posix postfix postproc postscript ppds pptx printsupport proj projectm proprietary-codecs protobuf psf pstricks publishers pulseaudio pvr pygments pylint python python3 q16 q32 q64 q8 qalculate qd qemu qhull qimageblitz qml qnx qos qrcode qscintilla qt-dbus qt3support qt5 qthelp quesoglc quicktime quota qwt r600-llvm-compiler radio ramfs rar raw rc5 rcs rdesktop readline redeyes redland regex remix remote rendering reports resources reviewboard rfc3779 rle rogue romio root rpc rpm rrdcgi rrdtool rss rtc rtf rtmp rtsp s3tc samba sasl sbcl scale0tilt scanfolder scanner schroedinger science scipy scotch screen script scripting scripts scripttools scrypt sdk sdl sdl-image sdlgfx search search-index seccomp secure-delete semantic-desktop sensord sensors server session setproctitle setup sftp sha512 shadow shapefile sharedmem shm shmvideo shorten shout sid sift sigsegv sip sipim skins skydrive skype slp smbclient smbsharemodes smbtav2 smime smp smpeg sms snappy sndfile snmp soap sockets socks solver songs soprano sou sound sounds soup sourceview sox spamassassin sparse spatialite speech speex spell sphinx spice sql sqlite sqlite3 srtp sse sse2 ssh ssh-agent ssl staging stars startup-notification statistics stats steamfonts steamgames_source_engine steamgames_tf2 steamgames_trine2 stlport stream streaming subject-rewrite subtitles subunit subversion suexec suid svg swat swig symlink sync-plugin-portage syslog system-boost system-cairo system-icu system-jflex system-jpeg system-jsoncpp system-sqlite systemd systeminfo systemtap sysvipc szip t1lib taamey taglib tcl telepathy templates testbed tex4ht texi2html textures tga themedesigner themes theora thesaurus thin-splines threads threadsafe thumbnail thunar tidy tiff timezone tk tls tokenizer toolbar tools torque track-src-odirect transcode translator trayicon truetype tts tty-helpers tv tv_check tv_combiner tv_pick_cgi twolame type3 udev udisks udunits umfpack uml unicode unicode_collation unique unwind unzip upnp upower urandom urlpicpreview usb userpriv utempter utils uudeview uuid v4l vamp vcd vcdx vde vdpau vdr verify-file video videos videoslideshow vim vim-pager vim-syntax virt-network virtualbox virtuoso visio visual vlc vlm vnc voice vorbis vpx vserver vxml warmstarts wav wavpack weather web webcam webdav webdav-neon webdav-serf webinterface webkit webp webpresence websockets wide-unicode widevine widgets wifi wiki winbind windeco wineappdb wininst winpopup wma wma-fixed wmf wordperfect wpg wps wxwidgets wyfv x11extras x264 xa xanim xattr xcap xcb xcomposite xdm-auth xerces-c xetex xext xface xforms xft xhtml xine xinerama xkb xlib-xcb xml xmlpatterns xmlreader xmlrpc xmlwriter xmp xnest xorg xosd xpm xrandr xrender xscreensaver xslt xtended xterm xv xvfb xvid xvmc yahoo-geo youtube zeitgeist zeroconf zip zlib zsh-completion zvbi" ABI_X86="64 32" ALSA_CARDS="intel8x0 intel8x0m pxa2xx-ac97 hda-intel" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi cgid authn_core authz_core unixd socache_shmcb lbmethod_bytraffic slotmem_shm" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="nss" DRACUT_MODULES="btrfs crypt syslog biosdevname caps crypt-gpg ssh-client syslog" DVB_CARDS="af9005 bcm3510 cx18 cx231xx cx23885 mpc718 nxt200x sp8870 sp887x" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport scripting-javascript wiki-publisher scripting-beanshell" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 ppc ppc64 ppc64abi32 x86_64" RUBY_TARGETS="ruby20 ruby23" SANE_BACKENDS="canon canon630u canon_dr canon_pp hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s net pnm" USERLAND="GNU" VIDEO_CARDS="r600 radeon" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-dotnet/libgdiplus-3.12::gentoo was built with the following:
USE="cairo" ABI_X86="64"
CFLAGS="-O2 -pipe -ggdb -mtune=native -march=native -fno-strict-aliasing"
CXXFLAGS="-O2 -pipe -ggdb -mtune=native -march=native -fno-strict-aliasing"
Comment 1 Rinaldus 2016-01-12 08:50:39 UTC
I confirm it, I have the same error.
Comment 2 daniel 2016-01-12 11:18:57 UTC
Created attachment 422656 [details, diff]
giflib.patch
Comment 3 daniel 2016-01-12 11:21:09 UTC
Created attachment 422658 [details, diff]
libgdiplus-3.12-giflib-quantizebuffer.patch
Comment 4 daniel 2016-01-12 11:27:19 UTC
I had the same.
After applying the attached giflib.patch, the libgdiplus-3.12-giflib-quantizebuffer.patch failed to apply, so I had to change some details in it.
With these two, libgdiplus compiled fine for me.

I'm no developer, just fiddled a bit around to get it to compile.
Comment 5 jospezial 2016-01-12 23:12:07 UTC
see also:
https://bugs.gentoo.org/show_bug.cgi?id=571642
Comment 6 faminebadger 2016-01-13 16:02:53 UTC
These two bugs (this and https://bugs.gentoo.org/show_bug.cgi?id=571642) are the same, they both are caused by this package not being updated for libgif 5.x.

I managed to write a patch on my system successfully, without needing to worry about updating the quantizebuffer patch file, so I'm not sure what went wrong for daniel.

However, it's preferred to update libgdiplus to a version that does support libgif 5.x properly without writing the patch ourselves.
Comment 7 Greg Turner 2016-01-14 09:31:43 UTC
What a PITA.

OK I wanted the following cake:

 o not to think about this very much
 o to have this ebuild compile
 o to use upstream portage's ebuild

Eating it was less important to me but also preferably:

 o to generate a working library

or at the very least

 o not to knowingly have generated a non-working library

So I implemented all of daniel's advice by applying the following patch from post_src_prepare in /etc/portage/env/dev-dotnet/libgdiplus-3.12:

http://pastebin.com/NUiVjsPx

I have a really ugly bashrc that implements epatch-user-like semantics in nonstandard places for shit like this:

/etc/portage/env/epatchuser-post_src_prepare:
GMT_EPATCH_USER_FORCE=yes
GMT_EPATCH_USER_POST_SRC_PREPARE=yes

and, here is the really disgusting part:

/etc/portage/bashrc (abridged):
http://pastebin.com/ahCGUy2y

Not so sure how well I captured the relevant logic and filtered the irrelevant logic from my bashrc, it's a real damn mess.  but if someone "just wants to cut and paste something" that might do it if you know how to use it. hth :/

I'm not necessarily endorsing daniel's solution -- not that I see any problem with it, I've simply not given any thought whatsoever to underlying causes, correctness at runtime, upstream maintainership, code style, compatibility with stable keywords, and so on, so all I can really say is this makes the ebuild compile on my box):
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-01-15 21:57:23 UTC
*** Bug 571642 has been marked as a duplicate of this bug. ***
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-01-15 21:58:37 UTC
Like I said in the other bug, we need to add libgdiplus-4.2 to portage. That version compiles with giflib-5
Comment 10 Louis Sautier (sbraz) gentoo-dev 2016-01-18 09:40:05 UTC
Here is a proposed ebuild for 4.2: https://github.com/gentoo/gentoo/pull/673
Comment 11 Cynede (RETIRED) gentoo-dev 2016-01-21 09:12:41 UTC
merged to tree, synced overlay, thanks for patch and notification