[Gelöst] cmake-error: Toolchain doesn't support std::filesystem with nor without -lstdc++fs

JohnDoe42

Aktives Mitglied
Mitglied seit
17 Mrz 2009
Beiträge
1,465
Punkte für Reaktionen
2
Punkte
38
Hallo zusammen,

mit der aktiuellen Github-Version ergibt sich beim Bau ein cmake-Problem:
Code:
---> toolchain/kernel/ccache ... 
configuring ... (cd /home/john/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.3; rm -f CMakeCache.txt; \
    CC="gcc" \
    CXX="g++" \
    CFLAGS=" -D_GNU_SOURCE -fno-stack-protector --std=c++03" \
    CXXFLAGS=" -D_GNU_SOURCE -fno-stack-protector --std=c++03" \
    cmake . \
    -DCMAKE_C_COMPILER_TARGET=x86_64-pc-linux-gnu \
    -DCMAKE_CXX_COMPILER_TARGET=x86_64-pc-linux-gnu \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_DOCUMENTATION=OFF \
    -DENABLE_TESTING=OFF \
    -DREDIS_STORAGE_BACKEND=OFF \
    -DCMAKE_MESSAGE_LOG_LEVEL=status \
     \
);
Re-run cmake no build system arguments
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- The ASM_MASM compiler identification is unknown
-- Found assembler: ml
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Ccache version: 4.7.3
-- Ccache dev mode: OFF
-- Performing Test std_atomic_without_libatomic
-- Performing Test std_atomic_without_libatomic - Success
-- Performing Test std_filesystem_without_libfs
-- Performing Test std_filesystem_without_libfs - Failed
-- Performing Test std_filesystem_with_libfs
-- Performing Test std_filesystem_with_libfs - Failed
CMake Error at cmake/StdFilesystem.cmake:22 (message):
  Toolchain doesn't support std::filesystem with nor without -lstdc++fs
Call Stack (most recent call first):
  cmake/StandardSettings.cmake:57 (include)
  CMakeLists.txt:70 (include)


-- Configuring incomplete, errors occurred!
See also "/home/john/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.3/CMakeFiles/CMakeOutput.log"

Code:
$ cmake --version
cmake version 3.24.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Hat jemand eine Idee, was da zu tun ist?
Grüße

JD.
 
Hallo zusammen,

habe nochmal mit einer jungfräulichen .config angefangen, cmake aus den Quellen gebaut und danach versucht, erst mal die toolchain zu bauen:

Code:
make toolchain
Freetz-NG 20510M-6ea33743f master 2022-11-23
---> toolchain/kernel/ccache ... 
configuring ... (cd /home/john/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.4; rm -f CMakeCache.txt; \
    CC="gcc" \
    CXX="g++" \
    CFLAGS=" -D_GNU_SOURCE -fno-stack-protector --std=c++03" \
    CXXFLAGS=" -D_GNU_SOURCE -fno-stack-protector --std=c++03" \
    cmake . \
    -DCMAKE_C_COMPILER_TARGET=x86_64-pc-linux-gnu \
    -DCMAKE_CXX_COMPILER_TARGET=x86_64-pc-linux-gnu \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_DOCUMENTATION=OFF \
    -DENABLE_TESTING=OFF \
    -DREDIS_STORAGE_BACKEND=OFF \
    -DCMAKE_MESSAGE_LOG_LEVEL=status \
     \
);
Re-run cmake no build system arguments
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- The ASM_MASM compiler identification is unknown
-- Found assembler: ml
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Ccache version: 4.7.4
-- Ccache dev mode: OFF
-- Performing Test std_atomic_without_libatomic
-- Performing Test std_atomic_without_libatomic - Success
-- Performing Test std_filesystem_without_libfs
-- Performing Test std_filesystem_without_libfs - Failed
-- Performing Test std_filesystem_with_libfs
-- Performing Test std_filesystem_with_libfs - Failed
CMake Error at cmake/StdFilesystem.cmake:22 (message):
  Toolchain doesn't support std::filesystem with nor without -lstdc++fs
Call Stack (most recent call first):
  cmake/StandardSettings.cmake:57 (include)
  CMakeLists.txt:70 (include)


-- Configuring incomplete, errors occurred!
See also "/home/john/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.4/CMakeFiles/CMakeOutput.log".
See also "/home/john/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.4/CMakeFiles/CMakeError.log".
make/toolchain/kernel/ccache/ccache.mk:33: recipe for target '/home/josh/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.4/.configured' failed
make[1]: *** [/home/john/Githubs/freetz-ng/source/toolchain-mips_gcc-5.5.0/ccache-4.7.4/.configured] Error 1
Makefile:45: recipe for target 'envira' failed
make: *** [envira] Beendet

Das Problem besteht also (weiter).
Niemand eine Idee bzw. auf den gleichen Fehler gestoßen ?
 
Hallo zusammen,

ich habe das Problem etwas reduziert. Die Toolchain scheint das Problem zu sein, da ich nach einem make clean und anschliessender .config für ein Minimalimage das Folgende erhalte:
Code:
Freetz-NG 20520M-e7db29398 master 2022-11-28
You have no CPU with AVX2 support, precompiled (download) host-tools automatically disabled.
Makefile:259: *** Please re-run.  Schluss.
Makefile:45: recipe for target 'envira' failed
make: *** [envira] Beendet

Ich werde beizeiten weiter nachforschen.
 
Wenn deine CPU keinen AVX2-Support hat, dann kannst du die vorkompilierte Toolchain nicht verwenden. Du musst sie dann bauen lassen, mit "make menuconfig" kannst du das auswählen.
 
Ich frage mich bloß, wie dieses Problem von einer Git-Version zur anderen entstanden ist. Meine CPU bzw. der Rechner, auf dem ich zu Bauen versuche, haben sich länger nicht geändert ....


Edit:

Wenn ich aus den toolchain options
Code:
 [ ] Build ccache for kernel and target

rausnehme, wird erst mal ohne Fehler gebaut. Ich werde das mal weiter untersuchen.
 
Zuletzt bearbeitet:
Top, das war ‘s! So konsequent hatte ich mir den Git-Status nicht angesehen. Danke!
 
Kurz zum Abschluss für alle, die das gleiche Problem haben:

Ein Update auf gcc-9, ggfs. per Auswahl über

Code:
sudo update-alternatives --config gcc

hat das Problem beseitigt.
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.