Bug 238089 - lang/mono: Update to 5.20 (5.10.0 dates to 2018-02)
Summary: lang/mono: Update to 5.20 (5.10.0 dates to 2018-02)
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-mono mailing list
URL:
Keywords: patch
Depends on:
Blocks: 198727
  Show dependency treegraph
 
Reported: 2019-05-24 01:42 UTC by Conrad Meyer
Modified: 2019-12-04 10:06 UTC (History)
19 users (show)

See Also:
bugzilla: maintainer-feedback? (mono)


Attachments
Patch for port of lang/mono 5.20.1.19 (31.91 KB, patch)
2019-05-25 03:50 UTC, Dave Curylo
no flags Details | Diff
patch 5.20.1.34 (32.98 KB, patch)
2019-07-22 23:37 UTC, Igor Zabelin
no flags Details | Diff
patch 5.20.1.34 for actual version (32.99 KB, patch)
2019-09-24 13:25 UTC, Igor Zabelin
no flags Details | Diff
without a dependency on Python 2.7 (33.79 KB, patch)
2019-10-06 12:17 UTC, Igor Zabelin
no flags Details | Diff
The latest Stable Mono release is: 6.4.0 Stable (6.4.0.198) (36.63 KB, patch)
2019-12-01 21:55 UTC, Igor Zabelin
no flags Details | Diff
Patch to fix build on powerpc64 (3.38 KB, patch)
2019-12-02 23:36 UTC, Curtis Hamilton
no flags Details | Diff
Patch to 5.20.1.34 (34.13 KB, patch)
2019-12-03 12:58 UTC, Igor Zabelin
no flags Details | Diff
Patch to 6.4.0.198, support for powerpc64 (38.28 KB, patch)
2019-12-03 13:06 UTC, Igor Zabelin
no flags Details | Diff
Output of make makeplist (151.70 KB, text/plain)
2019-12-03 17:31 UTC, Curtis Hamilton
no flags Details
Patch to 6.4.0.198, support for powerpc64, pdb-mdb (101.69 KB, patch)
2019-12-03 20:29 UTC, Igor Zabelin
no flags Details | Diff
Patch to 6.4.0.198, support for powerpc64 (101.66 KB, patch)
2019-12-04 10:06 UTC, Igor Zabelin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer 2019-05-24 01:42:14 UTC

    
Comment 1 Dave Curylo 2019-05-25 03:50:20 UTC
Created attachment 204600 [details]
Patch for port of lang/mono 5.20.1.19

Many of the changes needed for mono 5.10 were rolled into upstream by time this 5.20.1.19 was released, so this removes those patches. Also changes were made in mono/tests/Makefile.am and mono/utils/mono-state.c for FreeBSD support in upstream, but they didn't make it in time for the 5.20.1.19 cut, so this patch accounts for those as well.
Comment 2 Dave Curylo 2019-05-25 03:52:21 UTC
Coincidentally I was working on this earlier this week, so I completed and tested a patch, and attached to this issue.  Please review and let me know if anything else is needed, otherwise it will be nice to bump up to this newer mono release.
Comment 3 Conrad Meyer freebsd_committer 2019-05-25 21:40:40 UTC
Hey Dave,

It's a happy coincidence! :-)  Your patch looks good to me, although I am not a ports committer and cannot approve it.
Comment 4 Daniel Porsch 2019-05-29 15:36:45 UTC
I tried this patch but I got this error:
===>  Building package for mono-5.20.1.19_1
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/de/LC_MESSAGES/mcs.mo:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/es/LC_MESSAGES/mcs.mo:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/ja/LC_MESSAGES/mcs.mo:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/pt_BR/LC_MESSAGES/mcs.mo:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/mono
=>> Cleaning up wrkdir
===>  Cleaning for mono-5.20.1.19_1
build of lang/mono | mono-5.20.1.19_1 ended at Wed May 29 17:34:24 CEST 2019
build time: 00:57:23
!!! build failure encountered !!!

