Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile does not work for xm510 #45

Closed
schneemaier opened this issue Aug 24, 2021 · 2 comments
Closed

Compile does not work for xm510 #45

schneemaier opened this issue Aug 24, 2021 · 2 comments
Assignees
Labels
bug Something isn't working xm510

Comments

@schneemaier
Copy link

After a succesful build for xm530 i tried to build the system for xm510. I did not change any setting and on the first try i ended up with the following error

In file included from include/linux/compiler.h:48:0,
                 from include/linux/stddef.h:4,
                 from include/linux/posix_types.h:4,
                 from include/linux/types.h:17,
                 from include/linux/page-flags.h:8,
                 from kernel/bounds.c:9:
include/linux/compiler-gcc.h:99:1: fatal error: linux/compiler-gcc7.h: No such file or directory
 #include gcc_header(__GNUC__)
 ^~~~
compilation terminated.
make[3]: *** [/media/schnee/Data2/Workspace/openipc-2.1/output/build/linux-3.0.101/./Kbuild:36: kernel/bounds.s] Error 1
make[2]: *** [Makefile:985: prepare0] Error 2
make[2]: *** Waiting for unfinished jobs....
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
make[2]: Leaving directory '/media/schnee/Data2/Workspace/openipc-2.1/output/build/linux-3.0.101'
make[1]: *** [package/pkg-generic.mk:269: /media/schnee/Data2/Workspace/openipc-2.1/output/build/linux-3.0.101/.stamp_built] Error 2
make[1]: Leaving directory '/media/schnee/Data2/Workspace/openipc-2.1/buildroot-2020.02.12'
make: *** [Makefile:91: all] Error 2

This was an easy fix with copying compiler-gcc7.h from openipc-2.1/br-ext-chip-hisilicon/board/hi3516cv300/kernel/overlay to br-ext-chip-xiongmai/board/xm510/kernel/overlay/include/linux

After this the compile fails wtih the following error:

In file included from tools/env/fw_env.c:40:0:
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:329:3: error: conflicting types for ‘__packed’
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of ‘__packed’ was here
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:371:3: error: conflicting types for ‘__packed’
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of ‘__packed’ was here
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:386:3: error: conflicting types for ‘__packed’
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of ‘__packed’ was here
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:398:3: error: conflicting types for ‘__packed’
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of ‘__packed’ was here
 } __packed;
   ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:412:4: error: conflicting types for ‘__packed’
 }  __packed;
    ^~~~~~~~
/media/schnee/Data2/Workspace/openipc-2.1/output/per-package/fwprintenv-openipc/host/arm-openipc-linux-musleabi/sysroot/usr/include/mtd/ubi-user.h:313:3: note: previous declaration of ‘__packed’ was here
 } __packed;
   ^~~~~~~~
tools/env/fw_env.c: In function ‘detect_env’:
tools/env/fw_env.c:1770:7: warning: ‘return’ with no value, in function returning non-void
       return;
       ^~~~~~
tools/env/fw_env.c:1748:12: note: declared here
 static int detect_env() {
            ^~~~~~~~~~
make[3]: *** [scripts/Makefile.host:114: tools/env/fw_env.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1925: envtools] Error 2
make[2]: Leaving directory '/media/schnee/Data2/Workspace/openipc-2.1/output/build/fwprintenv-openipc-2020.04'
make[1]: *** [package/pkg-generic.mk:269: /media/schnee/Data2/Workspace/openipc-2.1/output/build/fwprintenv-openipc-2020.04/.stamp_built] Error 2
make[1]: Leaving directory '/media/schnee/Data2/Workspace/openipc-2.1/buildroot-2020.02.12'
make: *** [Makefile:91: all] Error 2

I am not sure where the tools/env/fw_env.c file is which needs some patching

@ZigFisher
Copy link
Collaborator

Good afternoon
Thank you for the information, I will make a check soon

@ZigFisher ZigFisher added bug Something isn't working xm510 labels Aug 25, 2021
@ZigFisher ZigFisher self-assigned this Aug 25, 2021
@ZigFisher ZigFisher pinned this issue Aug 25, 2021
@ZigFisher
Copy link
Collaborator

Fixed, thanks

@widgetii widgetii unpinned this issue Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working xm510
Projects
None yet
Development

No branches or pull requests

2 participants