On Fri, Nov 21, 2014 at 4:47 PM, Cyd Haselton <chaselton@xxxxxxxxx> wrote: > On Wed, Nov 19, 2014 at 12:51 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: >> On 19 November 2014 18:08, Cyd Haselton wrote: >>> In another attempt to fix this problem, I grepped for dlopen in the >>> build directoryand ran across the following: >>> >>> From ./gcc/config.log >>> >>> configure:27894: checking for library containing dlopen >>> configure:27925: gcc --sysroot=/usr/gcc-4.8/sysroot -o conftest -Wall >>> -mandroid -mbionic -static-libstdc++ -static-libgcc >>> -Wl,--dynamic-linker=/system/bin/linker -lc -ldl -lgcc -lm -lsupc++ >>> -lgnustl_shared conftest.c >&5 >>> configure:27925: $? = 0 >>> configure:27942: result: none required: >>> >> >> It's already linking to libdl, look at the command it used. > > FYI this issue was temporarily fixed by specifying --disable-shared in > the top-level configure...after running make distclean. > > Unfortunately the build fails again soon after libgcc, when > configuring libstdc++, with thw following error: > > configure[11845]: awk not found > configure: error: Link tests are not allowed after GCC_NO_EXECUTABLE > > I'm using gawk and have AWK=/bin/gawk. After unsuccessfully trying to fix this issue, I ran make distclean and started over with the previous configure options. After make failed (again at libgcc) I navigated to the gcc dir in the build folder and ran configure. ../../gcc-4.9.1/gcc/configure --prefix=/usr/gcc-4.9 --build=arm-linux-androideabi --host=arm-linux-androideabi --target=arm-linux-androideabi --with-build-libsubdir=/usr/gcc-4.8/sysroot/usr/lib --with-native-system-header-dir=/usr/gcc-4.8/sysroot/usr/include --with-build-sysroot=/usr/gcc-4.8/sysroot --with-sysroot=/usr/gcc-4.8/sysroot LIBS=-ldl LDFLAGS=-Wl,--dynamic-linker=/system/bin/linker -L/usr/gcc-4.8/sysroot/usr/lib The last several lines in the configure result indicate that ldl is still not being picked up as the library containing dlopen; configure still decides 'none needed' I've minimal experience with configure code; how is gcc/configure determining if ldl contains dlopen and how would I run configure and/or specify env variables so that configure picks up ldl? (FYI, I did objdump -tT libdl.so...dlopen is there)