Full log here: 
https://poudriere.digiworks.se/data/freebsd_12-0x64-HEAD/2019-05-29_16h36m37s/logs/errors/mono-5.20.1.19_1.log

Not sure whats wrong? It seem to build, but the packaging fails. :-(
Comment 5 Daniel Porsch 2019-05-30 01:18:25 UTC
It worked after removing NLS from options_unset in make.conf 
(In reply to Daniel Porsch from comment #4)
Comment 6 Thibault Payet 2019-06-09 17:28:25 UTC
(In reply to Daniel Porsch from comment #4)
For this the fix is to append %%NLS%% the corresponding files in the pkg-plist, so that the patch should be more ok
Comment 7 Igor Zabelin 2019-07-21 13:47:22 UTC
I have a question, for what is py-pillow needed here? As RUN_DEPENDS?
Don't see any references to use this.
Py-pillow requires by default a lot of dependencies. 


CONFLICTS_INSTALL=      czmq-3*
also not actual (bug 223188)
Comment 8 Igor Zabelin 2019-07-22 23:37:34 UTC
Created attachment 205999 [details]
patch 5.20.1.34

Py-pillow is needed only for mono-heapviz tool which is not used in all cases.
Here's my version of the patch for 5.20.1.34. mono-heapviz optional and disabled by default. 
Fixed postexec cert-sync in pkg-plist. Mono certificate store must be synchronized with ca_root_nss after install.
Comment 9 Justin Kyryliuk 2019-08-30 12:10:51 UTC
I know me too posts are in general frowned upon and should be avoided, but I'd like to chime in that the importance of this is raising, as many mono-reliant packages have moved off of 5.10 and will only support them for a short-while longer (such as the Sonarr project).
Comment 10 kralizeck 2019-09-09 15:32:36 UTC
(In reply to Igor Zabelin from comment #8)
I'm trying to apply your patch with no luck... I'm newby in this matters..

On a copy of /usr/ports/lang/mono I run:
patch -C < /tmp/mono-patch-5.20.1.34

with no errors, so I apply the patch:

patch < /tmp/mono-patch-5.20.1.34

All seems ok.

Now I run:
make install clean

This is the output:

===>  License MIT accepted by the user
===>   mono-5.20.1.34 depends on file: /usr/local/sbin/pkg - found
=> mono-5.20.1.34.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://download.mono-project.com/sources/mono/mono-5.20.1.34.tar.bz2
mono-5.20.1.34.tar.bz2                                 235 MB   65 MBps    04s
=> monolite-linux-1051000004-latest.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://download.mono-project.com/monolite/monolite-linux-1051000004-latest.tar.gz
monolite-linux-1051000004-latest.tar.gz               4707 kB   16 MBps    00s
===> Fetching all distfiles required by mono-5.20.1.34 for building
===>  Extracting for mono-5.20.1.34
=> SHA256 Checksum OK for mono-5.20.1.34.tar.bz2.
=> SHA256 Checksum OK for monolite-linux-1051000004-latest.tar.gz.
/bin/mkdir -p /hdd3/root/downgrades/mono/work/mono-5.20.1.34/mcs/class/lib/monolite-linux
/bin/mv /hdd3/root/downgrades/mono/work/monolite-linux-1051000004-latest /hdd3/root/downgrades/mono/work/mono-5.20.1.34/mcs/class/lib/monolite-linux/1051000004
===>  Patching for mono-5.20.1.34
===>  Applying FreeBSD patches for mono-5.20.1.34
  I can't seem to find a patch in there anywhere.
=> FreeBSD patch patch-configure.ac failed to apply cleanly.
*** Error code 1

Stop.
make[1]: stopped in /hdd3/root/downgrades/mono
*** Error code 1

Stop.
make: stopped in /hdd3/root/downgrades/mono


The file files/patch-configure.ac is empty.

Am I missing any step to apply the patch?
Thanks.
Comment 11 Henno Schooljan 2019-09-09 19:34:32 UTC
Apparently these zero-length files should be removed, patch -E should do that.
Comment 12 kralizeck 2019-09-10 07:24:28 UTC
(In reply to Henno Schooljan from comment #11)
Thanks!
It works.

On a clean copy of the mono 5.10 port I ran:

patch -E < /tmp/mono-patch-5.20.1.34
make install clean

It point finally to run make deinstall and make reinstall.

Sonarr, radarr and jackett are working without problems.
Comment 13 darius 2019-09-24 12:01:25 UTC
This no longer cleanly compiles due to a PORTREVISION bump but apart from that works for me on a 12.x system.

I tested it with Jackett, Emby, Sonarr and Radarr and it seems to work fine.

Can it be committed soon? :)

Thanks
Comment 14 Igor Zabelin 2019-09-24 13:25:37 UTC
Created attachment 207765 [details]
patch 5.20.1.34 for actual version
Comment 15 cadavor 2019-10-02 12:38:19 UTC
Try the install after applying the latest patch but get errors after building and installing :
====> Compressing man pages (compress-man)
===>  Installing for cmake-3.15.3
===>  Checking if cmake is already installed
===>   Registering installation for cmake-3.15.3 as automatic
[test] Installing cmake-3.15.3...
===>   mono-5.20.1.34 depends on package: cmake>0 - found
===>   Returning to build of mono-5.20.1.34
===>   mono-5.20.1.34 depends on executable: bison - found
===>   mono-5.20.1.34 depends on executable: gmake - found
===>   mono-5.20.1.34 depends on file: /usr/local/bin/python2.7 - found
===>   mono-5.20.1.34 depends on executable: msgfmt - found
===>   mono-5.20.1.34 depends on executable: Xvfb - not found
===>  License MIT accepted by the user
===>   xorg-vfbserver-1.19.1_12,1 depends on file: /usr/local/sbin/pkg - found
=> xorg-server-1.19.1.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/xorg/xserver.
=> Attempting to fetch https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.19.1.tar.bz2
xorg-server-1.19.1.tar.bz2                    100% of 5900 kB  512 kBps 00m12s
===> Fetching all distfiles required by xorg-vfbserver-1.19.1_12,1 for building
===>  Extracting for xorg-vfbserver-1.19.1_12,1
=> SHA256 Checksum OK for xorg/xserver/xorg-server-1.19.1.tar.bz2.
===>  Patching for xorg-vfbserver-1.19.1_12,1
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12176
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12177
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12178
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12179
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12183
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-1218x
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-1218y
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-13721
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-13723
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-os_io.c
===>   xorg-vfbserver-1.19.1_12,1 depends on package: libepoxy>0 - not found
===>  libepoxy-1.5.2 needs Python 3.3 at least, but 2.7 was specified.
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/libepoxy
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/x11-servers/xorg-vfbserver
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/x11-servers/xorg-vfbserver
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/mono
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/mono


New patch needed?
Comment 16 Igor Zabelin 2019-10-03 20:00:38 UTC
(In reply to cadavor from comment #15)

Here's the problem with xorg-vfbserver and libepoxy dependency. It's not about this mono patch.
Comment 17 Matt 2019-10-05 04:56:04 UTC
(In reply to cadavor from comment #15)

Run pkg install libepoxy-1.5.2 llvm80

sorts the issues
Comment 18 Jan-Willem Spuij 2019-10-06 09:24:09 UTC
Heapviz has been made optional, but the dependency on python2.7 specifically remains. In the light of python27 sunset, I suggest to either remove Heapviz or patch it so it runs on python3.
Comment 19 Igor Zabelin 2019-10-06 12:16:04 UTC
Here's another patch.
Python is required during compilation for mono/mini/genmdesc.py.
Now it's any version of Python.
Comment 20 Igor Zabelin 2019-10-06 12:17:19 UTC
Created attachment 208135 [details]
without a dependency on Python 2.7
Comment 21 cadavor 2019-10-07 08:31:58 UTC
(In reply to Matt from comment #17)
Thanks a lot.
First try by compiling those ports were so long but worked...
Question : is it necessary to keep those packages installed after completed installation of mono (disk space saving)?
Comment 22 pstk 2019-11-29 18:32:53 UTC
This patch will be merge soon?
Comment 23 Igor Zabelin 2019-12-01 21:55:19 UTC
Created attachment 209579 [details]
The latest Stable Mono release is: 6.4.0 Stable (6.4.0.198)

Here is the latest stable version for tests.
Comment 24 Curtis Hamilton 2019-12-02 23:36:43 UTC
Created attachment 209634 [details]
Patch to fix build on powerpc64
Comment 25 Curtis Hamilton 2019-12-02 23:38:18 UTC
(In reply to Igor Zabelin from comment #23)
While you're updating to 6.4.0, please add support for powerpc64.

Support for FreeBSD on powerpc64 has been available and stable since mono version 5.21. The attached patches allows mono to build from ports.

There also seem to be issues with missing files in the port build pkg-plist. The build produces "mdb" files where the pkg-list has "pdb" files.
Comment 26 Igor Zabelin 2019-12-03 11:12:15 UTC
(In reply to Curtis Hamilton from comment #25)

What are "mdb" files? It is an auto generated pkg-plist by make makeplist with minor changes from mono 5.20.1.34.
Comment 27 Igor Zabelin 2019-12-03 12:58:37 UTC
Created attachment 209650 [details]
Patch to 5.20.1.34

Don't need ac_cv_header_sys_inotify_h=no. We have sys/inotify.h at localbase.
Comment 28 Igor Zabelin 2019-12-03 13:06:30 UTC
Created attachment 209651 [details]
Patch to 6.4.0.198, support for powerpc64

Added support for powerpc64.
Comment 29 Curtis Hamilton 2019-12-03 16:31:03 UTC
(In reply to Igor Zabelin from comment #26)
"mdb" files are mono debugging symbol files which are created when mono is built,  on powerpc64.  They are similar to the "pdb", program data files. I don't know why they are not being built for other CPUs. The only differences I can see is "dtrace" and "btls" are disabled for powerpc64.

I'll continue to investigate. It may be necessary to disable "mdb" support when building mono on powerpc64.
Comment 30 Igor Zabelin 2019-12-03 16:49:44 UTC
(In reply to Curtis Hamilton from comment #29)
I meant the list of mdb files.
At least when no btls there are no files:

lib/libmono-btls-shared.so
lib/mono/4.5/Mono.Btls.Interface.dll
lib/mono/gac/Mono.Btls.Interface/4.0.0.0__0738eb9f132ed756/Mono.Btls.Interface.dll
lib/mono/gac/Mono.Btls.Interface/4.0.0.0__0738eb9f132ed756/Mono.Btls.Interface.pdb

Look at the last patch and pkg-plist. Now these files are tagged and skipped.
Please send me output of "make makeplist".
Comment 31 Curtis Hamilton 2019-12-03 17:31:21 UTC
Created attachment 209662 [details]
Output of make makeplist

Attached is the output you requested.
Comment 32 Igor Zabelin 2019-12-03 20:29:28 UTC
Created attachment 209671 [details]
Patch to 6.4.0.198, support for powerpc64, pdb-mdb

Indeed, the lists are different, mdb instead of pdb.
Comment 33 mikael.urankar 2019-12-04 08:13:19 UTC
On ppc64 elfv2:
cc: error: unknown argument: '-mminimal-toc'
Comment 34 mikael.urankar 2019-12-04 09:29:43 UTC
(In reply to mikael.urankar from comment #33)
built without x11 on ppc64 elfv2:
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: lib/mono/4.5/mdbrebase.exe
Comment 35 Igor Zabelin 2019-12-04 09:45:48 UTC
(In reply to mikael.urankar from comment #34)

Duplicate string %%PPC%%lib/mono/4.5/mdbrebase.exe in pkg-plist. Try to remove it.
Comment 36 Igor Zabelin 2019-12-04 10:06:00 UTC
Created attachment 209678 [details]
Patch to 6.4.0.198, support for powerpc64