|
From: | address@hidden |
Subject: | problem while compiling popt and rpm |
Date: | Thu, 7 Nov 2013 09:31:25 +0530 |
We are using windriver gcc to compile rpm as well as popt.
We are using autoconf for generating the binaries.
In Makefile.am we are adding all LDFLAGS, GCC opts etc.
<snip>
&& ${popt_srcdir}/configure \
$$cross_args \
--with-cplusplus=no \
--with-java=no \
--with-python=no \
--prefix=${popt_srcdir}/popt_install \
--libdir=$libdir \
--sbindir=/isan/bin \
--with-sysroot=$sysroot \
--enable-shared \
--enable-dependency-tracking \
BASE_INCLUDES="-I$(srcdir)/include $(BASE_INC) -I$(srcdir)/feature/popt/libcli" \
CFLAGS="-Wall -pipe -g -O2 -fno-crossjumping -fno-strict-aliasing ${T_cflags} ${COMMON_CFLAGS} -Wno-error -Wall $$x86s_CFLAGS $$x86s_SYSROOT $$x86s_LIBLDOPTS" \
CXXFLAGS="-Wall -pipe -g -O2 -fno-crossjumping -fno-strict-aliasing ${T_cflags} ${COMMON_CFLAGS} -Wno-error -Wall $$x86s_CFLAGS $$x86s_SYSROOT $$x86s_LIBLDOPTS" \
CPPFLAGS="-I$(srcdir)/feature/popt/libcli" \
address@hidden@/../bin/${T_arch}/$$HWP/popt/${POPT} \
THIRD_PARTY_ARCH=${routing_arch} \
TOP_DIR=${srcdir} \
T_plat=${T_plat} \
T_bldgrp=${T_bldgrp}\
LDFLAGS="$$x86s_SYSROOT $$x86s_LIBLDOPTS $$x86s_LDSEARCHPATH" \
</snip>
We are ending up with ld error
libtool: link: i586-wrs-linux-gnu-gcc -shared .libs/popt.o .libs/poptparse.o .libs/poptconfig.o .libs/popthelp.o .libs/poptint.o -L/auto/andpkg/rep_cache//wr-x86/3.0FCS/sysroot/usr/lib -march=pentiumpro -pthread -pthread -Wl,--version-script=/ws/ravtr-sjc/rpm/5nov/third-party/src/A.buildme/popt/conf.x86s/../../../popt/popt-1.15/libpopt.vers -pthread -Wl,-rpath-link -Wl,/auto/andpkg/rep_cache/wr-x86/3.0FCS/sysroot/usr/lib -pthread -Wl,-soname -Wl,libpopt.so.0 -o .libs/libpopt.so.0.0.0
/auto/andpkg/rep_cache/wr-x86/3.0FCS/toolchain/x86-linux2/bin/../lib/gcc/i586-wrs-linux-gnu/4.3.2/../../../../i586-wrs-linux-gnu/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
gmake[2]: *** [libpopt.la] Error 1
but passing sysroot manually to gcc makes things work
-bash-3.00$ i586-wrs-linux-gnu-gcc -shared .libs/popt.o .libs/poptparse.o .libs/poptconfig.o .libs/popthelp.o .libs/poptint.o -L/auto/andpkg/rep_cache//wr-x86/3.0FCS/sysroot/usr/lib -march=pentiumpro -pthread -pthread -Wl,--version-script=/ws/ravtr-sjc/rpm/5nov/third-party/src/A.buildme/popt/conf.x86s/../../../popt/popt-1.15/libpopt.vers -pthread -Wl,-rpath-link -Wl,/auto/andpkg/rep_cache/wr-x86/3.0FCS/sysroot/usr/lib --sysroot=/auto/andpkg/rep_cache//wr-x86/3.0FCS/sysroot -pthread -Wl,-soname -Wl,libpopt.so.0 -o .libs/libpopt.so.0.0.0
-bash-3.00$
-bash-3.00$
-bash-3.00$ cd ./libtool
-bash: cd: ./libtool: Not a directory
-bash-3.00$ cd .libs
-bash-3.00$ ls
libpopt.so.0.0.0 poptconfig.o popthelp.o poptint.o popt.o poptparse.o
-bash-3.00$
versions:
autoconf : GNU 2.59
automake: GNU 1.8.3-a1
Please let me know what is the way to pass sysroot to ld through configure options.
Thanks,
Ravi
[Prev in Thread] | Current Thread | [Next in Thread] |