Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558094 - app-admin/keepass-2.{29,30} don't build or run with >=dev-lang/mono-4
Summary: app-admin/keepass-2.{29,30} don't build or run with >=dev-lang/mono-4
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Alessandro Di Federico
URL: https://sourceforge.net/p/keepass/bug...
Whiteboard:
Keywords:
: 558712 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-18 17:44 UTC by Xavier Miller (RETIRED)
Modified: 2015-10-04 20:31 UTC (History)
18 users (show)

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


Attachments
build log (build.log,4.02 KB, text/plain)
2015-08-18 17:48 UTC, Xavier Miller (RETIRED)
Details
use v4 assemblies (keepass-2.30-framework-4.patch,11.73 KB, patch)
2015-08-26 04:17 UTC, Daniel Douglas
Details | Diff
apply patch (keepass-2.30.ebuild.patch,751 bytes, patch)
2015-08-26 04:23 UTC, Daniel Douglas
Details | Diff
Patch for =app-admin/keepass-2.30 to support >=dev-lang/mono-4 (keepass-2.30-mono-4-support.patch,5.68 KB, patch)
2015-09-28 15:25 UTC, Alessandro Di Federico
Details | Diff
Patch for keepass-2.30.ebuild to conditionally apply a patch to support >=dev-lang/mono-4 (keepass-2.30.ebuild.patch,501 bytes, patch)
2015-09-28 15:26 UTC, Alessandro Di Federico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Miller (RETIRED) gentoo-dev 2015-08-18 17:44:24 UTC
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"
Comment 1 Xavier Miller (RETIRED) gentoo-dev 2015-08-18 17:48:04 UTC
Created attachment 409384 [details]
build log
Comment 2 Xavier Miller (RETIRED) gentoo-dev 2015-08-18 18:10:20 UTC
masking >=dev-lang/mono-4 fixes the problem
Comment 3 Michael Palimaka (kensington) gentoo-dev 2015-08-19 13:11:49 UTC
Fedora uses these fixes, but I didn't test them yet: http://pkgs.fedoraproject.org/cgit/keepass.git/commit/?id=75b16329d8ad2eab246008a5820a0d1fde4dd5c6
Comment 4 Tamas Jantvik 2015-08-20 08:17:12 UTC
I tried them, and with them it compiles.
Comment 5 Xavier Miller (RETIRED) gentoo-dev 2015-08-21 09:20:43 UTC
Same issue with keepass-2.30. The workaround that modify the .sln file should also work.
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2015-08-22 04:29:11 UTC
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)!
Comment 7 Michael Palimaka (kensington) gentoo-dev 2015-08-22 18:16:14 UTC
Unfortunately this seems backwards incompatible.
Comment 8 Martin von Gagern 2015-08-23 20:15:43 UTC
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.
Comment 9 Michael Palimaka (kensington) gentoo-dev 2015-08-24 13:27:05 UTC
I saw one thread, but it wasn't particularly useful:

http://sourceforge.net/p/keepass/discussion/329221/thread/72db1a65/
Comment 10 Michael Palimaka (kensington) gentoo-dev 2015-08-25 12:14:21 UTC
*** Bug 558712 has been marked as a duplicate of this bug. ***
Comment 11 Daniel Douglas 2015-08-26 04:17:20 UTC
Created attachment 410302 [details, diff]
use v4 assemblies
Comment 12 Daniel Douglas 2015-08-26 04:23:37 UTC
Created attachment 410304 [details, diff]
apply patch
Comment 13 Daniel Douglas 2015-08-26 04:28:18 UTC
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.
Comment 14 Martin von Gagern 2015-08-27 13:02:40 UTC
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.
Comment 15 Ian Delaney (RETIRED) gentoo-dev 2015-09-04 07:26:05 UTC
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'.
Comment 16 Michael Palimaka (kensington) gentoo-dev 2015-09-04 15:00:18 UTC
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.
Comment 17 Martin von Gagern 2015-09-04 15:32:53 UTC
(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.
Comment 18 Michael Palimaka (kensington) gentoo-dev 2015-09-04 15:46:31 UTC
(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.
Comment 19 Alessandro Di Federico 2015-09-06 09:45:38 UTC
I've been busy/abroad for quite some time. As soon as I get back I'll look into this.

Sorry for the delay!
Comment 20 Alessandro Di Federico 2015-09-14 07:40:17 UTC
(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?
Comment 21 Alessandro Di Federico 2015-09-28 15:24:12 UTC
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.
Comment 22 Alessandro Di Federico 2015-09-28 15:25:45 UTC
Created attachment 413204 [details, diff]
Patch for =app-admin/keepass-2.30 to support >=dev-lang/mono-4
Comment 23 Alessandro Di Federico 2015-09-28 15:26:50 UTC
Created attachment 413206 [details, diff]
Patch for keepass-2.30.ebuild to conditionally apply a patch to support >=dev-lang/mono-4
Comment 24 Michael Palimaka (kensington) gentoo-dev 2015-09-29 18:21:18 UTC
(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
Comment 25 Ian Delaney (RETIRED) gentoo-dev 2015-10-04 16:00:52 UTC
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
Comment 26 jannis 2015-10-04 20:31:20 UTC
Works for me, thanks for fixing!