bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 .
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

Attachment: libstdbuf-aix-fix.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]