Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: NEW: databases/mongodb/80
To:
Rafael Sadowski <rafael@sizeofvoid.org>, ports@openbsd.org
Date:
Tue, 26 Aug 2025 11:48:55 +0100

Download raw body.

Thread
On 2025/08/22 11:31, Stuart Henderson wrote:
> Tried teating 80 but it's building with debug symbols (-g2) despite no
> DEBUG_PACKAGES, so it doesn't fit in my 40GB pobj

Looks like it probably just needs this in place of your version -
still building

Index: SConstruct
--- SConstruct.orig
+++ SConstruct
@@ -120,7 +120,7 @@ def make_variant_dir_generator():
 
 # Always randomize the build order to shake out missing edges, and to help the cache:
 # http://scons.org/doc/production/HTML/scons-user/ch24s06.html
-SetOption('random', 1)
+#SetOption('random', 1)
 
 # Options TODOs:
 #
@@ -1730,6 +1730,7 @@ envDict = dict(
     CONFIGURELOG='$BUILD_ROOT/scons/config.log',
     CONFIG_HEADER_DEFINES={},
     LIBDEPS_TAG_EXPANSIONS=[],
+    ENV = {'PATH': os.environ['PATH']},
     MSVC_VERSION=variables_only_env.get("MSVC_VERSION"),
     MSVC_TOOLSET_VERSION=variables_only_env.get("MSVC_TOOLSET_VERSION"),
 )
@@ -1848,7 +1849,7 @@ if has_option('variables-help'):
 
 unknown_vars = env_vars.UnknownVariables()
 if unknown_vars:
-    env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
+    print("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
 
 install_actions.setup(env, get_option('install-action'))
 
@@ -2096,7 +2097,8 @@ if env.TargetOSIs('posix'):
         env.Append(
             CCFLAGS_WERROR=["-Werror"],
             CXXFLAGS_WERROR=["-Werror=unused-result"] if env.ToolchainIs("clang") else [],
-            LINKFLAGS_WERROR=["-Wl,--fatal-warnings"] if not env.TargetOSIs("darwin") else [],
+            # trips on API warnings in libc
+            #LINKFLAGS_WERROR=["-Wl,--fatal-warnings"] if not env.TargetOSIs("darwin") else [],
         )
 elif env.TargetOSIs('windows'):
     env.Append(CCFLAGS_WERROR=["/WX"])
@@ -2796,7 +2798,7 @@ if env.TargetOSIs('linux'):
 elif env.TargetOSIs('solaris'):
     env.Append(LIBS=["socket", "resolv", "lgrp"])
 
-elif env.TargetOSIs('freebsd'):
+elif env.TargetOSIs('freebsd', 'openbsd'):
     env.Append(LIBS=["kvm"])
     env.Append(CCFLAGS=["-fno-omit-frame-pointer"])
 
@@ -3123,7 +3125,6 @@ if env.TargetOSIs('posix'):
     env.Append(
         CCFLAGS=[
             "-fasynchronous-unwind-tables",
-            "-g2" if not env.TargetOSIs('emscripten') else "-g",
             "-Wall",
             "-Wsign-compare",
             "-Wno-unknown-pragmas",
@@ -3790,6 +3791,8 @@ def doConfigure(myenv):
 
         # TODO SERVER-58675 - Remove this suppression after abseil is upgraded
         myenv.AddToCXXFLAGSIfSupported("-Wno-deprecated-builtins")
+        # src/mongo/bson/bsonelement.h:1068:22: error: implicit conversion from 'std::numeric_limits<long long>::type' (aka 'long long') to 'double' changes value from 9223372036854775807 to 9223372036854775808
+        myenv.AddToCXXFLAGSIfSupported("-Wno-implicit-const-int-float-conversion")
 
         # Check if we can set "-Wnon-virtual-dtor" when "-Werror" is set. The only time we can't set it is on
         # clang 3.4, where a class with virtual function(s) and a non-virtual destructor throws a warning when
@@ -4974,7 +4977,7 @@ def doConfigure(myenv):
         sslLibName = "ssl"
         cryptoLibName = "crypto"
         sslLinkDependencies = ["crypto", "dl"]
-        if conf.env.TargetOSIs('freebsd'):
+        if conf.env.TargetOSIs('freebsd', 'openbsd'):
             sslLinkDependencies = ["crypto"]
 
         if conf.env.TargetOSIs('windows'):