Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

linker was not configured to use sysroots

3,062 views
Skip to first unread message

mencaraglia francesco

unread,
May 5, 2012, 3:38:52 AM5/5/12
to
I am using Linux/Kubuntu OS. I have recently updated to 12.04 and I am
getting problem with gcc. Using the simple program

#include <stdio.h>
main()
{fprintf(stdout,"hello world\n");
return 0;
}

the compilation (gcc -c test.c) is ok but when I try to link (gcc
test.o) I get
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: ld returned 1 exit status

the loader ld is version 2.22 (as obtained using ld --version) and gcc
is the 4.6 release (gcc -v ) more details below.

Before the update everything was running smoothly so I thing that
during the update I have done something wrong. Ay suggestion welcome


Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5' --with-
bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-
suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-
zlib
--libexecdir=/usr/lib --without-included-gettext --enable-
threads=posix
--with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-
nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --
enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --
enable-objc-gc --enable-targets=all --disable-werror --with-
arch-32=i686 --with-tune=generic --enable-checking=release --
build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Andrew Haley

unread,
May 5, 2012, 4:14:21 AM5/5/12
to
mencaraglia francesco <f.menc...@gmail.com> wrote:
> I am using Linux/Kubuntu OS. I have recently updated to 12.04 and I am
> getting problem with gcc. Using the simple program
>
> #include <stdio.h>
> main()
> {fprintf(stdout,"hello world\n");
> return 0;
> }
>
> the compilation (gcc -c test.c) is ok but when I try to link (gcc
> test.o) I get
> /usr/local/bin/ld: this linker was not configured to use sysroots
> collect2: ld returned 1 exit status
>
> the loader ld is version 2.22 (as obtained using ld --version) and gcc
> is the 4.6 release (gcc -v ) more details below.
>
> Before the update everything was running smoothly so I thing that
> during the update I have done something wrong. Ay suggestion welcome

This is wrong:

> --with-sysroot=/

With a native compiler you don't want a sysroot.

Andrew.

m_filter

unread,
May 8, 2012, 11:00:40 PM5/8/12
to
hello, i have the same problem,do you have solved it?

martin....@gmail.com

unread,
Jun 21, 2012, 12:31:34 PM6/21/12
to f.menc...@gmail.com
Hello there,
Did any of you find the solution the that problem?
I am having exactly the same issue since I upgraded to ubuntu 12.04...

Andrew it seems you know what is wrong but could you tell me how to fix that?

Thanks,
0 new messages