Created attachment 213862 [details] Update to 4.0.18
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.
Perfect, Have a nice Day
It builds fine on my 12.1 aarch64 RPI3B.
Created attachment 215194 [details] New port: databases/mongodb42
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.
Created attachment 215197 [details] New port: databases/mongodb42-tools
(In reply to Andrew Shevchuk from comment #5) There is already bug #242002 for mongodb42.
(In reply to Ronald Klop from comment #7) Oh great. Thank. Then maybe you can get my patch for tools?
(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.
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:*.
(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.
(In reply to Ronald Klop from comment #11) It's fixed upstream: https://jira.mongodb.org/browse/SERVER-44025 https://github.com/mongodb/mongo/commit/e484c9af6b4ae4a1d22c905e252ad3ad13f30bfc
I also had to use scons:python2
Created attachment 215299 [details] patch And if you want to remove the c++17 warnings: https://github.com/mongodb/mongo/commit/01d84b2565fc9ea9626a55dcf1f3f817968088f2
Created attachment 215335 [details] patch including fix from comment 12 This includes the patch from comment #12. It is tested on FreeBSD 12 & 13.
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?
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
(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
(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?
(In reply to Ronald Klop from comment #19) r537478 (2020-06-01) I use poudriere, so whatever pkgs needed by the ports.
(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.
(In reply to Ronald Klop from comment #21) Yes, my ports tree was a bit outdated. scons:python2 is there now
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
thanks!
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.