Bug 245976 - databases/mongodb40: Update to 4.0.18
Summary: databases/mongodb40: Update to 4.0.18
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-27 16:23 UTC by Gian-Simon Purkert
Modified: 2020-06-26 16:25 UTC (History)
3 users (show)

See Also:
dev.ashevchuk: maintainer-feedback+


Attachments
Update to 4.0.18 (1.88 KB, patch)
2020-04-27 16:23 UTC, Gian-Simon Purkert
no flags Details | Diff
New port: databases/mongodb42 (127.08 KB, patch)
2020-06-03 13:17 UTC, Andrew Shevchuk
no flags Details | Diff
New port: databases/mongodb42-tools (8.56 KB, patch)
2020-06-03 14:42 UTC, Andrew Shevchuk
no flags Details | Diff
patch (1.71 KB, patch)
2020-06-06 19:10 UTC, Mikael Urankar
no flags Details | Diff
patch including fix from comment 12 (2.57 KB, patch)
2020-06-07 20:27 UTC, Ronald Klop
dev.ashevchuk: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gian-Simon Purkert 2020-04-27 16:23:15 UTC
Created attachment 213862 [details]
Update to 4.0.18
Comment 1 Andrew Shevchuk 2020-04-27 19:20:09 UTC
Unfortunately, this software version cannot be compiled.
During assembly, we get many linker errors, like this one:
===
/usr/local/bin/ld.gold: error: build/opt/mongo/util/options_parser/liboptions_parser_init.a(build/opt/mongo/util/options_parser/options_parser_init.o): multipledefinition of 'mongo::error_details::isNamedCode<0>'
===

This requires additional research.
I will try to fix it as soon as a little free time appears.
Comment 2 Gian-Simon Purkert 2020-04-27 20:05:39 UTC
Perfect,

Have a nice Day
Comment 3 Ronald Klop 2020-06-03 09:09:13 UTC
It builds fine on my 12.1 aarch64 RPI3B.
Comment 4 Andrew Shevchuk 2020-06-03 13:17:31 UTC
Created attachment 215194 [details]
New port: databases/mongodb42
Comment 5 Andrew Shevchuk 2020-06-03 13:26:39 UTC
Not sure if I have chosen the right place for the new port.
Nevertheless, I propose a new port: databases/mongodb42.

