GNU bug report logs -
#22464
AIX: compilation fails on AIX-7 (undefined symbol .rpl_malloc)
Previous Next
To reply to this bug, email your comments to 22464 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#22464
; Package
coreutils
.
(Mon, 25 Jan 2016 16:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Assaf Gordon <assafgordon <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 25 Jan 2016 16:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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)
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#22464
; Package
coreutils
.
(Thu, 28 Jan 2016 22:25:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 22464 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[libstdbuf-aix-fix.patch (text/x-patch, attachment)]
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 <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 25 Oct 2018 15:39:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.