From: Yutaka Kanemoto Date: 2014-01-27T13:07:39+09:00 Subject: [ruby-core:60126] Re: [ruby-trunk - Bug #9437] Build of ruby 2.1.0 fails on AIX 6.1 Hi, This is AIX's ld's behavior: ----from man ld -LDirectory Adds Directory to the list of search directories used for finding libraries designated by the -l (lowercase letter L) flag. The list of directories, including the standard library directories, is also recorded in the output object file loader section for use by the system loader unless you use the -blibpath, -bnolibpath, or -bsvr4 option. You can repeat this flag. ---- So, this can not be resolved from gcc. Some open source projects are affected this behavior (i.e. http://archives.neohapsis.com/archives/bugtraq/2003-04/0385.html) Since we are not able to remove -L. at this point, we need to use -blibpath to avoid including '.' from search path. % gcc -print-search-dirs install: /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/ programs: =/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/../../../../powerpc-ibm-aix7.1.0.0/bin/powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/../../../../powerpc-ibm-aix7.1.0.0/bin/ libraries: =/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/../../../../powerpc-ibm-aix7.1.0.0/lib/powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/../../../../powerpc-ibm-aix7.1.0.0/lib/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/../../../powerpc-ibm-aix7.1.0.0/4.7.2/:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/../../../:/lib/powerpc-ibm-aix7.1.0.0/4.7.2/:/lib/:/usr/lib/powerpc-ibm-aix7.1.0.0/4.7.2/:/usr/lib/ Should we add all of these directories listed in "libraries:" ? -- Yutaka KANEMOTO http://d.hatena.ne.jp/kinpoco/