It is not clear what to do with the database / mongodb40 port,
since attempts to upgrade it to version 4.0.18 turned out to be a rabbit hole.
I think that it would be useful to leave it
to be able to migrate from earlier versions of the database.
Perhaps if I find the time, I can update it later.
Comment 6 Andrew Shevchuk 2020-06-03 14:42:41 UTC
Created attachment 215197 [details]
New port: databases/mongodb42-tools
Comment 7 Ronald Klop 2020-06-03 15:13:16 UTC
(In reply to Andrew Shevchuk from comment #5)

There is already bug #242002 for mongodb42.
Comment 8 Andrew Shevchuk 2020-06-03 15:44:14 UTC
(In reply to Ronald Klop from comment #7)
Oh great. Thank.
Then maybe you can get my patch for tools?
Comment 9 Ronald Klop 2020-06-05 21:52:21 UTC
(In reply to Andrew Shevchuk from comment #8)

I created bug #247021 for mongodb42-tools.

In general it is easier to create a new issue for a new port and not mixup all kind of patches in an existing issue. This is my idea, I didn't read the porters handbook about this. But I guess this is called issue hijacking. Which adds noise to the process IMHO.
Comment 10 Ronald Klop 2020-06-05 21:54:44 UTC
I tried to compile mongodb 4.0.17 on 13/amd64. It gives the same linker error.

When I take a look at the package table at https://www.freshports.org/databases/mongodb40/ there is no pkg of mongodb 4.0.12 for amd64 either. So we might mark it as broken on FreeBSD:13:amd64 and upgrade to 4.0.18 anyway. That would not make anything worse as it compiles fine on FreeBSD:12:*.
Comment 11 Ronald Klop 2020-06-05 21:58:23 UTC
(In reply to Ronald Klop from comment #10)

4.0.12 fails on Freebsd:13:aarch64 also.
See: http://thunderx1.nyi.freebsd.org/data/head-arm64-default/p535505_s361118/logs/errors/mongodb40-4.0.12_1.log

So I think it is best to mark it broken on FreeBSD:13:* and upgrade to 4.0.18.
Comment 13 Mikael Urankar freebsd_committer 2020-06-06 18:21:42 UTC
I also had to use scons:python2
Comment 14 Mikael Urankar freebsd_committer 2020-06-06 19:10:17 UTC
Created attachment 215299 [details]
patch

And if you want to remove the c++17 warnings:
https://github.com/mongodb/mongo/commit/01d84b2565fc9ea9626a55dcf1f3f817968088f2
Comment 15 Ronald Klop 2020-06-07 20:27:08 UTC
Created attachment 215335 [details]
patch including fix from comment 12

This includes the patch from comment #12.
It is tested on FreeBSD 12 & 13.
Comment 16 Ronald Klop 2020-06-10 15:12:05 UTC
I'm wondering why the license is changed to SSPLv1 only?
The source from MongoDB still contains the APACHE-2.0.txt license file also. Is the Apache license unused?
Comment 17 Gian-Simon Purkert 2020-06-11 09:47:25 UTC
It looks like all released versions after October 16, 2018 are now SSPv1, but the drivers are still under Apache2:

https://www.mongodb.com/community/licensing
Comment 18 Mikael Urankar freebsd_committer 2020-06-13 08:48:34 UTC
(In reply to Ronald Klop from comment #15)
fails for me on 13 amd64:

===>  Building for mongodb40-4.0.18
scons: Reading SConscript files ...
  File "/wrkdirs/usr/ports/databases/mongodb40/work/mongodb-src-r4.0.18/SConstruct", line 909

    print( "python version: " + " ".join( [ `i` for i in sys.version_info ] ) )

                                            ^

SyntaxError: invalid syntax
Comment 19 Ronald Klop 2020-06-13 14:06:42 UTC
(In reply to Mikael Urankar from comment #18)
My patch was created on 13 amd64 also.
How recent is your ports tree and what versions of python and scons are installed on your machine?
Comment 20 Mikael Urankar freebsd_committer 2020-06-13 14:36:02 UTC
(In reply to Ronald Klop from comment #19)
r537478 (2020-06-01)
I use poudriere, so whatever pkgs needed by the ports.
Comment 21 Ronald Klop 2020-06-14 13:09:16 UTC
(In reply to Mikael Urankar from comment #20)
Hi, I can repeat your error if I revert ports r536497.
Does your mongodb40/Makefile contain 'scons:python2' in the USES statement?
If not (it just says 'scons') it will use python3 and that indeed gives this error.

My poudriere run is still compiling for a few hours but the error you mention is directly at the start, so I'm certain I'm not seeing that in my clean poudriere build.
Comment 22 Mikael Urankar freebsd_committer 2020-06-14 17:53:17 UTC
(In reply to Ronald Klop from comment #21)
Yes, my ports tree was a bit outdated. scons:python2 is there now
Comment 23 commit-hook freebsd_committer 2020-06-16 16:37:07 UTC
A commit references this bug:

Author: mikael
Date: Tue Jun 16 16:36:13 UTC 2020
New revision: 539367
URL: https://svnweb.freebsd.org/changeset/ports/539367

Log:
  databases/mongodb40: Update to 4.0.18

  PR:		245976
  Submitted by:	Ronald Klop
  Approved by:	Andrew Shevchuk (maintainer)

Changes:
  head/databases/mongodb40/Makefile
  head/databases/mongodb40/distinfo
  head/databases/mongodb40/files/patch-src_mongo_base_error__codes.tpl.h
Comment 24 Mikael Urankar freebsd_committer 2020-06-16 16:37:29 UTC
thanks!
Comment 25 Ronald Klop 2020-06-26 16:25:55 UTC
BTW, the license change in the first patch (which was copied in the follow-ups) was incorrect.
The pkg is currently not distributed.
This is corrected in the next update bug #247412.