[Bug 285708] sysutils/vtm: Fix build on i386

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 16 May 2025 19:51:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285708

--- Comment #20 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
Thanks for making it more explicit about
avoiding libc++ .

In my environment, based on:

# git -C /usr/ports/ diff sysutils/vtm | cat
diff --git a/sysutils/vtm/Makefile b/sysutils/vtm/Makefile
index 8424cd1243bf..ba6c2e2c416d 100644
--- a/sysutils/vtm/Makefile
+++ b/sysutils/vtm/Makefile
@@ -20,6 +20,15 @@ LDFLAGS+=    -L${LUA_LIBDIR}

 PLIST_FILES=   bin/vtm

+.include <bsd.port.pre.mk>
+.if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386
+# explicit: GCC uses libstdc++ by default, otherwise
+# using libc++ cause the build to fail due to 
+# memory issues on these architectures above.
+USE_GCC=       yes
+CXXFLAGS+=     -stdlib=libstdc++
+.endif
+
 post-patch:
        ${REINPLACE_CMD} 's/lua-5.4/lua-${LUA_VER}/g' \
                ${WRKSRC}/CMakeLists.txt

Its armv7 build worked:

[00:00:25] [01] [00:00:00] Building   sysutils/vtm | vtm-0.9.99.70
[00:05:48] [01] [00:05:23] Finished   sysutils/vtm | vtm-0.9.99.70: Success


Note: it turns out that the line:

+# using libc++ cause the build to fail due to 

has a trailing space at the end, as git showed
when I did the diff.


Side note . . .

The:

# time -l poudriere bulk -jrelease-armv7 -w -C sysutils/vtm

reported:    2204548  maximum resident set size

While using libstdc++ and lang/gcc13 it fit
in the address space for an armv7 poudriere
jail on the aarch64 system, it still is a
rather large compile: on a small arm board
with 2 GiBytes of RAM, paging to a swap
space would seem to be required in order for
the build to complete.

The build was done on a Windows Dev Kit
2023.

-- 
You are receiving this mail because:
You are the assignee for the bug.