GNU bug report logs - #22464
AIX: compilation fails on AIX-7 (undefined symbol .rpl_malloc)

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: coreutils; Reported by: Assaf Gordon <assafgordon@HIDDEN>; dated Mon, 25 Jan 2016 16:56:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'AIX: compilation fails on AIX-7 (undefined symbol .rpl_malloc)' from 'compilation fails on AIX-7 (undefined symbol .rpl_malloc)' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 22464) by debbugs.gnu.org; 28 Jan 2016 22:24:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 28 17:24:34 2016
Received: from localhost ([127.0.0.1]:40092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aOuzS-0002Ki-In
	for submit <at> debbugs.gnu.org; Thu, 28 Jan 2016 17:24:34 -0500
Received: from mail-qg0-f44.google.com ([209.85.192.44]:34805)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <assafgordon@HIDDEN>) id 1aOuzQ-0002KU-30
 for 22464 <at> debbugs.gnu.org; Thu, 28 Jan 2016 17:24:33 -0500
Received: by mail-qg0-f44.google.com with SMTP id 6so51594029qgy.1
 for <22464 <at> debbugs.gnu.org>; Thu, 28 Jan 2016 14:24:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-type;
 bh=zjzpl8ol16UOT+3fFcJ0GE+DEcjniyqITOaZdcfx+tU=;
 b=r4kxRca8yLEQDsjEh1ErMmymVkDfsdMX4DVFX4GJJqoqAXOIDjGqnHbmWaIG0B9d/m
 oj1PP+CDyxaKOOQg3Ms+jBBdaCVc7dv5+RM7+To50qG8p4PhHq19TgHesEbPLKTDUK7v
 Wf5B+8i1HtyNInZxuEdq87hlinrr4a6B/FX1RBmfv+57g38/BNmGn2teZ78HNCJNPrlY
 3MI7FK9DOVlk/HmnQpuVbKrbDT6nUO3gQJnnXT5WUjp/FVoZGg3sMX5RN15zno7tuJcA
 gEmZ//edDsgsRGfzvpo1qvvKcksNtWL2BIgBlceBtjc4aYc608Dmk0UcKFgTG48yfxwc
 AQIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-type;
 bh=zjzpl8ol16UOT+3fFcJ0GE+DEcjniyqITOaZdcfx+tU=;
 b=bq7Fv/rG37+jOw/ioGBv+8XfZ0dZ+9DZw01X5PfN78slhkjgEzeKBQ4Oz/d8tDzC6t
 g0/KFm1EzLMPx0l04iADZxSiOeVE9g7VSCmMlSdPjqc0MGewnhOQTMJq5zfixPCVClef
 a5MzJsTpdF+txmIlotOW6+LqNZ82E0XlQIEEYphxHOVJadJl8DPzJM+2TNPpe7GE8Oed
 yC1SwC0W5talgcc4Nz6tjqWc7mftOI/+Pxep264LUiP5AoP9AQiA/914xlFQ77iCAzon
 NSi7/HvrFcLFF+xNBQXIee8GZzZuXwyP/D0v1ChkyovxtRLK8vd8XJjNWlojOm4mv/Ex
 NLgg==
X-Gm-Message-State: AG10YORECE9mrCWmprpQ6on8dmhZU+ffiXdghzPUfV0WGgY6yVPAvHRBwuGd2HofZGzCSw==
X-Received: by 10.140.43.69 with SMTP id d63mr6749042qga.18.1454019866721;
 Thu, 28 Jan 2016 14:24:26 -0800 (PST)
Received: from disco.erlich.nygenome.org ([69.74.14.178])
 by smtp.googlemail.com with ESMTPSA id c2sm4757967qkb.41.2016.01.28.14.24.25
 for <22464 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=OTHER);
 Thu, 28 Jan 2016 14:24:25 -0800 (PST)
Subject: Re: bug#22464: compilation fails on AIX-7 (undefined symbol
 .rpl_malloc)
To: 22464 <at> debbugs.gnu.org
References: <56A653DC.5020406@HIDDEN>
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <56AA9581.8080607@HIDDEN>
Date: Thu, 28 Jan 2016 17:26:09 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <56A653DC.5020406@HIDDEN>
Content-Type: multipart/mixed; boundary="------------090002010702090702070500"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22464
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.7 (/)

This is a multi-part message in MIME format.
--------------090002010702090702070500
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

On 01/25/2016 11:57 AM, Assaf Gordon wrote:
> compiling 8.25 on AIX-7 fails with "undefined symbol .rpl_malloc".
>
> I'll be able to investigate further a bit later, but this seems similar to:
>    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=12841
> ===
>    $ ./configure
>    $ make V=1
>    ...
>    ...
>          gcc -std=gnu99  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -D_THREAD_SAFE -fPIC  -g -O2 -MT src/src_libstdbuf_so-libstdbuf.o -MD -MP -MF src/.deps/src_libstdbuf_so-libstdbuf.Tpo -c -o src/src_libstdbuf_so-libstdbuf.o `test -f 'src/libstdbuf.c' || echo './'`src/libstdbuf.c
>          mv -f src/.deps/src_libstdbuf_so-libstdbuf.Tpo src/.deps/src_libstdbuf_so-libstdbuf.Po
>          gcc -std=gnu99 -fPIC  -g -O2  -shared  -o src/libstdbuf.so src/src_libstdbuf_so-libstdbuf.o
> ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
> collect2: error: ld returned 8 exit status

