GNU bug report logs - #76753
[PATCH] build: fix link errors on AIX

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: cppi; Reported by: Collin Funk <collin.funk1@HIDDEN>; Keywords: fixed patch; Done: Collin Funk <collin.funk1@HIDDEN>; Maintainer for cppi is bug-cppi@HIDDEN.
Added tag(s) fixed. Request was from Collin Funk <collin.funk1@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug closed, send any further explanations to 76753 <at> debbugs.gnu.org and Collin Funk <collin.funk1@HIDDEN> Request was from Collin Funk <collin.funk1@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Mar 2025 03:38:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 04 22:38:42 2025
Received: from localhost ([127.0.0.1]:33837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tpfaj-0003TP-B6
	for submit <at> debbugs.gnu.org; Tue, 04 Mar 2025 22:38:42 -0500
Received: from lists.gnu.org ([2001:470:142::17]:58920)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <collin.funk1@HIDDEN>)
 id 1tpfab-0003Sx-Rr
 for submit <at> debbugs.gnu.org; Tue, 04 Mar 2025 22:38:37 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <collin.funk1@HIDDEN>)
 id 1tpfaS-0003ak-Rw
 for bug-cppi@HIDDEN; Tue, 04 Mar 2025 22:38:25 -0500
Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <collin.funk1@HIDDEN>)
 id 1tpfaQ-0003DU-U7
 for bug-cppi@HIDDEN; Tue, 04 Mar 2025 22:38:24 -0500
Received: by mail-pj1-x1032.google.com with SMTP id
 98e67ed59e1d1-2fee05829edso7145293a91.3
 for <bug-cppi@HIDDEN>; Tue, 04 Mar 2025 19:38:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1741145900; x=1741750700; darn=gnu.org;
 h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc
 :subject:date:message-id:reply-to;
 bh=YUUBN2/55eK9JnekedEgL00hLYEwNEadKzPHWkQSaAg=;
 b=JRWnndS9TFa8g9QgiwiUyjaUvvHoKQ1k3F6MLmKYPmiXdH/sDel27F5AB82904wVmz
 MiJYbvhjgA482fbpH1djokRrwtkWdaKOR/XyI1AKQlrJZfj/m9bzlQltNAbv5ullxgI+
 nvaqLLXSi9sDuDT4ibRRrSB4V33si8wG5AKr6nP2UsBM0aYXZVEJxZqcqENMsQryp+AK
 VAaqsxXV4N9YEB0yNBMJBz5Eq74xDM+AAPHR5hi+6EgMc6TnE+U40O8QFC69BcNtsaqb
 zCsDU3q7DAeejuy9g71hnmARcDhunlfBxf10uD882fts92VwHRP9VUf2PDDOrljeVNam
 I5/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1741145900; x=1741750700;
 h=mime-version:user-agent:message-id:date:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=YUUBN2/55eK9JnekedEgL00hLYEwNEadKzPHWkQSaAg=;
 b=wJk0VN/ofLOq1raICLm9zPf+Eju+7dLZkHgGKU088ImH2O1tuO+bYgskkku78FgyTU
 uFjAAqietg9eZCWNgTwIaaOfMdRCeMDd8O+xlmK4SnaMWYQEGjaToxSBHR2FAcArSPQp
 QXFTcZWGOz6bqeWe1uB1mk0i3BDOUFYJeqXwY4e1Mr0V8l5UnG/l6/QqLg5JWSy9ynvO
 txAzWCCSgTC7GIJl/iXo9nfCUO4zlCwg+D4dnrTNMflfOHnckW7iMMGBFiF0fIh7Z8di
 24k2bAx+wncADymd0vbd7vkensw3DUsoDqtGB+11yS8LD/mjS86Xac5n6U6Z8RDuQifX
 U3fA==
X-Gm-Message-State: AOJu0YzvL9nDmBJx1hyLpNHUk6tGHag89y84rvIq9paBjHgiEAyXNDY5
 YQmM1NNu0sTbbnhxFO+omhm/30C0Tb9v8GDOw/Qtb4n/n3KHAVBvYbgpDrGf
X-Gm-Gg: ASbGnctM1LJa0jinamdjhUbRjOuMJUIA3FsRDvmXFg+zk8EQ6pGQH5uakrvoJyagXFN
 ZZ1BztvtJD3W2mxPWXCPEckbL/nQ7KT+y7NdBmZ74sGOaZhiipYo4W0WiW+6FtWMHIoYwbtIGGS
 Cnrwdnr0UsnlGXl8yze6mJ1dz1/Ct+2do/1i4qroCZ/KQlHAY+kaidQYoowdSWLjj9kUQspuKRC
 zmdZXBqh6TyuR4SZeM/pSREJlchHFtVrnJFF6vXhSBvQy4WGGjG4iI+dWOZAU7wL45Oc4plzyAl
 GLmV+vQYk+SEM1EaG15M+/Glpe/bZBDfab5tpQNcq1OvVzYf1XuynuDdZvO+4RrFZRXosmyKPg=
 =
