app-admin/keepass-2.29 don't build or run with >=dev-lang/mono-4 If I upgrade to mono 4, keepass don't run, and the build fails: >>> Compiling source in /var/tmp/portage/app-admin/keepass-2.29/work ... XBuild Engine Version 12.0 Mono, Version 4.0.3.0 Copyright (C) 2005-2013 Various Mono authors Build started 08/18/2015 18:47:15. __________________________________________________ : warning : Default tasks file /usr/lib64/mono/3.5/Microsoft.Common.tasks not found, ignoring. /var/tmp/portage/app-admin/keepass-2.29/work/KeePassLib/KeePassLib.csproj: warning : Could not find project file /usr/lib64/mono/3.5/Microsoft.CSharp.targets, to import. Ignoring. /var/tmp/portage/app-admin/keepass-2.29/work/KeePass/KeePass.csproj: warning : Could not find project file /usr/lib64/mono/3.5/Microsoft.CSharp.targets, to import. Ignoring. /var/tmp/portage/app-admin/keepass-2.29/work/Translation/TrlUtil/TrlUtil.csproj: warning : Could not find project file /usr/lib64/mono/3.5/Microsoft.CSharp.targets, to import. Ignoring. Project "/var/tmp/portage/app-admin/keepass-2.29/work/KeePass.sln" (KeePass target(s)): Target ValidateSolutionConfiguration: : error : Error initializing task Message: Not registered task Message. Build FAILED. Warnings: : warning : Default tasks file /usr/lib64/mono/3.5/Microsoft.Common.tasks not found, ignoring. /var/tmp/portage/app-admin/keepass-2.29/work/KeePassLib/KeePassLib.csproj: warning : Could not find project file /usr/lib64/mono/3.5/Microsoft.CSharp.targets, to import. Ignoring. /var/tmp/portage/app-admin/keepass-2.29/work/KeePass/KeePass.csproj: warning : Could not find project file /usr/lib64/mono/3.5/Microsoft.CSharp.targets, to import. Ignoring. /var/tmp/portage/app-admin/keepass-2.29/work/Translation/TrlUtil/TrlUtil.csproj: warning : Could not find project file /usr/lib64/mono/3.5/Microsoft.CSharp.targets, to import. Ignoring. Errors: /var/tmp/portage/app-admin/keepass-2.29/work/KeePass.sln (KeePass) -> (ValidateSolutionConfiguration target) -> : error : Error initializing task Message: Not registered task Message. 4 Warning(s) 1 Error(s) Time Elapsed 00:00:00.4890020 * ERROR: app-admin/keepass-2.29::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 2258: Called die * The specific snippet of code: * xbuild /target:KeePass /property:Configuration=Release || die; * * If you need support, post the output of `emerge --info '=app-admin/keepass-2.29::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-admin/keepass-2.29::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-admin/keepass-2.29/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-admin/keepass-2.29/temp/environment'. * Working directory: '/var/tmp/portage/app-admin/keepass-2.29/work' * S: '/var/tmp/portage/app-admin/keepass-2.29/work' Reproducible: Always Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.21-r1, 4.1.5-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.1.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-4200U_CPU_@_1.60GHz-with-gentoo-2.2 KiB Mem: 8082432 total, 2905020 free KiB Swap: 2097148 total, 2097148 free sh bash 4.3_p39 ld GNU ld (Gentoo 2.25.1 p1.0) 2.25.1 distcc 3.2rc1 x86_64-gentoo-linux-gnu [disabled] app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo dev-util/cmake: 3.3.1::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1::gentoo sys-devel/gcc: 4.9.3::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.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: git://anongit.gentoo.org/repo/gentoo.git priority: -1000 local location: /usr/local/portage/overlay masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE as-is freedist" CBUILD="x86_64-gentoo-linux-gnu" CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native" CHOST="x86_64-gentoo-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy 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 userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LANG="fr_BE.utf8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed" MAKEOPTS="-j7 -l5" PKGDIR="/var/portage/packages" PORTAGE_CONFIGROOT="/" 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="/var/tmp" USE="3dnow 3dnowext X a52 aac acpi alsa amd64 apng branding bzip2 cairo cdda cddb cdio cli cracklib crypt cryptsetup cups cxx dbus dlna dri dssi dts dvb dvd exif flac gif gpm gtk gudev iconv jack jpeg lcms libcanberra libnotify libsamplerate mad mmx mmxext mng modules mp3 mpeg multilib natspec ncurses nls nptl ocr ogg opengl openmp osc pam pango pcre pdf png qt4 qt5 readline rubberband sane scanner sdl seccomp session sna sndfile snmp spell sqlite sse sse2 ssl startup-notification svg tcpd threads tiff truetype udev unicode upnp upower usb uxa vorbis wmf x264 xcb xinerama xml xosd xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ice1712 hda-intel usb-audio virmidi" 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" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DVB_CARDS="usb-af9015" 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" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr fr_BE fr_FR nl nl_BE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby22" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="intel i965" XFCE_PLUGINS="power brightness trash" 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" USE_PYTHON="2.7" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= app-admin/keepass-2.29::gentoo was built with the following: USE="-aot" ABI_X86="64"
Created attachment 409384 [details] build log
masking >=dev-lang/mono-4 fixes the problem
Fedora uses these fixes, but I didn't test them yet: http://pkgs.fedoraproject.org/cgit/keepass.git/commit/?id=75b16329d8ad2eab246008a5820a0d1fde4dd5c6
I tried them, and with them it compiles.
Same issue with keepass-2.30. The workaround that modify the .sln file should also work.
yep, I added these two lines to src_prepare and merged fine +find . -name "*.sln" -print -exec sed -i 's/Format Version 10.00/Format Version 11.00/g' {} \; +find . -name "*.csproj" -print -exec sed -i 's#ToolsVersion="3.5"#ToolsVersion="4.0"#g; s#<TargetFrameworkVersion>.*</TargetFrameworkVersion>##g; s#<PropertyGroup>#<PropertyGroup><TargetFrameworkVersion>v4.5</TargetFrameworkVersion>#g' {} \; probably only need the sln sed. seems to run too (as a bonus)!
Unfortunately this seems backwards incompatible.
Has anyone reported this upstream yet? On http://sourceforge.net/p/keepass/bugs/ I can't seem to find a ticket matching this one here, although a lot of the runtime issues might be manifestations of something we catch at compile time here. If you want me to, I can probably report this, but I have no experience at all with mono and friends, don't really understand the error message, don't know what a .sln file is, and so on. So if someone with a bit of an idea about what's going on were to report this, that might be more useful than if I do so.
I saw one thread, but it wasn't particularly useful: http://sourceforge.net/p/keepass/discussion/329221/thread/72db1a65/
*** Bug 558712 has been marked as a duplicate of this bug. ***
Created attachment 410302 [details, diff] use v4 assemblies
Created attachment 410304 [details, diff] apply patch
I just had to toggle the framework versions and set the startup project in monodevelop. Probably not everything in that patch is mandatory but it shouldn't hurt.
I filed https://sourceforge.net/p/keepass/bugs/1421/ for this. Someone with sufficient permissions please set the URL or See-Also field of this bug report here. In the process I also found that ArchLinux does the following in their prepare step: # "Convert" to mono 4.0 sed -i '1s/ 10.00/ 11.00/' KeePass.sln find . -name "*.csproj" -exec sed -i '1s/"3.5"/"4.0"/' {} + See https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/keepass This is more compact than the Fedora solution from comment #3 resp. comment #6, albeit more obscure as well.
Do one of contributors of last few comments wish to substitute or co-maintain this package? Yet again a package where the 'actual' maintainer is absent but others 'pick up the baton'.
Ian, This package is maintained just fine. Your suggestion as to how to solve the issue with mono-4 while maintaining compatibility with older versions is welcome.
(In reply to Michael Palimaka (kensington) from comment #16) > how to solve the issue with mono-4 > while maintaining compatibility with older versions Please clarify: Both here and in comment #7, are you referring to build-time API compatibility, or are you referring to compatibility of the generated database files? Or in other words, is it that a build with the patch won't compile against mono 3, or that it will build against mono-4 but fail to read the database files from the previous version? If it's just build-time API compatibility, then we could either apply the patch conditionally, based e.g. on the output of “mono --version”. Yes, I know that's a hack, but not that different from what the configure script of autotooled packages does when setting preprocessor switches based on build environment. Or we could create two packages, one without the patch which depends on <mono-4 and one with the patch which depends on >=mono-4. Obviously the latter could only get stabilized after mono-4 itself becomes stable, so you'd be looking at pairs of revisions for a while. For that reason I'd prefer the former.
(In reply to Martin von Gagern from comment #17) > (In reply to Michael Palimaka (kensington) from comment #16) > > how to solve the issue with mono-4 > > while maintaining compatibility with older versions > > Please clarify: Both here and in comment #7, are you referring to build-time > API compatibility, or are you referring to compatibility of the generated > database files? Or in other words, is it that a build with the patch won't > compile against mono 3, or that it will build against mono-4 but fail to > read the database files from the previous version? > > If it's just build-time API compatibility, then we could either apply the > patch conditionally, based e.g. on the output of “mono --version”. Yes, I > know that's a hack, but not that different from what the configure script of > autotooled packages does when setting preprocessor switches based on build > environment. Or we could create two packages, one without the patch which > depends on <mono-4 and one with the patch which depends on >=mono-4. > Obviously the latter could only get stabilized after mono-4 itself becomes > stable, so you'd be looking at pairs of revisions for a while. For that > reason I'd prefer the former. I was referring to build-time compatibility, but I did see a few reports upstream about database compatibility that would need to be investigated. I would prefer to avoid the pairs of revisions too, so we could do something like has_version >=dev-lang/mono-4 && epatch foo if there's really no other option. CCing dotnet@ too in case they have any ideas.
I've been busy/abroad for quite some time. As soon as I get back I'll look into this. Sorry for the delay!
(In reply to Michael Palimaka (kensington) from comment #18) > I would prefer to avoid the pairs of revisions too, so we could do something > like has_version >=dev-lang/mono-4 && epatch foo if there's really no other > option. I'd go for this, are there any downsides? Another option might be to check if the /usr/lib64/mono/3.5/Microsoft.Common.tasks file exists. Shall I provide a patch? (In reply to Michael Palimaka (kensington) from comment #18) > I was referring to build-time compatibility, but I did see a few reports > upstream about database compatibility that would need to be investigated. Can you provide a link to this?
I've come up with a patch for the ebuild and for the source. Maybe the find + sed trick is going to be easier to maintain.
Created attachment 413204 [details, diff] Patch for =app-admin/keepass-2.30 to support >=dev-lang/mono-4
Created attachment 413206 [details, diff] Patch for keepass-2.30.ebuild to conditionally apply a patch to support >=dev-lang/mono-4
(In reply to Alessandro Di Federico from comment #20) > (In reply to Michael Palimaka (kensington) from comment #18) > > I was referring to build-time compatibility, but I did see a few reports > > upstream about database compatibility that would need to be investigated. > > Can you provide a link to this? I think it was this one: http://sourceforge.net/p/keepass/discussion/329221/thread/aa772ea6
commit d5094f447a1433978cff63283329e1659b3b1bc4 Author: Ian Delaney <idella4@gentoo.org> Date: Sun Oct 4 23:58:52 2015 +0800 app-admin/keepass: patch to build to support >=mono-4 pacthes supplied by maintainer via the gentoo bug Gentoo bug #558094
Works for me, thanks for fixing!