Created attachment 236797 [details] patch
Thanks for the patch. I have another patch in the pipeline that is not 900KB and also fixes amd64. Iām planning to post it next week. First want to see the 131arm64 pkg build result.
Thanks for testing on powerpc also. Did it build with LTO enabled? Amd64 on pkg build cluster is failing on what I suspect LTO. But my home Amd64 machine is too small to test LTO.
(In reply to Ronald Klop from comment #2) Oh I was mistaken. Arm64 fails on lto on the build cluster. Amd64 fails in the mozjs patches which I have a fix for.
We can most likely add a few more system libs looking at https://github.com/freebsd/freebsd-ports/blob/main/databases/mongodb50/Makefile#L46
Yes, it builds with LTO enabled. I know there are more system libraries available, but I couldn't build with them.
Created attachment 236821 [details] v2 Instead of using EXTRA_PATCHES, add all the patches unconditionally, since they don't clash with any of the code for other architectures.
Created attachment 236834 [details] git diff of databases/mongodb60 Hi, I added my local patch to the issue: - Instead of 1 MB of patches per platform generate the mozjs config. This also fixes the amd64 build because the upstream config does not build. Effectively I put the manual steps to generate the 1MB patch for mozjs config in the do-configure step in the Makefile. Will also ease future porting. - This removes the aarch64 patches. - This removes the need for powerpc64 patches. - Includes the system libs of Piotr Kubaj. - Portclippy + portlint happy.
Doesn't build on my end, boost related. I think I have a fix but it'll take a while for my box to run a test compile. What's the reason why we don't use llvm-ar and pull in binutils instead (I'm testing llvm-ar now)?
Created attachment 236837 [details] git diff of databases/mongodb60 Same patch but remove boost from system libs. It did not build this way.
(In reply to Daniel Engberg from comment #8) The binutils ar supports a feature doing something like this: generate-big-list-of-options.sh > /tmp/bla123.tmp ar @/tmp/bla123.tmp AFAIK llvm-ar does not support using a file for commandline options and the commandline provided to ar is really big. But times change so maybe nowadays it does work.
Created attachment 236846 [details] Patch for mongodb60 A few more additions on top of Roland's first patch * Remove dependency of binutils, use llvm-ar instead * Use (lib)stemmer and (lib)yaml from ports * Fix removal of (lib)zstd/zstandard directory * Drop -ggdb flag during compilation * Fix compilation when using boost library from ports (based on patches in mongodb50 port)
This builds on 13.1-STABLE (amd64) and binaries runs ( --version) but I would appreciate of someone could do a simple run test.
Also builds fine on powerpc64le on 13.1-RELEASE.
Awesome work. Doing a compile run on aarch64 with the latest patch of Daniel. Will take a while. ;-) But I think we are getting there.
(In reply to Ronald Klop from comment #10) BTW this comment was about /usr/bin/ar vs binutils ar, not llvm-ar vs binutils ar. I thought with llvm-ar you meant /usr/bin/ar. I now see these are different programs.
Comment on attachment 236846 [details] Patch for mongodb60 I think this patch is good. One minor thing. This line is not needed and broke my build with llvm-ar because I had an incompatible LDFLAGS set. + LDFLAGS="${LDFLAGS}" So apart from that line we should commit this version of the patch IMHO. Just to be sure: the whole files/aarch64 directory can be removed.
In the meantime I got an upgrade of my commit powers. š¦¾ Preparing a final commit for review in phabricator and doing a last test run in poudriere to make sure the patch builds.
Git commit builds fine in my Jenkins+Poudriere stage-qa. Commit is up for review: https://reviews.freebsd.org/D37130
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cbde7a63952df7113308e7e2ea2a0a1fec056719 commit cbde7a63952df7113308e7e2ea2a0a1fec056719 Author: Ronald Klop <ronald@FreeBSD.org> AuthorDate: 2022-10-25 10:20:00 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2022-10-26 16:18:34 +0000 databases/mongodb60: update to 6.0.2 Summary: - automate mozjs configuration - enables powerpc64le support - overwrites the upstream amd64 configuration which fixes the build - removes almost 1 MB of patches for aarch64 - use more system libs and llvm-ar (thanks to dizzy@) - Fix removal of (lib)zstd/zstandard directory which fixes the build on all supported platforms - change my maintainer email to @FreeBSD.org changes: https://www.mongodb.com/docs/manual/release-notes/6.0/#6.0.2---sep-28--2022 PR: 266587 Tested by: dizzy (libs), pkubaj (powerpc64le) Approved by: pkubaj (mentor), rene (mentor) Co-Authored-By: dizzy, pkubaj Differential Revision: https://reviews.freebsd.org/D37130 databases/mongodb60/Makefile | 93 +- databases/mongodb60/distinfo | 8 +- ...freebsd_build_Unified__cpp__js__src0.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src1.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src10.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src11.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src12.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src13.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src14.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src15.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src16.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src17.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src18.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src19.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src2.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src20.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src21.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src22.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src23.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src24.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src25.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src26.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src27.cpp (gone) | 41 - ...freebsd_build_Unified__cpp__js__src3.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src4.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src5.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src6.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src7.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src8.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src9.cpp (gone) | 59 - ...ger_Unified__cpp__js__src__debugger0.cpp (gone) | 59 - ...ger_Unified__cpp__js__src__debugger1.cpp (gone) | 32 - ...end_Unified__cpp__js__src__frontend0.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend1.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend2.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend3.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend4.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend5.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend6.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc0.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc1.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc2.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc3.cpp (gone) | 14 - ...exp_Unified__cpp__js__src__irregexp0.cpp (gone) | 59 - ...exp_Unified__cpp__js__src__irregexp1.cpp (gone) | 59 - ...exp_Unified__cpp__js__src__irregexp2.cpp (gone) | 23 - ...uild_jit_Unified__cpp__js__src__jit0.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit1.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit10.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit11.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit12.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit13.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit14.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit15.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit2.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit3.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit4.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit5.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit6.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit7.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit8.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit9.cpp (gone) | 59 - ...form_aarch64_freebsd_build_js-confdefs.h (gone) | 85 - ...ld_wasm_Unified__cpp__js__src__wasm0.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm1.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm2.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm3.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm4.cpp (gone) | 59 - ...nclude_frontend_ReservedWordsGenerated.h (gone) | 363 - ...reebsd_include_gc_StatsPhasesGenerated.h (gone) | 193 - ...reebsd_include_jit_CacheIROpsGenerated.h (gone) | 12512 ------------------- ..._freebsd_include_jit_LOpcodesGenerated.h (gone) | 571 - ...64_freebsd_include_jit_MIROpsGenerated.h (gone) | 2662 ---- ...rm_aarch64_freebsd_include_js-confdefs.h (gone) | 85 - ...form_aarch64_freebsd_include_js-config.h (gone) | 80 - ...aarch64_freebsd_include_selfhosted.out.h (gone) | 22 - databases/mongodb60/files/patch-SConstruct | 14 +- .../mongodb60/files/patch-boost179-link-fix (new) | 21 + .../files/patch-boost179-system-compat-fix (new) | 108 + .../files/patch-src_mongo_db_fts_stemmer.h (new) | 11 + 80 files changed, 222 insertions(+), 20315 deletions(-)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ebad9d5daabfc60074e1dac4616112b93fc9b132 commit ebad9d5daabfc60074e1dac4616112b93fc9b132 Author: Ronald Klop <ronald@FreeBSD.org> AuthorDate: 2022-10-25 10:20:00 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2022-11-03 08:44:27 +0000 databases/mongodb60: update to 6.0.2 Summary: - automate mozjs configuration - enables powerpc64le support - overwrites the upstream amd64 configuration which fixes the build - removes almost 1 MB of patches for aarch64 - use more system libs and llvm-ar (thanks to dizzy@) - Fix removal of (lib)zstd/zstandard directory which fixes the build on all supported platforms - change my maintainer email to @FreeBSD.org changes: https://www.mongodb.com/docs/manual/release-notes/6.0/#6.0.2---sep-28--2022 PR: 266587 Tested by: dizzy (libs), pkubaj (powerpc64le) Approved by: pkubaj (mentor), rene (mentor) Co-Authored-By: dizzy, pkubaj Differential Revision: https://reviews.freebsd.org/D37130 (cherry picked from commit cbde7a63952df7113308e7e2ea2a0a1fec056719) databases/mongodb60/Makefile | 93 +- databases/mongodb60/distinfo | 8 +- ...freebsd_build_Unified__cpp__js__src0.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src1.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src10.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src11.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src12.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src13.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src14.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src15.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src16.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src17.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src18.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src19.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src2.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src20.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src21.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src22.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src23.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src24.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src25.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src26.cpp (gone) | 59 - ...reebsd_build_Unified__cpp__js__src27.cpp (gone) | 41 - ...freebsd_build_Unified__cpp__js__src3.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src4.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src5.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src6.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src7.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src8.cpp (gone) | 59 - ...freebsd_build_Unified__cpp__js__src9.cpp (gone) | 59 - ...ger_Unified__cpp__js__src__debugger0.cpp (gone) | 59 - ...ger_Unified__cpp__js__src__debugger1.cpp (gone) | 32 - ...end_Unified__cpp__js__src__frontend0.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend1.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend2.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend3.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend4.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend5.cpp (gone) | 59 - ...end_Unified__cpp__js__src__frontend6.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc0.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc1.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc2.cpp (gone) | 59 - ..._build_gc_Unified__cpp__js__src__gc3.cpp (gone) | 14 - ...exp_Unified__cpp__js__src__irregexp0.cpp (gone) | 59 - ...exp_Unified__cpp__js__src__irregexp1.cpp (gone) | 59 - ...exp_Unified__cpp__js__src__irregexp2.cpp (gone) | 23 - ...uild_jit_Unified__cpp__js__src__jit0.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit1.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit10.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit11.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit12.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit13.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit14.cpp (gone) | 59 - ...ild_jit_Unified__cpp__js__src__jit15.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit2.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit3.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit4.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit5.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit6.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit7.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit8.cpp (gone) | 59 - ...uild_jit_Unified__cpp__js__src__jit9.cpp (gone) | 59 - ...form_aarch64_freebsd_build_js-confdefs.h (gone) | 85 - ...ld_wasm_Unified__cpp__js__src__wasm0.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm1.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm2.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm3.cpp (gone) | 59 - ...ld_wasm_Unified__cpp__js__src__wasm4.cpp (gone) | 59 - ...nclude_frontend_ReservedWordsGenerated.h (gone) | 363 - ...reebsd_include_gc_StatsPhasesGenerated.h (gone) | 193 - ...reebsd_include_jit_CacheIROpsGenerated.h (gone) | 12512 ------------------- ..._freebsd_include_jit_LOpcodesGenerated.h (gone) | 571 - ...64_freebsd_include_jit_MIROpsGenerated.h (gone) | 2662 ---- ...rm_aarch64_freebsd_include_js-confdefs.h (gone) | 85 - ...form_aarch64_freebsd_include_js-config.h (gone) | 80 - ...aarch64_freebsd_include_selfhosted.out.h (gone) | 22 - databases/mongodb60/files/patch-SConstruct | 14 +- .../mongodb60/files/patch-boost179-link-fix (new) | 21 + .../files/patch-boost179-system-compat-fix (new) | 108 + .../files/patch-src_mongo_db_fts_stemmer.h (new) | 11 + 80 files changed, 222 insertions(+), 20315 deletions(-)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a274805b0754f7f39b458775ad33dbf8eb567fa0 commit a274805b0754f7f39b458775ad33dbf8eb567fa0 Author: Antoine Brodin <antoine@FreeBSD.org> AuthorDate: 2022-10-30 09:53:04 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2022-11-03 08:44:28 +0000 databases/mongodb60: unbreak the ports tree on a lot of archs PR: 266587 (cherry picked from commit 9f13b7867d45995913dbad00c131dce4eac4bb23) databases/mongodb60/Makefile | 2 -- 1 file changed, 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=34381447a02db395fdec9a0c3946562023bc3d5c commit 34381447a02db395fdec9a0c3946562023bc3d5c Author: Ronald Klop <ronald@FreeBSD.org> AuthorDate: 2022-10-31 20:45:33 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2022-11-03 10:34:10 +0000 databases/mongodb60: mark ignore on FreeBSD 12.3. Summary: Llvm in FreeBSD 12.3 gives several compile errors. One example: src/mongo/s/sharding_initialization.cpp:171:49: error: no viable constructor or deduction guide for deduction of template arguments of 'weak_ptr' connPoolOptions.controllerFactory = [srwp = std::weak_ptr(srsp)] { http://beefy6.nyi.freebsd.org/data/123amd64-default/0116f5c59197/logs/errors/mongodb60-6.0.2.log 12.4 is expected to work again due to new libc++ PR: 266587 Approved by: rene (mentor) MFH: 2022Q4 Differential Revision: https://reviews.freebsd.org/D37230 databases/mongodb60/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=55836daf2c06dffad37caa5e5c6d38d1c01abd62 commit 55836daf2c06dffad37caa5e5c6d38d1c01abd62 Author: Ronald Klop <ronald@FreeBSD.org> AuthorDate: 2022-10-31 20:45:33 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2022-11-03 21:47:04 +0000 databases/mongodb60: mark ignore on FreeBSD 12.3. Summary: Llvm in FreeBSD 12.3 gives several compile errors. One example: src/mongo/s/sharding_initialization.cpp:171:49: error: no viable constructor or deduction guide for deduction of template arguments of 'weak_ptr' connPoolOptions.controllerFactory = [srwp = std::weak_ptr(srsp)] { http://beefy6.nyi.freebsd.org/data/123amd64-default/0116f5c59197/logs/errors/mongodb60-6.0.2.log 12.4 is expected to work again due to new libc++ PR: 266587 Approved by: rene (mentor) MFH: 2022Q4 Differential Revision: https://reviews.freebsd.org/D37230 (cherry picked from commit 34381447a02db395fdec9a0c3946562023bc3d5c) databases/mongodb60/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
Thanks for all the work you did!