Re: compile a basic example to arm executable on Fedora
> On 13 Mar 2022, at 21:59, Cătălin George Feștilă > wrote: > > I asked because I don't think arm development is well implemented. An answer > would be as correct as possible from a developer who has worked with > something like this, considering that it is not very well documented and I > have not seen the tests with this tool that would work with development > libraries. Then you need the fedora arm mailing list. That is where the arm experts hang out. Barry > ___ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org > 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/devel@lists.fedoraproject.org > Do not reply to spam on the list, report it: > https://pagure.io/fedora-infrastructure ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org 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/devel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: compile a basic example to arm executable on Fedora
On Sun, Mar 13, 2022 at 09:59:09PM -, Cătălin George Feștilă wrote: > I asked because I don't think arm development is well > implemented. Arm development on Fedora works very well. I suggest joining one of these lists where beginner questions can be answered: https://lists.fedoraproject.org/archives/list/us...@lists.fedoraproject.org/ https://lists.fedoraproject.org/archives/list/a...@lists.fedoraproject.org/ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org 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/devel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: compile a basic example to arm executable on Fedora
Cătălin George Feștilă wrote: > cat hello.c > #include > using namespace std; > int main(void) > { > std::cout << "Hello word! from Fedora Linux!" << std::endl; > return 0; > } This is C++ code and does not belong in a source file with .c extension. > I install wit the dnf tool > > dnf install -y libstdc++-static.x86_64 A static library for x86_64 will be of no use when compiling ARM executables. This is really not an issue for the devel list, there is nothing wrong with how Fedora is developed here, it is a user error. > dnf install -y llvm > dnf install -y glib-static Here, you are not specifying the architecture explicitly, but if this is on an x86_64 host, you are going to get the x86_64 versions of these too. (And you almost certainly do not want glib (version 1), maybe glib2, or did you mean glibc?) > arm-none-eabi-g++ Are you sure you want to target arm-none-eabi and not arm-linux-gnueabi or even aarch64-linux-gnu? What device are you targeting? If it runs some form of GNU/Linux, try: https://copr.fedorainfracloud.org/coprs/lantw44/arm-linux-gnueabi-toolchain/ or: https://copr.fedorainfracloud.org/coprs/lantw44/aarch64-linux-gnu-toolchain/ instead of the arm-none-eabi target. arm-none-eabi is a generic freestanding (no operating system) target. It assumes you explicitly link to an implementation of some basic operating system functions, or even include them as part of your source code. (It is common for devices truly without an operating system to build an application with a bundled small operating system, typically an RTOS (real-time operating system).) For devices with an operating system, you should instead use the specific target corresponding to that operating system. In short, this is off-topic for this list, there are many issues with what you are doing, and none in Fedora so far. Kevin Kofler ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org 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/devel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: compile a basic example to arm executable on Fedora
I asked because I don't think arm development is well implemented. An answer would be as correct as possible from a developer who has worked with something like this, considering that it is not very well documented and I have not seen the tests with this tool that would work with development libraries. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org 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/devel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Re: compile a basic example to arm executable on Fedora
> On 13 Mar 2022, at 20:46, Cătălin George Feștilă > wrote: > > I try to create a hello word arm static executable, with the default example > but I got these errors. > I search on the web and fedora packages to find a way to solve this issue. This list is for developing fedora itself, not a programming development list. I think you are better off asking on the fedora arm mailing list or the fedora users mailing list. Barry > I used a basic example source code: > > cat hello.c > #include > using namespace std; > int main(void) > { > std::cout << "Hello word! from Fedora Linux!" << std::endl; > return 0; > } > > I install wit the dnf tool > > dnf install -y libstdc++-static.x86_64 > dnf install -y llvm > dnf install -y glib-static > I try also with -static and > arm-none-eabi-g++ -static-libstdc++ hello.c -o arm_hello-static > but , I got these errors, any help ? > > [root@fedora mythcat]# arm-none-eabi-g++ hello.c -o arm_hello > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): > in function `exit': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/exit.c:64: > undefined reference to `_exit' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): > in function `abort': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/abort.c:59: > undefined reference to `_exit' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): > in function `_fstat_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/fstatr.c:55: > undefined reference to `_fstat' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): > in function `_open_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/openr.c:50: > undefined reference to `_open' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): > in function `_sbrk_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/sbrkr.c:51: > undefined reference to `_sbrk' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): > in function `_kill_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:53: > undefined reference to `_kill' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): > in function `_getpid_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:83: > undefined reference to `_getpid' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): > in function `_write_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/writer.c:49: > undefined reference to `_write' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): > in function `_close_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/closer.c:47: > undefined reference to `_close' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): > in function `_isatty_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/isattyr.c:52: > undefined reference to `_isatty' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): > in function `_lseek_r': > /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/lseekr.c:49: > undefined reference to `_lseek' > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: > /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): > in f
compile a basic example to arm executable on Fedora
I try to create a hello word arm static executable, with the default example but I got these errors. I search on the web and fedora packages to find a way to solve this issue. I used a basic example source code: cat hello.c #include using namespace std; int main(void) { std::cout << "Hello word! from Fedora Linux!" << std::endl; return 0; } I install wit the dnf tool dnf install -y libstdc++-static.x86_64 dnf install -y llvm dnf install -y glib-static I try also with -static and arm-none-eabi-g++ -static-libstdc++ hello.c -o arm_hello-static but , I got these errors, any help ? [root@fedora mythcat]# arm-none-eabi-g++ hello.c -o arm_hello /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/exit.c:64: undefined reference to `_exit' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): in function `abort': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/abort.c:59: undefined reference to `_exit' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): in function `_fstat_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/fstatr.c:55: undefined reference to `_fstat' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): in function `_open_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/openr.c:50: undefined reference to `_open' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function `_sbrk_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/sbrkr.c:51: undefined reference to `_sbrk' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_kill_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:53: undefined reference to `_kill' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_getpid_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:83: undefined reference to `_getpid' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): in function `_write_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/writer.c:49: undefined reference to `_write' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): in function `_close_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/closer.c:47: undefined reference to `_close' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): in function `_isatty_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/isattyr.c:52: undefined reference to `_isatty' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): in function `_lseek_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/lseekr.c:49: undefined reference to `_lseek' /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): in function `_read_r': /builddir/build/BUILD/newlib-4.1.0/build-newlib/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/readr.c:49: undefined reference to `_read' collect2: error: ld returned 1 exit status ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://do