ARM-software / arm-enterprise-acs

ARM Enterprise ACS
Apache License 2.0
42 stars 48 forks source link

Build fails while compiling sbsa-acs-pal #116

Closed vineethrp closed 3 years ago

vineethrp commented 3 years ago

Function definition for pal_iovirt_get_rc_smmu_base has 3 arguments in sbsa-acs-pal, but sbsa-acs-val expects 4 arguments.

| make -C /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-source M=/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work
/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0 modules
| make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
| make[1]: Entering directory '/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-source'
| make[2]: Entering directory '/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-build-artifacts'
|   CC [M]  /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_misc.o
|   CC [M]  /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_pe.o
|   CC [M]  /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_pcie.o
|   CC [M]  /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_pcie_enumeration.o
|   CC [M]  /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_smmu.o
|   CC [M]  /home/vineetha/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_iovirt.o
| /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_iovirt.c:427:1: error: conflicting types
 for 'pal_iovirt_get_rc_smmu_base'
|  pal_iovirt_get_rc_smmu_base(IOVIRT_INFO_TABLE *iovirt, uint32_t rc_seg_num)
|  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| In file included from /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/include/pal_linux.h:28:0,
|                  from /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_iovirt.c:27:
| /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/val/include/pal_interface.h:374:10: note: previous
 declaration of 'pal_iovirt_get_rc_smmu_base' was here
|  uint64_t pal_iovirt_get_rc_smmu_base(IOVIRT_INFO_TABLE *iovirt, uint32_t rc_seg_num, uint32_t rid);
|           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| make[3]: *** [/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-source/scripts/Makefile.build:318: /home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0/./src/pal_iovirt.o] Error 1
| make[2]: *** [/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-source/Makefile:1500: _module_/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work/qemuarm64-oe-linux/sbsa-acs-pal/1.0-r0] Error 2
| make[2]: Leaving directory '/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-build-artifacts'
| make[1]: *** [Makefile:146: sub-make] Error 2
| make[1]: Leaving directory '/home/vineeth/WS/ACS/acs-5.4/luv/build/tmp/work-shared/qemuarm64/kernel-source'
| make: *** [Makefile:41: all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
vineethrp commented 3 years ago

I was looking into the sbsa-acs tree and looks like the pal_uefi has the function definition which takes 3 arguements https://raw.githubusercontent.com/ARM-software/sbsa-acs/master/platform/pal_uefi/src/pal_iovirt.c

But LuvOS uses the pal_baremetal version https://github.com/ARM-software/sbsa-acs/blob/master/platform/pal_baremetal/src/pal_iovirt.c

rajatgoyal47 commented 3 years ago

Hello Vineeth,

Thank you for reporting this. the above issue came from linux platform file which needed this update.

We have fixed it in the following pull request. https://gitlab.arm.com/linux-arm/linux-acs/-/merge_requests/6

You can try syncing again, it should work fine.

Thanks, Rajat

vineethrp commented 3 years ago

Thanks Rajat, I can confirm that the build is successful now.