The attached patch avoids the error, though I'm not sure if it's optimal (it adds "#undef malloc" as suggested in the above bug report).

Compilation then succeeds, but make still fails due to some strange dependency issue with man-page generation:

====
$ make V=1
         make  all-recursive
Making all in po
Target "all" is up to date.
Making all in .
         name=`echo man/test.1 | sed 's|.*/||; s|\.1$||'` || exit 1;      case $name in                                                   install) prog='ginstall'; argv=$name;;                  test) prog='['; argv='[';;                                      *) prog=$name; argv=$prog;;                             esac;                                                           rm -f man/test.1 man/test.1-t                                                   && t=man/test.td                                                        && rm -rf $t                                                    && /home/agn/usr/bin/gmkdir -p $t                                               && (cd $t && ln -s '/home/agn/sources/coreutils-8.25/src/'$prog  $argv)                         && : ${SOURCE_DATE_EPOCH=`cat ./.timestamp 2>/dev/null || :`}  && export SOURCE_DATE_EPOCH && perl -- ./man/help2man                    --source='GNU coreutils 8.25'                   --include=./man/$name.x                      
   --output=$t/$name.1                             --info-page='\(aq(coreutils) '$name' invocation\(aq'  $t/$argv                          && sed  -e 's|man/test\.td/||g'  -e '/For complete documentation/d'  $t/$name.1 > man/test.1-t                  && rm -rf $t                                                    && chmod a-w man/test.1-t                                               && mv man/test.1-t man/test.1
