On 6/3/23 08:55,
stan via users wrote:
On Thu, 01 Jun 2023 20:29:54 -0000 ron flory via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:Results: hello_world.c:1:10: fatal error: stdio.h: No such file or directory 1 | #include <stdio.h> | ^~~~~~~~~ compilation terminated. ----- Hello_world sample consists of: #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { printf("Hello World\n"); return(0); }I find at this link https://stackoverflow.com/questions/19580758/gcc-fatal-error-stdio-h-no-such-file-or-directorythis comment, You can see where gcc is looking for header files by doing echo "#include <bogus.h>" | gcc -v -x c - and examining the search paths. – Christian Ternus Oct 25, 2013 at 3:53 It is old, and when I tried it, it didn't work. But it might give you an idea for things to try. This also seems relevant, "it seems implausible that there would be a release which generated errors upon importing stdio" Is the file present in /usr/include? If it is, you could use the -I option to point there, -I /usr/include, and see if it works. If it does, that indicates that it is a problem in the configuration of gcc; it isn't looking in the system include directory.
it was sloppy of me to assume everybody understood the host is x86-64.
There are only 3 relevant compiler/binutils RPMs for aarch64 in FC37: (excluding other langs/libs)
dnf list all | grep aarch | grep -v "^rust\|^qemu\|^edk2\|^ipxe"
gcc-aarch64-linux-gnu
gcc-c++-aarch64-linux-gnu
binutils-aarch64-linux-gnu
...the binutils is automatically installed as a dependency (similar deal for the "gcc-arm-linux" sibling).
The (very few) related headers are installed in /usr/lib/gcc/aarch64-linux-gnu/12/include/ as confirmed by 1)
dnf repoquery -l gcc-aarch64-linux-gnu gcc-c++-aarch64-linux-gnu | grep /st | grep "\.h$" | sort
...the binutils is automatically installed as a dependency (similar deal for the "gcc-arm-linux" sibling).
The (very few) related headers are installed in /usr/lib/gcc/aarch64-linux-gnu/12/include/ as confirmed by 1)
dnf repoquery -l gcc-aarch64-linux-gnu gcc-c++-aarch64-linux-gnu | grep /st | grep "\.h$" | sort
and 2) which are not present when the cross-compiler is removed, but are present when the cross-compiler is re-installed.
Having built many cross-compilers over the years, a look at this header include directory is very, very sparse, missing the majority of our usual .h friends.
It --may-- be the RPMs were just built 'for successful compilation' without running a minimal test suite to confirm the output artifacts are functional- ...maybe. ( at least a 'hello-world' should be cross-compiled to confirm output-artifacts are produced, and for the correct target arch )
If another noarch or arm header-only RPM
happens to contain the missing headers (which I have not
stumbled upon yet), it would be helpful for this to be marked a
co-dependency so dnf can install it too.
- - -
As a side note, for reference only, please no
flames intended; the corresponding two aarch64 gcc/c++ packages
for the popular debian-based distro beginning with "U" (which
shall not be spoken here) does compile and link C/C++ programs
correctly, which is why I suspect it could be an RPM packaging
issue.
ron
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue