4 Replies Latest reply on Jul 11, 2013 1:37 PM by james_patterson

    c++config.h missing

    mike18

      The 16 May 2013 professional Code Sourcery IA32 GNU/Linux compiler for arm-none-eabi is missing the file include/c++/4.7.3/bits/c++config.h

       

      This file is included from include/c++/4.7.3/utility

       

      Also missing:

       

      bits/os_defines.h

      bits/cpu_defines.h

      bits/c++allocator.h

      features.h

       

      You can add these files, but eventually end up in a cave of wonders.

       

      This is blocking compilation of the i.MX6Q Platform SDK, which the docs say compiles with 4.7.2, and 4.7.3 is not listed.

       

      To test this, I downloaded the 4.7.2 version dated 16 Nov 2012, and it takes me down the same rabbit hole. The Freescale docs list as working Sourcery CodeBench Lite 2012.09-63, which is different.

       

      So I go get the lite version of 4.7.2..., which does compile properly.

       

      However, my goal is to use the professional tools and SourceryProbe.

       

      Given that the missing files are #include's from files that are not missing in 4.7.3, it seems like there is a tool chain issue.

       

      Can someone explain why these files are missing in the professional version?

       

      Ideas on how to get unstuck?

        • 1. Re: c++config.h missing
          james_patterson

          Mike,

           

          c++config.h is architecture/multilib specific so it s located in the <install_dir>\arm-none-eabi\include\c++\4.7.3\arm-none-eabi\<architecture>\bits\ directory.

           

          But it is not clear yet why this would be failing.  Can you tell me which version of the SDK you are building, exact options passed to build_sdk, and host (Linux (distro/ver) OR Windows with cygwin (ver)), and exact build error that you see?

          • 2. Re: c++config.h missing
            mike18

            Development Platform: RHEL6.3 64 bit Linux 2.6.32-279.19.1.el6.x86_64

            SDK imx6_platform_sdk_v1.1.0

            Compile ./tools/build_sdk -clean -target=mx6dq -board=smart_device -board_rev=a

            This compile fails with Code Sourcery Pro newest two version

             

            To prove the SDK works, I can:

             

            Use Code Sourcery Lite version gcc version 4.7.2 (Sourcery CodeBench Lite 2012.09-63)  which is listed as working by Freescale

            ./tools/build_sdk -clean -target=mx6dq -board=smart_device -board_rev=a -app=smp_primes

            dd if=/home/mike/Realtime/iMX6_Platform_SDK/output/mx6dq/smp_primes/smart_device_rev_a/smp_primes.bin of=/dev/sdb seek=2 skip=2 bs=512 && sync

             

            Take the resulting SD image, boot, and see proper output on the terminal.

             

            Also, a full compile succeeds.

             

            A search in the pro version for the include file:

             

            [mike@localhost Sourcery_CodeBench_for_ARM_EABI]$ find ./ -name c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/armv7e-m/bits/c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/bits/c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/thumb/bits/c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/armv6-m/bits/c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/armv5te/bits/c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/thumb2/bits/c++config.h

            ./arm-none-eabi/include/c++/4.7.3/arm-none-eabi/armv7-m/bits/c++config.h

            [mike@localhost Sourcery_CodeBench_for_ARM_EABI]$

             

            This seems to imply that the problem is related to search paths. I don't see a path that looks like cortex-a. So perhaps the tool chain was not compiled properly?

            • 3. Re: c++config.h missing
              mike18

              More info:

               

              Searching the lite version:

               

               

              [mike@localhost Sourcery_CodeBench_Lite_for_ARM_EABI]$ find ./ -name c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/thumb/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/armv6-m/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/thumb2/bits/c++config.h

               

               

              For the pro version from 2012:

               

               

              [mike@localhost Sourcery_CodeBench_for_ARM_EABI_2012]$ find ./ -name c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/thumb/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/armv6-m/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/armv5te/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/thumb2/bits/c++config.h

              ./arm-none-eabi/include/c++/4.7.2/arm-none-eabi/armv7-m/bits/c++config.h

               

               

              The actual compile failure:

               

               

              Compiling sdk/drivers/gpmi/src/gpmi.cpp

              In file included from /opt/CodeSourcery/Sourcery_CodeBench_for_ARM_EABI_2012/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/c++/4.7.2/algorithm:61:0,

                               from /home/mike/Realtime/iMX6_Platform_SDK/sdk/drivers/gpmi/src/gpmi.cpp:41:

              /opt/CodeSourcery/Sourcery_CodeBench_for_ARM_EABI_2012/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/include/c++/4.7.2/utility:70:28: fatal error: bits/c++config.h: No such file or directory

              compilation terminated.

               

               

              The make files have:

               

               

              common.mk:CC_INCLUDE = $(CC_PREFIX)/lib/gcc/$(CROSS_COMPILE_STRIP)/$(CC_VERSION)/include

              common.mk:CC_INCLUDE_FIXED = $(CC_PREFIX)/lib/gcc/$(CROSS_COMPILE_STRIP)/$(CC_VERSION)/include-fixed

              common.mk:LIBC_INCLUDE = $(CC_PREFIX)/$(CROSS_COMPILE_STRIP)/include

               

               

              So I am guessing that GCC somehow cooks a new path to replace "include" at the end and add the proper subdirectory, and somehow this is not working.

               

               

              The make file has:

               

               

              # Generate code specifically for ARMv7-A, cortex-ax CPU.

              # Use the ARM Procedure Call Standard.

              ARM_FLAGS = -march=armv7-a -mcpu=$(CPU) -mtune=$(CPU) -mapcs

               

               

              ifeq "$(USE_THUMB)" "1"

                  # Generate thumb2 instructions (mixed 16/32-bit).

                  ARM_FLAGS += -mthumb

                  # Allow mixed ARM and thumb code.  All C code will generate thumb instructions

                  # but there is hand-written asm that requires ARM.

                  ARM_FLAGS += -mthumb-interwork

                  # Indicate that we're using thumb.

                  ARM_FLAGS += -DUSE_THUMB

                  CC_LIB_POST = thumb2

              else

                  # Generate ARM-only code.

                  ARM_FLAGS += -marm

                  CC_LIB_POST =

              endif

               

               

              So I assume this might control the include path. There is no armv7-a in the file structure. Then there is an -marm. USE_THUMB is 0. I don't see any arm path in the include dirs, so I can't see that as a way to match either. So I am not even clear how the lite version works.

               

               

              But clearly the pro versions have all the same paths as the lite version.

              • 4. Re: c++config.h missing
                james_patterson

                Mike,

                 

                As you are aware, since you have an active 30-day evaluation subscription for CodeBench, we promoted this issue to be worked directly in the Mentor Embedded Support Portal ( https://sourcery.mentor.com/GNUToolchain/).