bug#22464: compilation fails on AIX-7 (undefined symbol .rpl_malloc)
From:
Assaf Gordon
Subject:
bug#22464: compilation fails on AIX-7 (undefined symbol .rpl_malloc)
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
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 .
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