help2man: can't get `--help' info from man/test.td/[
Try `--no-discard-stderr' if option outputs to stderr
make: 1254-004 The error code from the last command is 127.
====

Seems like "src/[" is not automatically built ?

===
$ ls -l ./man/test.td/\[
lrwxrwxrwx    1 agn      usr              38 Jan 28 07:25 ./man/test.td/[ -> /home/agn/sources/coreutils-8.25/src/[

$ ls -l ./src/[
ls: 0653-341 The file ./src/[ does not exist.
===

To solve it, I built "/src/[" explicitly, then "make" completes successfully.

===
$ make src/[
   CC       src/lbracket.o
   CCLD     src/[
$ make
(( completes successfully ))
===

After that few tests fail with 'make check', I'll send in a separate message.


regards,
  - assaf

--------------090002010702090702070500
Content-Type: text/x-patch;
 name="libstdbuf-aix-fix.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="libstdbuf-aix-fix.patch"

From d915acd0224105c3c7cb5057f61361eb452be83c Mon Sep 17 00:00:00 2001
From: Assaf Gordon <assafgordon@HIDDEN>
Date: Wed, 27 Jan 2016 23:11:02 -0500
Subject: [PATCH] stdbuf: fix compliation issue AIX 7.1

* src/libstdbuf.c: #undef 'malloc' to avoid
    'undefined symbol .rpl_malloc' errors.
  See: https://bugs.gnu.org/22464 .
---
 src/libstdbuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libstdbuf.c b/src/libstdbuf.c
index 885377a..2141f88 100644
--- a/src/libstdbuf.c
+++ b/src/libstdbuf.c
@@ -20,6 +20,9 @@
 #include <stdio.h>
 #include "system.h"
 
+/* Deactivate config.h's "rpl_"-prefixed definitions of this symbol.  */
+#undef malloc
+
 /* Note currently for glibc (2.3.5) the following call does not change
    the buffer size, and more problematically does not give any indication
    that the new size request was ignored:
-- 
1.9.1


--------------090002010702090702070500--




Information forwarded to bug-coreutils@HIDDEN:
bug#22464; Package coreutils. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 25 Jan 2016 16:55:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 25 11:55:36 2016
Received: from localhost ([127.0.0.1]:36383 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aNkQS-0005ff-2V
	for submit <at> debbugs.gnu.org; Mon, 25 Jan 2016 11:55:36 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45185)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <assafgordon@HIDDEN>) id 1aNkQP-0005fS-UY
 for submit <at> debbugs.gnu.org; Mon, 25 Jan 2016 11:55:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1aNkQJ-000752-QB
 for submit <at> debbugs.gnu.org; Mon, 25 Jan 2016 11:55:28 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:35220)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1aNkQJ-00074q-NA
 for submit <at> debbugs.gnu.org; Mon, 25 Jan 2016 11:55:27 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36152)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1aNkQI-00057u-JL
 for bug-coreutils@HIDDEN; Mon, 25 Jan 2016 11:55:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1aNkQD-00073W-2Y
 for bug-coreutils@HIDDEN; Mon, 25 Jan 2016 11:55:26 -0500
Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:34881)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1aNkQC-00073S-UA
 for bug-coreutils@HIDDEN; Mon, 25 Jan 2016 11:55:21 -0500
Received: by mail-qg0-x232.google.com with SMTP id o11so113014821qge.2
 for <bug-coreutils@HIDDEN>; Mon, 25 Jan 2016 08:55:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=to:from:subject:message-id:date:user-agent:mime-version
 :content-type:content-transfer-encoding;
 bh=Kd+p8amw4bah6earoEGnNKyw7SLJzYVDgSK4d3lcefQ=;
 b=WGL65E8f5qoPvICrs5u50EHYWBOQrH/7TKOkV/8yRVuyMCOaa4hJOUT7wbPbYV/7W9
 M3gYdD9YlUwQJxktWCoWSj3/MA75E8HPJxxkbO2wso2ZM1kGjjfkkxdhRwmchY1uU5Cm
 KMMAkxy1TNAbT4P+wd6G61PJx8OPSTqv2PEnQYJilMLlRXo4ZF457wtZUKUPnyTKXzna
 JRsY3kRyh51a5la+9znPhzV2rO9penXwlR0jd/9HkNseoEpVpp58YozOItAar94vIjC6
 yZuFGY3DNqFMyNjAdkiLvhPJq77BlrxTUg6hZtj6hq6o3Jzw4+/zTAXoZa8MoKeVg+Ae
 unig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:to:from:subject:message-id:date:user-agent
 :mime-version:content-type:content-transfer-encoding;
 bh=Kd+p8amw4bah6earoEGnNKyw7SLJzYVDgSK4d3lcefQ=;
 b=IArYRe06Zsl78NNKmJepluZIwWd6wKTkkBcFW+IDhPbLCoGorqRlEkQog7e8aI3+67
 Mi0vuZ8QkbcKT98PJeG27bhkLwZEIJGS8WYyS8Adux0knuAK+uH9+WHC2EkhiWxeTH+h
 lGr96mue1CyTrkjLB8MPfvY3CkglLUZ97SD/zzk62KxLXEcLIKITSnri9ycWhzVKIrA3
 HK23UK9FFmt8E1VvSsv1MQ87K46+BM8HEPk05e/t3VmEoOOwEF4rwLmKP33ugtlHyLms
 lDuHmr6bBWmWDRL7UKnK1r00W577b5OPqEpQaJRdUTIxM9AfUeXsWNFpA/1gKI9xZutn
 lvbA==
X-Gm-Message-State: AG10YOQYuqUwRnc3J8OCJLWmuCpDCWdu3jKl/Uhmtj1XgYjMYzRwdQPq4IEwYHkzOeJGUg==
X-Received: by 10.140.97.5 with SMTP id l5mr22393514qge.84.1453740920280;
 Mon, 25 Jan 2016 08:55:20 -0800 (PST)
Received: from disco.erlich.nygenome.org ([69.74.14.178])
 by smtp.googlemail.com with ESMTPSA id f37sm4437050qkf.6.2016.01.25.08.55.19
 for <bug-coreutils@HIDDEN> (version=TLSv1/SSLv3 cipher=OTHER);
 Mon, 25 Jan 2016 08:55:19 -0800 (PST)
To: bug-coreutils@HIDDEN
From: Assaf Gordon <assafgordon@HIDDEN>
Subject: compilation fails on AIX-7 (undefined symbol .rpl_malloc)
Message-ID: <56A653DC.5020406@HIDDEN>
Date: Mon, 25 Jan 2016 11:57:00 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
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: -4.0 (----)

Hello,

I just got access to an AIX machine,
compiling 8.25 on AIX-7 fails with "undefined symbol .rpl_malloc".

I'll be able to investigate further a bit later, but this seems similar to:
   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=12841

regards,
- assaf.

===
   $ ./configure
   $ make V=1
   ...
   ...
         gcc -std=gnu99  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -D_THREAD_SAFE -fPIC  -g -O2 -MT src/src_libstdbuf_so-libstdbuf.o -MD -MP -MF src/.deps/src_libstdbuf_so-libstdbuf.Tpo -c -o src/src_libstdbuf_so-libstdbuf.o `test -f 'src/libstdbuf.c' || echo './'`src/libstdbuf.c
         mv -f src/.deps/src_libstdbuf_so-libstdbuf.Tpo src/.deps/src_libstdbuf_so-libstdbuf.Po
         gcc -std=gnu99 -fPIC  -g -O2  -shared  -o src/libstdbuf.so src/src_libstdbuf_so-libstdbuf.o
ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status

make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 2.

Stop.
====

$ uname -a
AIX power-aix 1 7 00F84C0C4C00

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/lto-wrapper
Target: powerpc-ibm-aix7.1.0.0
Configured with: ../gcc-4.8.1/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --host=powerpc-ibm-aix7.1.0.0
Thread model: aix
gcc version 4.8.1 (GCC)

	




Acknowledgement sent to Assaf Gordon <assafgordon@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#22464; Package coreutils. 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: Mon, 25 Nov 2019 12:00:02 UTC

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