X-Google-Smtp-Source: AGHT+IHuiWpeZGknWhf9wsnpw596+A8fG6UchMalZN4xWF3b7T2ahF1XKxYp7bK4zYR5Ky+ORctqig==
X-Received: by 2002:a05:6a21:a43:b0:1f3:323e:373e with SMTP id
 adf61e73a8af0-1f3494784c8mr2997494637.16.1741145900414; 
 Tue, 04 Mar 2025 19:38:20 -0800 (PST)
Received: from fedora (c-73-93-224-2.hsd1.ca.comcast.net. [73.93.224.2])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-7364e72b7a3sm5488422b3a.74.2025.03.04.19.38.18
 for <bug-cppi@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 04 Mar 2025 19:38:19 -0800 (PST)
From: Collin Funk <collin.funk1@HIDDEN>
To: bug-cppi@HIDDEN
Subject: [PATCH] build: fix link errors on AIX
Date: Tue, 04 Mar 2025 19:38:17 -0800
Message-ID: <87pliw1712.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::1032;
 envelope-from=collin.funk1@HIDDEN; helo=mail-pj1-x1032.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On AIX,
 I see the following: CCLD src/cppi ld: 0711-317 ERROR:
 Undefined symbol: .pthread_mutex_lock ld: 0711-317 ERROR: Undefined symbol:
 .pthread_mutex_unlock ld: 0711-345 Use the -bloadmap or -bnoquiet option
 to obtain more i [...] 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (collin.funk1[at]gmail.com)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (collin.funk1[at]gmail.com)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

--=-=-=
Content-Type: text/plain

On AIX, I see the following:

  CCLD     src/cppi
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status

This is due to some gnulib functions using mbrtoc32, etc. which use
locks.

The following patch adds the link flags.

Collin


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-build-fix-link-errors-on-AIX.patch

From 14dd28ec99b351d54ee1406000815a1f9ff4069d Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@HIDDEN>
Date: Tue, 4 Mar 2025 19:33:37 -0800
Subject: [PATCH] build: fix link errors on AIX

* src/local.mk (LDADD): Add libraries listed by gnulib-tool --import.
* .gitignore: Add files generated by Gnulib.
---
 .gitignore   | 20 ++++++++++++++++++++
 src/local.mk |  4 +++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index ecb861c..25c40c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,17 +25,37 @@
 /lex.backup
 /lib/*.o
 /lib/.gitignore
+/lib/alloca.h
 /lib/arg-nonnull.h
 /lib/c++defs.h
 /lib/charset.alias
 /lib/config.h
 /lib/configmake.h
+/lib/error.h
+/lib/fcntl.h
 /lib/glthread
 /lib/gnulib.mk.bak
+/lib/inttypes.h
 /lib/libcppi.a
+/lib/limits.h
 /lib/link-warning.h
+/lib/locale.h
+/lib/obstack.h
 /lib/stamp-h1
+/lib/stddef.h
+/lib/stdio.h
+/lib/stdlib.h
+/lib/string.h
+/lib/sys/
+/lib/time.h
+/lib/uchar.h
+/lib/unictype.h
+/lib/unictype/
+/lib/unistd.h
+/lib/unitypes.h
 /lib/warn-on-use.h
+/lib/wchar.h
+/lib/wctype.h
 /m4
 /m4/.gitignore
 /maint.mk
diff --git a/src/local.mk b/src/local.mk
index c43c32e..5717831 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -20,7 +20,9 @@ GPERF = gperf
 
 AM_CPPFLAGS += -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
 
-LDADD = $(top_builddir)/lib/libcppi.a $(LIBINTL) $(top_builddir)/lib/libcppi.a
+LDADD = $(top_builddir)/lib/libcppi.a $(LIBINTL) \
+  $(top_builddir)/lib/libcppi.a $(HARD_LOCALE_LIB) $(LIBC32CONV) \
+  $(LIBUNISTRING) $(MBRTOWC_LIB) $(SETLOCALE_NULL_LIB)
 
 GPERF_OPTIONS = \
   -C -N cpp_cond_lookup -n -t -s 6 -k '*' --language=ANSI-C
-- 
2.48.1


--=-=-=--




Acknowledgement sent to Collin Funk <collin.funk1@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-cppi@HIDDEN. Full text available.
Report forwarded to bug-cppi@HIDDEN:
bug#76753; Package cppi. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 8 Jul 2025 01:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.