NetBSD Problem Report #58403

From tsutsui@ceres.dti.ne.jp  Sat Jul  6 13:11:44 2024
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 63DE21A923C
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  6 Jul 2024 13:11:44 +0000 (UTC)
Message-Id: <202407061311.466DBb7G003492@ceres.dti.ne.jp>
Date: Sat, 6 Jul 2024 22:11:37 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: pkgsrc-2024Q2 misc/libreoffice build fails on NetBSD/amd64 10.0
X-Send-Pr-Version: 3.95

>Number:         58403
>Category:       pkg
>Synopsis:       pkgsrc-2024Q2 misc/libreoffice build fails on NetBSD/amd64 10.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 06 13:15:00 +0000 2024
>Last-Modified:  Sat Jul 06 13:55:01 +0000 2024
>Originator:     Izumi Tsutsui
>Release:        NetBSD 10.0
>Organization:
>Environment:
System: NetBSD optiplex 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
pkgsrc-2024Q2 pkgsrc/misc/libreoffice build fails on NetBSD/amd64 10.0:
---
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Invoking ``package'' after barrier for libreoffice-24.2.3.2nb1
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Building for libreoffice-24.2.3.2nb1

 :

[build LOC] connectivity
[build DEP] LNK:Library/liblog_uno_uno.so.d
[build LNK] Library/liblog_uno_uno.so
[build DEP] LNK:Library/libunsafe_uno_uno.so.d
[build LNK] Library/libunsafe_uno_uno.so
[build BIN] cpputools
[build UIC] cui
/usr/bin/ld: warning: libstdc++.so.9, needed by /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.so, may conflict with libstdc++.so.7
/usr/bin/ld: warning: libstdc++.so.9, needed by [build LOC] cui
/s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.so, may conflict with libstdc++.so.7
[build GPK] desktop_unopackages_install
[build DEP] LNK:Library/libdeployment.so.d
[build LNK] Library/libdeployment.so
[build DEP] LNK:Library/libdeploymentgui.so.d
[build LNK] Library/libdeploymentgui.so
[build CMP] desktop/source/offacc/offacc
[build CMP] desktop/source/splash/spl
[build UIC] desktop
[build DEP] LNK:Library/libunopkgapp.so.d
[build LNK] Library/libunopkgapp.so
[build CMP] desktop/source/migration/services/migrationoo2
[build CMP] desktop/source/migration/services/migrationoo3
[build DEP] LNK:Executable/oosplash.d
[build LNK] Executable/oosplash
[build LOC] desktop
/usr/bin/ld: warning: libstdc++.so.9, needed by /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.so, may conflict with libstdc++.so.7
/usr/bin/ld: warning: libstdc++.so.9, needed by /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.so, may conflict with libstdc++.so.7
[build DEP] LNK:Executable/xrmex.d
[build LNK] Executable/xrmex
/usr/bin/ld: /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/libreoffice-24.2.3.2/instdir/sdk/lib/libuno_sal.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
/usr/bin/ld: /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/libreoffice-24.2.3.2/instdir/sdk/lib/libuno_sal.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
collect2: error: ld returned 1 exit status
gmake[1]: *** [/s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/libreoffice-24.2.3.2/desktop/Executable_oosplash.mk:10: /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/libreoffice-24.2.3.2/instdir/program/oosplash] Error 1
/usr/bin/ld: warning: libstdc++.so.9, needed by /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.sogmake[1]: *** Waiting for unfinished jobs....
, may conflict with libstdc++.so.7
/usr/bin/ld: warning: libstdc++.so.9, needed by /s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.so, may conflict with libstdc++.so.7
gmake: *** [Makefile:289: build] Error 2
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/misc/libreoffice
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/misc/libreoffice

--

>How-To-Repeat:
"make package" on pkgsrc-2024Q2 + NetBSD/amd64 10.0

>Fix:
No idea.
Use clang instead as mentioned in pkg/58145?

---
Izumi Tsutsui

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/58403: pkgsrc-2024Q2 misc/libreoffice build fails on NetBSD/amd64
	 10.0
Date: Sat, 6 Jul 2024 22:53:34 +0900

 > >/s/obj.x86_64/pkgsrc/misc/libreoffice/work.x86_64/.buildlink/lib/libboost_system.so, may conflict with libstdc++.so.7
 > 
 > That sounds like there is an older dependency package on the system
 > (libboost?) that was built against a different libstdc++ version.
 > 
 > pbulk produced:
 > 
 > -rw-r--r--  1 root  wheel  476141551 Apr  3 18:56 final-amd64-10.0-2024Q1/All/libreoffice-24.2.1.2.tgz
 > -rw-r--r--  1 root  wheel  476239131 Apr  2 04:18 final-amd64-9.0-2024Q1/All/libreoffice-24.2.1.2.tgz

 Hmm. The whole builds have been done after "pkg_delete -r '*'" so
 I believe there is no old stale package binaries.

 However this build host have been upgraded from NetBSD
 7.x -> 8.x -> 9.x -> 10.0 so it has follwoing old (compat)
 libstdc++ libraries in /usr/lib:

 ---
 optiplex# ls -l /usr/lib/libstdc++*
 -r--r--r--  1 root  wheel   5559482 Mar 28 17:33 /usr/lib/libstdc++.a
 lrwxr-xr-x  1 root  wheel        16 Mar 28 17:33 /usr/lib/libstdc++.so -> libstdc++.so.9.0
 lrwxr-xr-x  1 root  wheel        16 Mar 16  2018 /usr/lib/libstdc++.so.7 -> libstdc++.so.7.3
 -r--r--r--  1 root  wheel   1312257 Mar 16  2018 /usr/lib/libstdc++.so.7.3
 -r--r--r--  1 root  wheel   1459080 May 31  2019 /usr/lib/libstdc++.so.8.0
 lrwxr-xr-x  1 root  wheel        16 Mar 28 17:33 /usr/lib/libstdc++.so.9 -> libstdc++.so.9.0
 -r--r--r--  1 root  wheel   2497616 Mar 28 17:33 /usr/lib/libstdc++.so.9.0
 -r--r--r--  1 root  wheel   5774118 Mar 28 17:33 /usr/lib/libstdc++_p.a
 -r--r--r--  1 root  wheel  16877004 May 31  2019 /usr/lib/libstdc++_pic.a
 optiplex# 
 ---

 Note libboost_system.so (and all other /usr/pkg/lib/lib*.so.* libraries)
 links newer libstdc++.so.9 properly:
 ---
 optiplex# ldd /usr/pkg/lib/libboost_system.so.1.85.0 
 /usr/pkg/lib/libboost_system.so.1.85.0:
         -lstdc++.9 => /usr/lib/libstdc++.so.9
         -lm.0 => /usr/lib/libm.so.0
         -lc.12 => /usr/lib/libc.so.12
         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
         -lpthread.1 => /usr/lib/libpthread.so.1
 optiplex# ldd /usr/pkg/lib/lib*.so.*.* | grep 'libstdc++.so.7' | wc -l
        0
 optiplex# ldd /usr/pkg/lib/lib*.so.*.* | grep 'libstdc++.so.9' | wc -l
      314
 optiplex# ldd /usr/pkg/bin/* 2> /dev/null | grep 'libstdc++.so.7' | wc -l
        0
 optiplex# ldd /usr/pkg/bin/* 2> /dev/null | grep 'libstdc++.so.9' | wc -l
      466
 optiplex# 
 ---

 How should I check which binaries link the old libstdc++.so.7?

 ---
 Izumi Tsutsui

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.