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.
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.
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:
I also had to use scons:python2
Created attachment 215299 [details]
And if you want to remove the c++17 warnings:
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:
(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)
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:
Date: Tue Jun 16 16:36:13 UTC 2020
New revision: 539367
databases/mongodb40: Update to 4.0.18
Submitted by: Ronald Klop
Approved by: Andrew Shevchuk (maintainer)
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.