all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: Stefan <stefan-guix@vodafonemail.de>
Cc: guix-devel@gnu.org
Subject: Re: A different way to build GCC to overcome issues, especially with C++ for embedded systems
Date: Fri, 22 Dec 2023 10:56:42 +0000	[thread overview]
Message-ID: <PFN-cXzJpmOUXO3SX6n1NJt00o1id5b8G6OHV9mBydui0fxeNTW_hfHeV0mgNqcXi_yfqRoxJ8n_yHWb_m60_HLAyVrwD7uWkRw1ANTPfiI=@lendvai.name> (raw)
In-Reply-To: <5cc66f03-9068-2f67-0ec3-2c0f5c563898@vodafonemail.de>

TL;DR it's probably due to some cmake mess. and i gave up on compiling this; if i really want to, i'll do it in a debian chroot.


> > i tried with your gcc … but it errors out with:
> >
> > $ make
> > [ 1%] Linking ASM executable bs2_default.elf
> > arm-none-eabi-gcc: error: nosys.specs: No such file or directory
>
>
> That file is located here: /gnu/store/…-newlib-arm-none-eabi-4.3.0/arm-none-eabi/lib/nosys.specs


that didn't help:

~/workspace/guix/guix/pre-inst-env guix shell gcc-toolchain cmake make pkg-config -e '(@ (gnu packages embedded2) gcc12-cross-newlib-arm-none-eabi-toolchain)'
cd ~/workspace/bios/pico-serprog
cmake .
COMPILER_PATH=/gnu/store/i9kpjzbagdlpm8bs10gxmm21b271s056-newlib-3.0.0-0.3ccfb40/arm-none-eabi/lib/ LDFLAGS=-B/gnu/store/i9kpjzbagdlpm8bs10gxmm21b271s056-newlib-3.0.0-0.3ccfb40/arm-none-eabi/lib/ make

it leads to the same problem.

but then i tried to compile the pico-sdk subproject as a standalone project, and then it succeeds (but fails with a different error later). therefore i think it's due to some cmake mess that i don't want to get deeper into. so, the rest is just FYI:

git clone https://github.com/raspberrypi/pico-sdk

~/workspace/guix/guix/pre-inst-env guix shell gcc-toolchain cmake make pkg-config -e '(@ (gnu packages embedded2) gcc12-cross-newlib-arm-none-eabi-toolchain)'

cmake .
make

$ make
[  0%] Building ASM object src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[  0%] Linking ASM executable bs2_default.elf
[  0%] Built target bs2_default
[  0%] Creating directories for 'ELF2UF2Build'
[  0%] No download step for 'ELF2UF2Build'
[  0%] No update step for 'ELF2UF2Build'
[  0%] No patch step for 'ELF2UF2Build'
[  0%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /gnu/store/3yqw7js9slid5q3d1f5bpbk92vann109-profile/bin/gcc
-- Check for working C compiler: /gnu/store/3yqw7js9slid5q3d1f5bpbk92vann109-profile/bin/gcc - broken
CMake Error at /gnu/store/4bn07jsqk6lxp0qdxv7kkc3krz3afnna-cmake-3.25.1/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message):
  The C compiler

    "/gnu/store/3yqw7js9slid5q3d1f5bpbk92vann109-profile/bin/gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/alendvai/workspace/bios/pico-sdk/elf2uf2/CMakeFiles/CMakeScratch/TryCompile-fg3QLY

    Run Build Command(s):/gnu/store/3yqw7js9slid5q3d1f5bpbk92vann109-profile/bin/make -f Makefile cmTC_12bac/fast && make[3]: Entering directory '/home/alendvai/workspace/bios/pico-sdk/elf2uf2/CMakeFiles/CMakeScratch/TryCompile-fg3QLY'
    /gnu/store/3yqw7js9slid5q3d1f5bpbk92vann109-profile/bin/make  -f CMakeFiles/cmTC_12bac.dir/build.make CMakeFiles/cmTC_12bac.dir/build
    make[4]: Entering directory '/home/alendvai/workspace/bios/pico-sdk/elf2uf2/CMakeFiles/CMakeScratch/TryCompile-fg3QLY'
    Building C object CMakeFiles/cmTC_12bac.dir/testCCompiler.c.o
    /gnu/store/3yqw7js9slid5q3d1f5bpbk92vann109-profile/bin/gcc    -o CMakeFiles/cmTC_12bac.dir/testCCompiler.c.o -c /home/alendvai/workspace/bios/pico-sdk/elf2uf2/CMakeFiles/CMakeScratch/TryCompile-fg3QLY/testCCompiler.c
    as: unrecognized option '--64'
    make[4]: *** [CMakeFiles/cmTC_12bac.dir/build.make:78: CMakeFiles/cmTC_12bac.dir/testCCompiler.c.o] Error 1
    make[4]: Leaving directory '/home/alendvai/workspace/bios/pico-sdk/elf2uf2/CMakeFiles/CMakeScratch/TryCompile-fg3QLY'
    make[3]: *** [Makefile:127: cmTC_12bac/fast] Error 2
    make[3]: Leaving directory '/home/alendvai/workspace/bios/pico-sdk/elf2uf2/CMakeFiles/CMakeScratch/TryCompile-fg3QLY'


the root cause of the messy error message above is the following:

as: unrecognized option '--64'

this happens with the host gcc (or due to some misconfiguration the host gcc is used wrongly).

$ file src/rp2_common/boot_stage2/bs2_default.elf
src/rp2_common/boot_stage2/bs2_default.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped
 
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”
	— Antoine de Saint-Exupery (1900–1944)



  reply	other threads:[~2023-12-22 10:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 18:55 A different way to build GCC to overcome issues, especially with C++ for embedded systems Stefan
2023-12-21 13:32 ` Attila Lendvai
2023-12-21 14:01   ` Jean-Pierre De Jesus Diaz
2023-12-22  9:56     ` Stefan
2023-12-22  9:33   ` Stefan
2023-12-22 10:56     ` Attila Lendvai [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-18 12:45 Sergio Pastor Pérez
2024-05-19 22:06 ` Stefan
2024-05-20  6:59   ` Attila Lendvai
2024-05-24 15:48     ` Sergio Pastor Pérez
2024-05-24 17:05       ` Jean-Pierre De Jesus Diaz
2024-05-25 22:20         ` Ricardo Wurmus
2024-05-27 10:48           ` Jean-Pierre De Jesus Diaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='PFN-cXzJpmOUXO3SX6n1NJt00o1id5b8G6OHV9mBydui0fxeNTW_hfHeV0mgNqcXi_yfqRoxJ8n_yHWb_m60_HLAyVrwD7uWkRw1ANTPfiI=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=guix-devel@gnu.org \
    --cc=stefan-guix@vodafonemail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.