This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crosstool-ng 1.18.0 build fails for armv6-rpi-linux-gnueabi


On 2013-03-07, M. Nuri ERTEM <ertemn@gmail.com> wrote:
>
> Hi,
>
> I tried to build a toolchain for Raspberry Pi using the sample
> configuration 'armv6-rpi-linux-gnueabi' with crosstool-ng 1.18.0.
>
> I modified only the target path (the '.config' file used is included
> in the attached zip).
> After building for about 110 minutes, the build failed with the
> following output:
>
> ...
> [ERROR]    /home/ertemn/Belgeler/toolchain/raspberrypi/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43:
> undefined reference to `std::length_error::~length_error()'
> [ERROR]    /home/ertemn/Belgeler/toolchain/raspberrypi/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43:
> undefined reference
> to/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43: undefined
> reference to `std::length_error::~length_error()'
> [ERROR]    /home/ertemn/Belgeler/toolchain/raspberrypi/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43:
> undefined reference to
> `std::length_error::length_error(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)'
> ...
> [ERROR]    /home/ertemn/Belgeler/toolchain/raspberrypi/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43:
> undefined reference to `std::length_error::~length_error()'
> [ERROR]    /home/ertemn/Belgeler/toolchain/raspberrypi/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43:
> undefined reference to
> `std::length_error::length_error(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)'
> [ERROR]    /home/ertemn/Belgeler/toolchain/raspberrypi/.build/src/ppl-0.11.2/src/Variable.inlines.hh:43:
> undefined reference to `std::length_error::~length_error()'
> [ERROR]    make[2]: *** [cc1] Error 1
> [ERROR]    make[2]: *** [lto1] Error 1
> [ERROR]    make[1]: *** [all-gcc] Error 2
> [ERROR]  |
> [ERROR]  >>
> [ERROR]  >>  Build failed in step 'Installing pass-1 core C compiler'
> [ERROR]  >>        called in step '(top-level)'
> [ERROR]  >>
> [ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
> [ERROR]  >>        called from: do_cc_core_backend[scripts/build/cc/gcc.sh@448]
> [ERROR]  >>        called from: do_cc_core_pass_1[scripts/build/cc/gcc.sh@101]
> [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
> [ERROR]  >>
> [ERROR]  >>  For more info on this error, look at the file: 'build.log'
> [ERROR]  >>  There is a list of known issues, some with workarounds, in:
> [ERROR]  >>
> '/opt/xtool-ng-1.18.0/share/doc/crosstool-ng/ct-ng.1.18.0/B - Known
> issues.txt'
> [ERROR]  /
> [ERROR]  (elapsed: 111:07.80)
> [111:09] / make: *** [build] Error 2
>

For reference, I encountered the same issue when trying to build on
Ubuntu 12.10, with ct-ng from the repository. The problem occurs when
linking cc1, because the linking command line specifies "-lstdc++" and
"-lm" before "-o cc1" and the specification of all the input object
files. These flags are not specified later. This generates around
100,000 error lines at once (for all the missing symbols form the c++
stnadard library).

The issue can be worked around if the option for static stdlibc++ is
used, as this option is not set in the armv6-rpi-linux-gnueabi sample.

It looks to me that this is because '-lm' and '-lstdc++' are passed
through the LDFLAGS variable, which is passed before the object files
according to the generated Makefile.

Best regards,
-- 
Romain Izard


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]