aarch64-linux-gnu/sys/cdefs.h:24:11: fatal error: features.h: No such file or directory
Hi there!
It would be great if you could assist me on this problem. I do not think it is a question about a missing header file, although it seems so, as I generally can build programs (without using the curl library). It could also be something in the CMakeLists.txt. I did all kinds of sudo upgrades and updates and build-essential etc.. Anyway, I am getting this message when attempting to build a c++ executable on my raspberry pi 400 (OS is Raspberry PI OS 64 BIT Full version from 2023-10-10) for a pico w. The complete message is as follows: oti@raspberrypi:~/pico/test/build $ cmake --build . [ 1%] Performing build step for 'PioasmBuild' [100%] Built target pioasm [ 1%] No install step for 'PioasmBuild' [ 1%] Completed 'PioasmBuild' [ 4%] Built target PioasmBuild [ 5%] Built target cyw43_driver_picow_cyw43_bus_pio_spi_pio_h [ 6%] Performing build step for 'ELF2UF2Build' [100%] Built target elf2uf2 [ 6%] No install step for 'ELF2UF2Build' [ 6%] Completed 'ELF2UF2Build' [ 9%] Built target ELF2UF2Build [ 10%] Built target bs2_default [ 11%] Built target bs2_default_padded_checksummed_asm [ 11%] Building CXX object CMakeFiles/test.dir/test.cpp.obj In file included from /usr/include/newlib/wchar.h:16, from /usr/include/newlib/c++/12.2.1/cwchar:44, from /usr/include/newlib/c++/12.2.1/bits/postypes.h:40, from /usr/include/newlib/c++/12.2.1/iosfwd:40, from /usr/include/newlib/c++/12.2.1/ios:38, from /usr/include/newlib/c++/12.2.1/ostream:38, from /usr/include/newlib/c++/12.2.1/iostream:39, from /home/oti/pico/test/test.cpp:1: /usr/include/aarch64-linux-gnu/sys/cdefs.h:24:11: fatal error: features.h: No such file or directory 24 | # include <features.h> | ^~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/test.dir/build.make:76: CMakeFiles/test.dir/test.cpp.obj] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1510: CMakeFiles/test.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 My CMakeLists.txt contains this: cmake_minimum_required(VERSION 3.13) include(pico_sdk_import.cmake) project(test_project C CXX ASM) set(CMAKE_CXX_STANDARD 17) find_package(CURL REQUIRED) include_directories(${CURL_INCLUDE_DIR}) add_executable(test test.cpp) pico_sdk_init() pico_enable_stdio_usb(test 1) pico_enable_stdio_uart(test 1) pico_add_extra_outputs(test) target_include_directories(test PRIVATE ${CMAKE_CURRENT_LIST_DIR} ) target_link_libraries(test pico_cyw43_arch_lwip_threadsafe_background pico_stdlib) My program looks like this (may contain errors - I never got far enough to see..): #include <iostream> #include <string> #include <curl/curl.h> size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) { size_t totalSize = size * nmemb; output->append(static_cast<char*>(contents), totalSize); return totalSize; } int main() { // Initialize libcurl CURL* curl = curl_easy_init(); if (!curl) { std::cerr << "Error initializing libcurl" << std::endl; return 1; } // Specify the URL of the file to download std::string url = "https://api.energidataservice.dk/dataset/Elspotprices"; // Create a string to store the downloaded data std::string downloadedData; // Set the URL and callback function curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &downloadedData); // Perform the request CURLcode res = curl_easy_perform(curl); if (res != CURLE_OK) { std::cerr << "Failed to download the file: " << curl_easy_strerror(res) << std::endl; } else { std::cout << "File downloaded successfully." << std::endl; // The downloaded file contents are stored in 'downloadedData' std::cout << "Downloaded Data:\n" << downloadedData << std::endl; } // Clean up libcurl curl_easy_cleanup(curl); return 0; } |
Not a Debian heavyweight, but if you don't have it, you need to install the 'build-essentials' package (or something along those lines) as well as the 'devel' package for every relevant package they mention.
On slackware here, I'm finding that file in glibc, so I'd try for a 'glibc-devel' package. |
Hi Business Kid
Thanks a lot for taking the time to answer me. All the build-essential I already did (and did again) and it is indeed essential, but it does not fix the problem. I tried your suggestion regarding the glibc and follow the install guidelines here: https://iq.opengenus.org/install-spe...sion-of-glibc/ . Some other stuff were missing on the way, which I also installed and I managed to get glibc installed. Ufortunately the problem is still the same, no features.h found. Any other suggestions? Br, Ole |
Install glibc-devel?
|
Hi again
According to ChatGPT: "The glibc-devel package, also known as libc6-dev in some Linux distributions, contains development libraries and header files for the GNU C Library (glibc). You can download and install this package using your system's package manager. The specific command may vary depending on your Linux distribution." Unfortunately I have already installed libc6-dev, so I am sill stuck: oti@raspberrypi:~/pico/itest/build $ sudo apt-get install libc6-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done libc6-dev is already the newest version (2.36-9+rpt2+deb12u3). libc6-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. Any other suggestions? |
BTW, ChatGPT also suggested to install this: sudo apt install libc6-dev-arm64-cross
which I did, but it did not change anything.. |
Hello again
installed and used this good search tool and installed (with reinstall option) all reasonably related libraries, none cured the problem: oti@raspberrypi:~/pico/itest/build $ sudo apt-file search features.h autoconf-archive: /usr/share/doc/autoconf-archive/html/ax_005fcheck_005fx86_005ffeatures.html bazel-bootstrap-source: /usr/src/bazel-bootstrap/src/main/java/com/google/devtools/build/docgen/templates/attributes/common/features.html bedops-doc: /usr/share/doc/bedops/html/content/reference/set-operations/closest-features.html blobandconquer: /usr/share/doc/blobandconquer/pages/features.html bochs-doc: /usr/share/doc/bochs/user/features.html bumblebee-status-doc: /usr/share/doc/bumblebee-status/html/features.html bup-doc: /usr/share/doc/bup/bup-features.html cdist-doc: /usr/share/doc/cdist/html/cdist-features.html ceres-solver-doc: /usr/share/doc/ceres-solver-doc/html/features.html cmake-doc: /usr/share/doc/cmake-data/html/command/target_compile_features.html cockpit-doc: /usr/share/doc/cockpit/guide/features.html coreboot-utils-doc: /usr/share/doc/coreboot-utils/html/northbridge/intel/sandybridge/nri_features.html cream: /usr/share/doc/cream/html/features.html cyclonedds-dev: /usr/include/aarch64-linux-gnu/dds/features.h davix-dev: /usr/include/davix/features.hpp db5.3-doc: /usr/share/doc/db5.3-doc/bdb-sql/dbfeatures.html db5.3-doc: /usr/share/doc/db5.3-doc/gsg_db_rep/C/addfeatures.html db5.3-doc: /usr/share/doc/db5.3-doc/gsg_db_rep/CXX/addfeatures.html db5.3-doc: /usr/share/doc/db5.3-doc/gsg_db_rep/JAVA/addfeatures.html dietlibc-dev: /usr/include/diet/features.h doctest-dev: /usr/share/doc/doctest-dev/features.html doxygen-doc: /usr/share/doc/doxygen/html/features.html dpdk-doc: /usr/share/doc/dpdk/guides/nics/features.html dpf-source: /usr/share/dpf/distrho/src/clap/plugin-features.h eggdrop-data: /usr/share/doc/eggdrop-data/html/mainDocs/features.html elks-libc: /usr/lib/bcc/include/features.h festival-doc: /usr/share/doc/festival-doc/html/Extracting-features.html fetchmail: /usr/share/doc/fetchmail/fetchmail-features.html flite1-dev: /usr/include/flite/cst_features.h flite1-dev: /usr/include/flite/cst_ffeatures.h fonts-sil-andika: /usr/share/doc/fonts-sil-andika/documentation/features.html frama-c-base: /usr/share/frama-c/libc/features.h fweb-doc: /usr/share/doc/fweb/html-info/Macro-features.html fweb-doc: /usr/share/doc/fweb/html-info/New-features.html g++-mingw-w64-i686-posix: /usr/lib/gcc/i686-w64-mingw32/12-posix/include/c++/parallel/features.h g++-mingw-w64-i686-win32: /usr/lib/gcc/i686-w64-mingw32/12-win32/include/c++/parallel/features.h g++-mingw-w64-x86-64-posix: /usr/lib/gcc/x86_64-w64-mingw32/12-posix/include/c++/parallel/features.h g++-mingw-w64-x86-64-win32: /usr/lib/gcc/x86_64-w64-mingw32/12-win32/include/c++/parallel/features.h libart-2.0-dev: /usr/include/libart-2.0/libart_lgpl/libart-features.h libastrometry-dev: /usr/include/astrometry/os-features.h libbde-dev: /usr/include/libbde/features.h libbfio-dev: /usr/include/libbfio/features.h libboost1.74-dev: /usr/include/boost/accumulators/framework/features.hpp libboost1.74-dev: /usr/include/boost/config/detail/posix_features.hpp libboost1.74-dev: /usr/include/boost/log/sources/features.hpp libboost1.74-doc: /usr/share/doc/libboost1.74-doc/doc/html/boost/accumulators/features.html libboost1.74-doc: /usr/share/doc/libboost1.74-doc/doc/html/container/main_features.html libboost1.81-dev: /usr/include/boost/accumulators/framework/features.hpp libboost1.81-dev: /usr/include/boost/config/detail/posix_features.hpp libboost1.81-dev: /usr/include/boost/log/sources/features.hpp libboost1.81-doc: /usr/share/doc/libboost1.81-doc/doc/html/boost/accumulators/features.html libboost1.81-doc: /usr/share/doc/libboost1.81-doc/doc/html/container/main_features.html libc6-dev: /usr/include/features.h libc6-dev-amd64-cross: /usr/x86_64-linux-gnu/include/features.h libc6-dev-arc-cross: /usr/arc-linux-gnu/include/features.h libc6-dev-arm64-cross: /usr/aarch64-linux-gnu/include/features.h libc6-dev-armel-cross: /usr/arm-linux-gnueabi/include/features.h libc6-dev-armhf-cross: /usr/arm-linux-gnueabihf/include/features.h libc6-dev-hppa-cross: /usr/hppa-linux-gnu/include/features.h libc6-dev-i386-cross: /usr/i686-linux-gnu/include/features.h libc6-dev-m68k-cross: /usr/m68k-linux-gnu/include/features.h libc6-dev-mips-cross: /usr/mips-linux-gnu/include/features.h libc6-dev-mips64-cross: /usr/mips64-linux-gnuabi64/include/features.h libc6-dev-mips64el-cross: /usr/mips64el-linux-gnuabi64/include/features.h libc6-dev-mips64r6-cross: /usr/mipsisa64r6-linux-gnuabi64/include/features.h libc6-dev-mips64r6el-cross: /usr/mipsisa64r6el-linux-gnuabi64/include/features.h libc6-dev-mipsel-cross: /usr/mipsel-linux-gnu/include/features.h libc6-dev-mipsn32-cross: /usr/mips64-linux-gnuabin32/include/features.h libc6-dev-mipsn32el-cross: /usr/mips64el-linux-gnuabin32/include/features.h libc6-dev-mipsn32r6-cross: /usr/mipsisa64r6-linux-gnuabin32/include/features.h libc6-dev-mipsn32r6el-cross: /usr/mipsisa64r6el-linux-gnuabin32/include/features.h libc6-dev-mipsr6-cross: /usr/mipsisa32r6-linux-gnu/include/features.h libc6-dev-mipsr6el-cross: /usr/mipsisa32r6el-linux-gnu/include/features.h libc6-dev-powerpc-cross: /usr/powerpc-linux-gnu/include/features.h libc6-dev-ppc64-cross: /usr/powerpc64-linux-gnu/include/features.h libc6-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/include/features.h libc6-dev-riscv64-cross: /usr/riscv64-linux-gnu/include/features.h libc6-dev-s390x-cross: /usr/s390x-linux-gnu/include/features.h libc6-dev-sh4-cross: /usr/sh4-linux-gnu/include/features.h libc6-dev-sparc64-cross: /usr/sparc64-linux-gnu/include/features.h libc6-dev-x32-cross: /usr/x86_64-linux-gnux32/include/features.h libc6.1-dev-alpha-cross: /usr/alpha-linux-gnu/include/features.h libcairo2-dev: /usr/include/cairo/cairo-features.h libcastor-java-doc: /usr/share/doc/libcastor-xml-java/doc/features.html libcastor-java-doc: /usr/share/doc/libcastor-xml-java/doc/jdo-other-features.html libcgal-dev: /usr/include/CGAL/Mesh_3/Has_features.h libcgal-dev: /usr/include/CGAL/Polygon_mesh_processing/detect_features.h libcgal-dev: /usr/include/CGAL/boost/graph/properties_Polyhedron_3_features.h libcgal-dev: /usr/include/CGAL/boost/graph/properties_Surface_mesh_features.h libcgal-dev: /usr/include/CGAL/license/Polygon_mesh_processing/detect_features.h libcglm-doc: /usr/share/doc/libcglm-doc/html/features.html libchafa-dev: /usr/include/chafa/chafa-features.h libchamplain-0.12-dev: /usr/include/champlain-0.12/champlain/champlain-features.h libclaws-mail-dev: /usr/include/claws-mail/claws-features.h libcoin-doc: /usr/share/doc/libcoin-dev/html/coin_new_features.html libcollectdclient-dev: /usr/include/collectd/lcc_features.h libcommons-httpclient-java-doc: /usr/share/doc/libcommons-httpclient-java/docs/features.html libcreg-dev: /usr/include/libcreg/features.h libdar-dev: /usr/include/dar/compile_time_features.hpp libdiagnostics-dev: /usr/include/diagnostics/features.hpp libdlib-dev: /usr/include/dlib/image_processing/setup_hashed_features.h libdpdk-dev: /usr/include/dpdk/rte_pci_dev_features.h libdraco-dev: /usr/include/draco/compression/config/encoding_features.h libdraco-dev: /usr/include/draco/draco_features.h libdraco-dev: /usr/include/draco/mesh/mesh_features.h libesedb-dev: /usr/include/libesedb/features.h libevt-dev: /usr/include/libevt/features.h libevtx-dev: /usr/include/libevtx/features.h libewf-dev: /usr/include/libewf/features.h libfreeradius-dev: /usr/include/freeradius/features.h libfsapfs-dev: /usr/include/libfsapfs/features.h libfsext-dev: /usr/include/libfsext/features.h libfshfs-dev: /usr/include/libfshfs/features.h libfsntfs-dev: /usr/include/libfsntfs/features.h libfsxfs-dev: /usr/include/libfsxfs/features.h libfvde-dev: /usr/include/libfvde/features.h libfwnt-dev: /usr/include/libfwnt/features.h libfwsi-dev: /usr/include/libfwsi/features.h libgcrypt20-doc: /usr/share/doc/libgcrypt20-doc/html/Hardware-features.html libgcrypt20-doc: /usr/share/doc/libgcrypt20-doc/html/hardware-features.html libgda-5.0-doc: /usr/share/gtk-doc/html/libgda-5.0/features.html libgdk-pixbuf-2.0-dev: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h libgegl-doc: /usr/share/doc/libgegl-dev/features.html libghemical-dev: /usr/include/ghemical/libghemical-features.h libgit2-glib-1.0-doc: /usr/share/gtk-doc/html/libgit2-glib-1.0/func.get_features.html libglbinding-dev: /usr/include/glbinding/glbinding_features.h libglm-dev: /usr/include/glm/detail/_features.hpp libglobjects-dev: /usr/include/globjects/globjects_features.h libgoffice-0.10-dev: /usr/include/libgoffice-0.10/goffice/goffice-features.h libgstreamer1.0-dev: /usr/include/gstreamer-1.0/gst/gstcapsfeatures.h libgstreamermm-1.0-dev: /usr/include/gstreamermm-1.0/gstreamermm/capsfeatures.h libgtk-4-doc: /usr/share/doc/libgtk-4-doc/gdk4/method.DevicePad.get_n_features.html libgtk-4-doc: /usr/share/doc/libgtk-4-doc/gtk4/method.FontChooser.get_font_features.html libgtk-4-doc: /usr/share/doc/libgtk-4-doc/gtk4/property.FontChooser.font-features.html libgtk-4-doc: /usr/share/doc/libgtk-4-doc/gtk4/property.TextTag.font-features.html libgtk2.0-doc: /usr/share/gtk-doc/html/gtk2/gtkfilechooser-new-features.html libgtkextra-dev: /usr/include/gtkextra-3.0/gtkextra/gtkextrafeatures.h libharfbuzz-dev: /usr/include/harfbuzz/hb-features.h libharfbuzz-doc: /usr/share/gtk-doc/html/harfbuzz/shaping-opentype-features.html libitpp-doc: /usr/share/doc/libitpp-dev/html/features.html libjs-mathjax-doc: /usr/share/doc/libjs-mathjax-doc/html/misc/accessibility-features.html libjs-pie-doc: /usr/share/doc/libjs-pie-doc/documentation/supported-css3-features.html libjsoncpp-dev: /usr/include/jsoncpp/json/json_features.h libjsoncpp-doc: /usr/share/doc/libjsoncpp-doc/class_json_1_1_features.html libldap-dev: /usr/include/ldap_features.h liblink-grammar-dev: /usr/include/link-grammar/link-features.h liblnk-dev: /usr/include/liblnk/features.h liblognorm-dev: /usr/include/lognorm-features.h libluksde-dev: /usr/include/libluksde/features.h liblwt-ocaml-dev: /usr/lib/ocaml/lwt/unix/lwt_features.h libmsiecf-dev: /usr/include/libmsiecf/features.h libncbi-vdb-dev: /usr/include/ncbi-vdb/klib/vdb-features.h libnewlib-dev: /usr/include/newlib/sys/features.h libnotify-dev: /usr/include/libnotify/notify-features.h libolecf-dev: /usr/include/libolecf/features.h libopenslide-dev: /usr/include/openslide/openslide-features.h libosmocore-dev: /usr/include/osmocom/gsm/bts_features.h libpal-java-doc: /usr/share/doc/libpal-java/features.html libpango1.0-dev: /usr/include/pango-1.0/pango/pango-features.h libpango1.0-doc: /usr/share/doc/libpango1.0-doc/reference/Pango/method.Attribute.as_font_features.html libpango1.0-doc: /usr/share/doc/libpango1.0-doc/reference/Pango/method.Font.get_features.html libpango1.0-doc: /usr/share/doc/libpango1.0-doc/reference/Pango/vfunc.Font.get_features.html libpango1.0-doc: /usr/share/doc/libpango1.0-doc/reference/PangoOT/method.Info.list_features.html libpango1.0-doc: /usr/share/doc/libpango1.0-doc/reference/PangoOT/method.Ruleset.maybe_add_features.html libpappsomspp-dev: /usr/include/pappsomspp/psm/features/psmfeatures.h libpcl-dev: /usr/include/pcl-1.13/pcl/registration/correspondence_rejection_features.h libpcl-dev: /usr/include/pcl-1.13/pcl/registration/impl/correspondence_rejection_features.hpp libpcl-doc: /usr/share/doc/libpcl-dev/html/classpcl_1_1registration_1_1_correspondence_rejector_features.html libpcl-doc: /usr/share/doc/libpcl-dev/html/group__features.html libpcl-doc: /usr/share/doc/libpcl-dev/html/namespacepcl_1_1features.html libpcl-doc: /usr/share/doc/libpcl-dev/html/struct_object_features.html libpff-dev: /usr/include/libpff/features.h libpolkit-gobject-1-dev: /usr/include/polkit-1/polkit/polkitauthorityfeatures.h libpoppler-glib-dev: /usr/include/poppler/glib/poppler-features.h libqcow-dev: /usr/include/libqcow/features.h libqglviewer-doc: /usr/share/doc/libqglviewer-doc/doc/QGLViewer/features.html libqpx-dev: /usr/include/qpxtool/plextor_features.h libqpx-dev: /usr/include/qpxtool/yamaha_features.h librandom123-dev: /usr/include/Random123/features/clangfeatures.h librandom123-dev: /usr/include/Random123/features/compilerfeatures.h librandom123-dev: /usr/include/Random123/features/gccfeatures.h librandom123-dev: /usr/include/Random123/features/iccfeatures.h librandom123-dev: /usr/include/Random123/features/metalfeatures.h librandom123-dev: /usr/include/Random123/features/msvcfeatures.h librandom123-dev: /usr/include/Random123/features/nvccfeatures.h librandom123-dev: /usr/include/Random123/features/open64features.h librandom123-dev: /usr/include/Random123/features/openclfeatures.h librandom123-dev: /usr/include/Random123/features/sunprofeatures.h libraptor2-doc: /usr/share/doc/libraptor2-dev/raptor2/tutorial-parser-features.html libraptor2-doc: /usr/share/doc/libraptor2-dev/raptor2/tutorial-serializer-features.html librbd-dev: /usr/include/rbd/features.h libregf-dev: /usr/include/libregf/features.h librestinio-dev: /usr/include/restinio/compiler_features.hpp librsvg2-dev: /usr/include/librsvg-2.0/librsvg/rsvg-features.h libsbml5-cil-doc: /usr/share/doc/libsbml5-cil/csharp-api/libsbml-features.html libsbml5-doc: /usr/share/doc/libsbml5/cpp-api/class_list_of_species_features.html libsbml5-doc: /usr/share/doc/libsbml5/cpp-api/class_sub_list_of_species_features.html libsbml5-doc: /usr/share/doc/libsbml5/cpp-api/libsbml-features.html libsbml5-perl-doc: /usr/share/doc/libsbml5-perl/perl-api/class_list_of_species_features.html libsbml5-perl-doc: /usr/share/doc/libsbml5-perl/perl-api/class_sub_list_of_species_features.html libsbml5-perl-doc: /usr/share/doc/libsbml5-perl/perl-api/libsbml-features.html libscca-dev: /usr/include/libscca/features.h libsigscan-dev: /usr/include/libsigscan/features.h libsimde-dev: /usr/include/simde/simde-features.h libsitemesh-java-doc: /usr/share/doc/libsitemesh-java/html/features.html libsmdev-dev: /usr/include/libsmdev/features.h libsmraw-dev: /usr/include/libsmraw/features.h libsnmp-dev: /usr/include/net-snmp/net-snmp-features.h libsofia-sip-ua-dev: /usr/include/sofia-sip-1.12/sofia-sip/sofia_features.h libsoup-gnome2.4-dev: /usr/include/libsoup-gnome-2.4/libsoup/soup-gnome-features.h libstdc++-11-dev: /usr/include/c++/11/parallel/features.h libstdc++-11-dev-amd64-cross: /usr/x86_64-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-arm64-cross: /usr/aarch64-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-armel-cross: /usr/arm-linux-gnueabi/include/c++/11/parallel/features.h libstdc++-11-dev-armhf-cross: /usr/arm-linux-gnueabihf/include/c++/11/parallel/features.h libstdc++-11-dev-i386-cross: /usr/i686-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-mips64-cross: /usr/mips64-linux-gnuabi64/include/c++/11/parallel/features.h libstdc++-11-dev-mips64el-cross: /usr/mips64el-linux-gnuabi64/include/c++/11/parallel/features.h libstdc++-11-dev-mips64r6-cross: /usr/mipsisa64r6-linux-gnuabi64/include/c++/11/parallel/features.h libstdc++-11-dev-mips64r6el-cross: /usr/mipsisa64r6el-linux-gnuabi64/include/c++/11/parallel/features.h libstdc++-11-dev-mipsel-cross: /usr/mipsel-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-mipsr6-cross: /usr/mipsisa32r6-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-mipsr6el-cross: /usr/mipsisa32r6el-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/include/c++/11/parallel/features.h libstdc++-11-dev-s390x-cross: /usr/s390x-linux-gnu/include/c++/11/parallel/features.h libstdc++-12-dev: /usr/include/c++/12/parallel/features.h libstdc++-12-dev-alpha-cross: /usr/alpha-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-amd64-cross: /usr/x86_64-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-arc-cross: /usr/arc-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-arm64-cross: /usr/aarch64-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-armel-cross: /usr/arm-linux-gnueabi/include/c++/12/parallel/features.h libstdc++-12-dev-armhf-cross: /usr/arm-linux-gnueabihf/include/c++/12/parallel/features.h libstdc++-12-dev-hppa-cross: /usr/hppa-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-i386-cross: /usr/i686-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-m68k-cross: /usr/m68k-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-mips-cross: /usr/mips-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-mips64-cross: /usr/mips64-linux-gnuabi64/include/c++/12/parallel/features.h libstdc++-12-dev-mips64el-cross: /usr/mips64el-linux-gnuabi64/include/c++/12/parallel/features.h libstdc++-12-dev-mips64r6-cross: /usr/mipsisa64r6-linux-gnuabi64/include/c++/12/parallel/features.h libstdc++-12-dev-mips64r6el-cross: /usr/mipsisa64r6el-linux-gnuabi64/include/c++/12/parallel/features.h libstdc++-12-dev-mipsel-cross: /usr/mipsel-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-mipsr6-cross: /usr/mipsisa32r6-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-mipsr6el-cross: /usr/mipsisa32r6el-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-powerpc-cross: /usr/powerpc-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-ppc64-cross: /usr/powerpc64-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-ppc64el-cross: /usr/powerpc64le-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-riscv64-cross: /usr/riscv64-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-s390x-cross: /usr/s390x-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-sh4-cross: /usr/sh4-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-sparc64-cross: /usr/sparc64-linux-gnu/include/c++/12/parallel/features.h libstdc++-12-dev-x32-cross: /usr/x86_64-linux-gnux32/include/c++/12/parallel/features.h libstdc++-arm-none-eabi-dev: /usr/include/newlib/c++/12.2.1/parallel/features.h libstellarsolver-dev: /usr/include/libstellarsolver/astrometry/os-features.h libsystemc-dev: /usr/include/sysc/packages/boost/config/posix_features.hpp libtelepathy-qt5-dev: /usr/include/telepathy-qt5/TelepathyQt/channel-class-features.h libtgowt-dev: /usr/include/tg_owt/modules/audio_processing/agc2/cpu_features.h libtgowt-dev: /usr/include/tg_owt/modules/audio_processing/agc2/rnn_vad/spectral_features.h libtotem-plparser-dev: /usr/include/totem-pl-parser/1/plparser/totem-pl-parser-features.h libvdk2-dev: /usr/include/vdk2/vdk/vdkfeatures.h libvhdi-dev: /usr/include/libvhdi/features.h libvigraimpex-dev: /usr/include/vigra/random_forest/features.hxx libvisp-doc: /usr/share/doc/libvisp-dev/html/group__group__mbt__features.html libvisp-doc: /usr/share/doc/libvisp-dev/html/group__group__visual__features.html libvisp-doc: /usr/share/doc/libvisp-dev/html/group__module__visual__features.html libvisp-visual-features-dev: /usr/include/aarch64-linux-gnu/visp3/visp_visual_features.h libvixl-dev: /usr/include/vixl/cpu-features.h libvmdk-dev: /usr/include/libvmdk/features.h libvshadow-dev: /usr/include/libvshadow/features.h libvslvm-dev: /usr/include/libvslvm/features.h libvte-2.91-doc: /usr/share/doc/vte-2.91/func.get_features.html libvte-2.91-gtk4-doc: /usr/share/doc/vte-2.91-gtk4/func.get_features.html libwreport-dev: /usr/include/wreport/bulletin/dds-scanfeatures.h libwreport-doc: /usr/share/doc/libwreport-dev/html/doxygen/features.html libxen-dev: /usr/include/xen/features.h libxrt-dev: /usr/include/xrt/xclfeatures.h libyadifa-dev: /usr/include/dnscore/dnscore-config-features.h libyadifa-dev: /usr/include/dnsdb/zdb-config-features.h libyadifa-dev: /usr/include/dnslg/dnslg-config-features.h lilypond-doc-html: /usr/share/doc/lilypond/html/Documentation/contributor/adding-or-modifying-features.html lilypond-doc-html: /usr/share/doc/lilypond/html/Documentation/notation/ancient-notation-_002d-common-features.html lilypond-doc-html: /usr/share/doc/lilypond/html/Documentation/web/features.html lilypond-doc-html-hu: /usr/share/doc/lilypond/html/Documentation/web/features.hu.html linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/mips/include/asm/cpu-features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/powerpc/include/asm/security_features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/sh/include/uapi/asm/cpu-features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/cpufeatures.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/disabled-features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/required-features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/vmxfeatures.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/include/linux/ceph/ceph_features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/include/linux/netdev_features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/include/xen/features.h linux-headers-6.1.0-10-common: /usr/src/linux-headers-6.1.0-10-common/include/xen/interface/features.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/arch/x86/include/asm/cpufeatures.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/arch/x86/include/asm/disabled-features.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/arch/x86/include/asm/required-features.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/arch/x86/include/asm/vmxfeatures.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/include/linux/ceph/ceph_features.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/include/linux/netdev_features.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/include/xen/features.h linux-headers-6.1.0-10-common-rt: /usr/src/linux-headers-6.1.0-10-common-rt/include/xen/interface/features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/mips/include/asm/cpu-features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/powerpc/include/asm/security_features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/sh/include/uapi/asm/cpu-features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/x86/include/asm/cpufeatures.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/x86/include/asm/disabled-features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/x86/include/asm/required-features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/arch/x86/include/asm/vmxfeatures.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/include/linux/ceph/ceph_features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/include/linux/netdev_features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/include/xen/features.h linux-headers-6.1.0-13-common: /usr/src/linux-headers-6.1.0-13-common/include/xen/interface/features.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/arch/x86/include/asm/cpufeatures.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/arch/x86/include/asm/disabled-features.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/arch/x86/include/asm/required-features.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/arch/x86/include/asm/vmxfeatures.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/include/linux/ceph/ceph_features.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/include/linux/netdev_features.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/include/xen/features.h linux-headers-6.1.0-13-common-rt: /usr/src/linux-headers-6.1.0-13-common-rt/include/xen/interface/features.h linux-headers-6.1.0-rpi1-common-rpi: /usr/src/linux-headers-6.1.0-rpi1-common-rpi/include/linux/ceph/ceph_features.h linux-headers-6.1.0-rpi1-common-rpi: /usr/src/linux-headers-6.1.0-rpi1-common-rpi/include/linux/netdev_features.h linux-headers-6.1.0-rpi1-common-rpi: /usr/src/linux-headers-6.1.0-rpi1-common-rpi/include/xen/features.h linux-headers-6.1.0-rpi1-common-rpi: /usr/src/linux-headers-6.1.0-rpi1-common-rpi/include/xen/interface/features.h linux-headers-6.1.0-rpi2-common-rpi: /usr/src/linux-headers-6.1.0-rpi2-common-rpi/include/linux/ceph/ceph_features.h linux-headers-6.1.0-rpi2-common-rpi: /usr/src/linux-headers-6.1.0-rpi2-common-rpi/include/linux/netdev_features.h linux-headers-6.1.0-rpi2-common-rpi: /usr/src/linux-headers-6.1.0-rpi2-common-rpi/include/xen/features.h linux-headers-6.1.0-rpi2-common-rpi: /usr/src/linux-headers-6.1.0-rpi2-common-rpi/include/xen/interface/features.h linux-headers-6.1.0-rpi3-common-rpi: /usr/src/linux-headers-6.1.0-rpi3-common-rpi/include/linux/ceph/ceph_features.h linux-headers-6.1.0-rpi3-common-rpi: /usr/src/linux-headers-6.1.0-rpi3-common-rpi/include/linux/netdev_features.h linux-headers-6.1.0-rpi3-common-rpi: /usr/src/linux-headers-6.1.0-rpi3-common-rpi/include/xen/features.h linux-headers-6.1.0-rpi3-common-rpi: /usr/src/linux-headers-6.1.0-rpi3-common-rpi/include/xen/interface/features.h linux-headers-6.1.0-rpi4-common-rpi: /usr/src/linux-headers-6.1.0-rpi4-common-rpi/include/linux/ceph/ceph_features.h linux-headers-6.1.0-rpi4-common-rpi: /usr/src/linux-headers-6.1.0-rpi4-common-rpi/include/linux/netdev_features.h linux-headers-6.1.0-rpi4-common-rpi: /usr/src/linux-headers-6.1.0-rpi4-common-rpi/include/xen/features.h linux-headers-6.1.0-rpi4-common-rpi: /usr/src/linux-headers-6.1.0-rpi4-common-rpi/include/xen/interface/features.h linux-libc-dev-sh4-cross: /usr/sh4-linux-gnu/include/asm/cpu-features.h opensp: /usr/share/doc/opensp/features.htm pd-flext-dev: /usr/include/flext/flfeatures.h petsc3.18-doc: /usr/share/doc/petsc3.18-doc/docs/overview/features.html picolibc-aarch64-linux-gnu: /usr/lib/picolibc/aarch64-linux-gnu/include/release/sys/features.h picolibc-aarch64-linux-gnu: /usr/lib/picolibc/aarch64-linux-gnu/include/sys/features.h picolibc-arm-none-eabi: /usr/lib/picolibc/arm-none-eabi/include/release/sys/features.h picolibc-arm-none-eabi: /usr/lib/picolibc/arm-none-eabi/include/sys/features.h picolibc-riscv64-unknown-elf: /usr/lib/picolibc/riscv64-unknown-elf/include/release/sys/features.h picolibc-riscv64-unknown-elf: /usr/lib/picolibc/riscv64-unknown-elf/include/sys/features.h picolibc-xtensa-lx106-elf: /usr/lib/xtensa-lx106-elf/include/release/sys/features.h picolibc-xtensa-lx106-elf: /usr/lib/xtensa-lx106-elf/include/sys/features.h python3-pycparser: /usr/share/python3-pycparser/fake_libc_include/features.h python3-pyopencl: /usr/lib/python3/dist-packages/pyopencl/cl/pyopencl-random123/openclfeatures.h r-bioc-singler: /usr/lib/R/site-library/SingleR/include/singlepp/process_features.hpp rapidjson-doc: /usr/share/doc/rapidjson-doc/html/md_doc_features.html raspberrypi-kernel-headers: /usr/src/linux-headers-6.1.21-v8+/include/linux/ceph/ceph_features.h raspberrypi-kernel-headers: /usr/src/linux-headers-6.1.21-v8+/include/linux/netdev_features.h raspberrypi-kernel-headers: /usr/src/linux-headers-6.1.21-v8+/include/xen/features.h raspberrypi-kernel-headers: /usr/src/linux-headers-6.1.21-v8+/include/xen/interface/features.h sahara-doc: /usr/share/doc/sahara-doc/html/user/features.html sass-spec-data: /usr/share/sass/spec/scss/media/script_features.hrx sdcc-libraries: /usr/share/sdcc/include/asm/default/features.h sdcc-libraries: /usr/share/sdcc/include/asm/ds390/features.h sdcc-libraries: /usr/share/sdcc/include/asm/mcs51/features.h sdcc-libraries: /usr/share/sdcc/include/asm/pic14/features.h sdcc-libraries: /usr/share/sdcc/include/asm/pic16/features.h sdcc-libraries: /usr/share/sdcc/include/asm/r2k/features.h sdcc-libraries: /usr/share/sdcc/include/asm/r3ka/features.h sdcc-libraries: /usr/share/sdcc/include/asm/sm83/features.h sdcc-libraries: /usr/share/sdcc/include/asm/stm8/features.h sdcc-libraries: /usr/share/sdcc/include/asm/tlcs90/features.h sdcc-libraries: /usr/share/sdcc/include/asm/z80/features.h wx3.2-headers: /usr/include/wx-3.2/wx/features.h |
The file you wanted was /usr/include/features.h. You appear to have got that from libc6-devel. All the other 'features.h or features.html were unneccessary. When you repeat your compile, does it stick on features.h or some other file? Post the las handful of compile lines.
|
Hi
Here are the last lines: ... [ 11%] Building CXX object CMakeFiles/itest.dir/itest.cpp.obj In file included from /usr/include/newlib/wchar.h:16, from /usr/include/newlib/c++/12.2.1/cwchar:44, from /usr/include/newlib/c++/12.2.1/bits/postypes.h:40, from /usr/include/newlib/c++/12.2.1/iosfwd:40, from /usr/include/newlib/c++/12.2.1/ios:38, from /usr/include/newlib/c++/12.2.1/ostream:38, from /usr/include/newlib/c++/12.2.1/iostream:39, from /home/oti/pico/itest/itest.cpp:1: /usr/include/aarch64-linux-gnu/sys/cdefs.h:24:11: fatal error: features.h: No such file or directory 24 | # include <features.h> | ^~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/itest.dir/build.make:76: CMakeFiles/itest.dir/itest.cpp.obj] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1510: CMakeFiles/itest.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 And this is the content of the first part of cdefs.h: residing at /usr/include/aarch64-linux-gnu/sys/ /* Copyright (C) 1992-2022 Free Software Foundation, Inc. Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 /* We are almost always included from features.h. */ #ifndef _FEATURES_H # include <features.h> #endif Looking into the folder /usr/include/aarch64-linux-gnu/sys/ where cdefs.h can be found, I notice that there is no such file features.h in the same folder. But is cdefs.h expecting that? It is included as <features.h> and not "features.h", which should mean that it should be looking in the search path. So I looked here: oti@raspberrypi:/usr/include/aarch64-linux-gnu/sys $ dir acct.h inotify.h profil.h socket.h timex.h auxv.h ioctl.h ptrace.h socketvar.h ttychars.h bitypes.h ipc.h queue.h soundcard.h ttydefaults.h cdefs.h kd.h quota.h statfs.h types.h dir.h klog.h random.h stat.h ucontext.h elf.h mman.h raw.h statvfs.h uio.h epoll.h mount.h reboot.h swap.h un.h errno.h msg.h resource.h syscall.h unistd.h eventfd.h mtio.h rseq.h sysinfo.h user.h fanotify.h param.h select.h syslog.h utsname.h fcntl.h pci.h sem.h sysmacros.h vfs.h file.h personality.h sendfile.h termios.h vlimit.h fsuid.h pidfd.h shm.h timeb.h vt.h gmon.h poll.h signalfd.h time.h wait.h gmon_out.h prctl.h signal.h timerfd.h xattr.h ifunc.h procfs.h single_threaded.h times.h oti@raspberrypi:/usr/include/aarch64-linux-gnu/sys $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games I looked into all of above search folders, but nowhere there is a file named features.h. BUT I found such file in /usr/include, so I added that search, but still getting the same error: [ 11%] Building CXX object CMakeFiles/itest.dir/itest.cpp.obj In file included from /usr/include/newlib/wchar.h:16, from /usr/include/newlib/c++/12.2.1/cwchar:44, from /usr/include/newlib/c++/12.2.1/bits/postypes.h:40, from /usr/include/newlib/c++/12.2.1/iosfwd:40, from /usr/include/newlib/c++/12.2.1/ios:38, from /usr/include/newlib/c++/12.2.1/ostream:38, from /usr/include/newlib/c++/12.2.1/iostream:39, from /home/oti/pico/itest/itest.cpp:1: /usr/include/aarch64-linux-gnu/sys/cdefs.h:24:11: fatal error: features.h: No such file or directory 24 | # include <features.h> | ^~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/itest.dir/build.make:76: CMakeFiles/itest.dir/itest.cpp.obj] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1510: CMakeFiles/itest.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 oti@raspberrypi:~/pico/itest/build $ echo $PATH /usr/include:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games oti@raspberrypi:~/pico/itest/build $ Why is the file not found as it it is there: oti@raspberrypi:/usr/include $ dir aarch64-linux-gnu cifsidmap.h expat_external.h gconv.h ifaddrs.h libusb-1.0 mtd nl_types.h pthread.h RTIMUAccelCal.h signal.h tar.h utmp.h aio.h complex.h expat.h gdb IMUDrivers limits.h net nss.h pty.h RTIMUCalDefs.h sound termio.h utmpx.h aliases.h cpio.h fcntl.h geany interface link.h netash obstack.h pwd.h RTIMUHal.h spawn.h termios.h values.h alloca.h crypt.h features.h getopt.h inttypes.h linux netatalk paths.h python3.11 RTIMULibDefs.h stab.h tgmath.h vcinclude argp.h ctype.h features-time64.h GL iproute2 locale.h netax25 pcmanfm-modules.h python3.11m RTIMULib.h stdc-predef.h thread_db.h video argz.h dirent.h fenv.h GLES KHR ltdl.h netdb.h pigpiod_if2.h rdma RTIMUMagCal.h stdint.h threads.h wait.h ar.h dlfcn.h finclude GLES2 langinfo.h lxappearance neteconet pigpiod_if.h re_comp.h RTIMUSettings.h stdio_ext.h time.h wchar.h arpa EGL fmtmsg.h GLES3 lastlog.h malloc.h netinet pigpio.h regex.h RTMath.h stdio.h tirpc wctype.h asm-generic elf.h fnmatch.h glob.h libcamera-apps math.h netipx pngconf.h regexp.h sched.h stdlib.h ttyent.h wordexp.h assert.h endian.h freetype2 glvnd libgen.h mcheck.h netiucv png.h resolv.h scsi string.h uchar.h X11 bcm_host.h envz.h fstab.h gnumake.h libintl.h memory.h netpacket pnglibconf.h rpc search.h strings.h ucontext.h xcb boost err.h ftdi.h gnu-versions.h libliftoff_rpi.h misc netrom poll.h rpcsvc semaphore.h sudo_plugin.h ulimit.h xen brotli errno.h fts.h grp.h libltdl mntent.h netrose printf.h RTFusion.h setjmp.h syscall.h unistd.h xsimd byteswap.h error.h ftw.h gshadow.h libpng monetary.h newlib proc_service.h RTFusionKalman4.h sgtty.h sysexits.h usb.h zconf.h c++ execinfo.h gawkapi.h iconv.h libpng16 mqueue.h nfs protocols RTFusionRTQF.h shadow.h syslog.h utime.h zlib.h oti@raspberrypi:/usr/include $ Could be because of insufficient rights, but it does not look like that: oti@raspberrypi:/usr/include $ ls features.h -l -rw-r--r-- 1 root root 18047 Oct 3 22:45 features.h or oti@raspberrypi:/usr/include $ getfacl features.h # file: features.h # owner: root # group: root user::rw- group::r-- other::r-- anyway to be sure, I changed the rights: oti@raspberrypi:/usr/include $ sudo chmod 666 features.h oti@raspberrypi:/usr/include $ getfacl features.h # file: features.h # owner: root # group: root user::rw- group::rw- other::rw- oti@raspberrypi:/usr/include $ Still does not work... Then I took this dramatic step: oti@raspberrypi:/usr/include $ sudo cp features.h /usr/include/aarch64-linux-gnu/sys/features.h That change something, but now the problem just moved to another file: [ 11%] Building CXX object CMakeFiles/itest.dir/itest.cpp.obj In file included from /usr/include/newlib/sys/config.h:5, from /usr/include/newlib/_ansi.h:11, from /usr/include/newlib/wchar.h:4, from /usr/include/newlib/c++/12.2.1/cwchar:44, from /usr/include/newlib/c++/12.2.1/bits/postypes.h:40, from /usr/include/newlib/c++/12.2.1/iosfwd:40, from /usr/include/newlib/c++/12.2.1/ios:38, from /usr/include/newlib/c++/12.2.1/ostream:38, from /usr/include/newlib/c++/12.2.1/iostream:39, from /home/oti/pico/itest/itest.cpp:1: /usr/include/aarch64-linux-gnu/sys/features.h:392:10: fatal error: features-time64.h: No such file or directory 392 | #include <features-time64.h> | ^~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/itest.dir/build.make:76: CMakeFiles/itest.dir/itest.cpp.obj] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1510: CMakeFiles/itest.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 oti@raspberrypi:~/pico/itest/build $ I do not think this is the right way to continue?? |
I've done a bit of this, and /usr/include/ is the spot for headers. So this line
Code:
# include <features.h By the look of things, cdefs.h calls /usr/include/features.h on line 24. Double check that features.h is there, not zero length, has permissions 0644 and check it's not gibberish. It should be a normal header file. The error message is "No such file or directory" |
Hi bk
Thanks for coming back to me, but: oti@raspberrypi:/usr/include $ ls -la features.h -rwxrwxrwx 1 root root 18091 Oct 28 15:38 features.h oti@raspberrypi:/usr/include $ sudo chmod 0664 features.h oti@raspberrypi:/usr/include $ ls -la features.h -rw-rw-r-- 1 root root 18091 Oct 28 15:38 features.h oti@raspberrypi:/usr/include $ cat features.h /* Copyright (C) 1991-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _FEATURES_H #define _FEATURES_H 1 /* These are defined by the user (or the compiler) to specify the desired environment: __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ Extensions to ISO C11 from TS 18661-1:2014. __STDC_WANT_IEC_60559_FUNCS_EXT__ Extensions to ISO C11 from TS 18661-4:2015. __STDC_WANT_IEC_60559_TYPES_EXT__ Extensions to ISO C11 from TS 18661-3:2015. __STDC_WANT_IEC_60559_EXT__ ISO C2X interfaces defined only in Annex F. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _ATFILE_SOURCE Additional *at interfaces. _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant) MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN. _GNU_SOURCE All of the above, plus GNU extensions. _DEFAULT_SOURCE The default set of features (taking precedence over __STRICT_ANSI__). _FORTIFY_SOURCE Add security hardening to many library functions. Set to 1 or 2; 2 performs stricter checks than 1. _REENTRANT, _THREAD_SAFE Obsolete; equivalent to _POSIX_C_SOURCE=199506L. The `-ansi' switch to the GNU C compiler, and standards conformance options such as `-std=c99', define __STRICT_ANSI__. If none of these are defined, or if _DEFAULT_SOURCE is defined, the default is to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200809L, as well as enabling miscellaneous functions from BSD and SVID. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. These are defined by this file and are used by the header files to decide what to declare or define: __GLIBC_USE (F) Define things from feature set F. This is defined to 1 or 0; the subsequent macros are either defined or undefined, and those tests should be moved to __GLIBC_USE. ....... oti@raspberrypi:~/pico/itest $ cat itest.cpp #include <iostream> #include <string> #include <stdio.h> #include <map> #include <ctime> #include "/usr/aarch64-linux-gnu/include/bits/wordsize.h" #include "pico/stdlib.h" #include "pico/cyw43_arch.h" #include "/usr/include/features-time64.h" #include <features.h> #include "/usr/include/arpa/inet.h" #include "/usr/include/httplib.h" #include <string.h> #include <time.h> .... [ 11%] Building CXX object CMakeFiles/itest.dir/itest.cpp.obj /home/oti/pico/itest/itest.cpp:10:10: fatal error: features.h: No such file or directory 10 | #include <features.h> | ^~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/itest.dir/build.make:76: CMakeFiles/itest.dir/itest.cpp.obj] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1510: CMakeFiles/itest.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 But it can find it if I include the whole path, but all include files demands the absolute path as well! I spend hours doing that, but there are many many files and I get tired of doing that... Also it should not be necessary.. It seems as the /usr/include PATH is not working, even though I have explicitly put it into the etc/environment also - which I expect that the compiler is using. I have also set my own .bashrc up to include it.. I am a little stuck.. |
You need to specify the headers path in the Cmake options. I don't know how to do that, but it sounds like Cmake is configuring the Makefile to look in the wrong place for the headers. When the compile starts, make takes it's instructions from the Makefile. But you'd have to change every Makefile in every directory which is a real pain. Look for how to specify that option to Cmake, because I'm not your man for that.
|
Hi bk
Thanks a lot for your hints. You are right - CMAKE needs to contain the search paths. I have included these and that cures this problem! (unfortunately there is now another problem, but I will create a separate post for that) Thanks! Br, Ole |
Quote:
|
Hi bk
Actually it was the fact that CMAKE seemed to ignore the configured PATHs done in linux together with your hint out CMAKE needs to the paths specified instead. And when including these paths, the missing files were found - unfortunately this action seem to generate some funny problems with some declarations no beeing accepted - I have createed a new post for that here and I am also going to create a post in a the CMAKE discourse forum.. Br, Ole |
All times are GMT -5. The time now is 12:37 PM. |