AMDESE / OpenBMC

OpenBMC for Genoa SP5 socket platforms
Other
21 stars 6 forks source link

Cannot Compile OpenBMC on AMD EPYC 9684X Server #8

Closed Chia-Hung0 closed 7 months ago

Chia-Hung0 commented 8 months ago

Hi, I am trying to compile OpenBMC on AMD the Genoa sp5 server. However, it keeps showing me some variables expanding failures. I am not sure they are python version portability issues or I miss something. (I am using Python 3.10.12.)

Unexpected behavior you saw I tried to compile OpenBMC, but faced an error:

ERROR: ExpansionError during parsing /home/amd/OpenBMC/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb                                                         | ETA:  0:00:04
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable KERNEL_VERSION, expression was ${@get_kernelversion_headers('/home/amd/OpenBMC/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/linux-yocto-tiny/5.4.107+git${SRCPV}-r0/linux-sp5-tiny-build')} which triggered exception SyntaxError: unterminated string literal (detected at line 1) (Var <KERNEL_VERSION>, line 1)

From this error, I found that 'SRCPV' was not defined, which caused the expansion failure.

After I uncommented SRCPV = "${@bb.fetch2.get_srcrev(d)}" in /OpenBMC/meta/conf/bitbake.conf to try to resolve the issue, I got another error:

ERROR: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: SRCREV was used yet no valid SCM was found in SRC_URI

Expected behavior OpenBMC should compile successfully on following the instructions in the README file.

To Reproduce Steps to reproduce the behavior:

  1. In Ubuntu 22.04.4 command line interface, mkdir OpenBMC.
  2. cd OpenBMC
  3. git clone https://github.com/AMDESE/OpenBMC.git . 4.. setup sp5
  4. Edit multiple .py files in /OpenBMC/poky/bitbake/lib/bb to change from collection import ... to from collection.abc import ...). This was done to solve trivial Python version issues, like the change of syntax with different versions.
  5. bitbake obmc-phosphor-image
  6. See first error
  7. Uncomment SRCPV = "${@bb.fetch2.get_srcrev(d)}" in /OpenBMC/meta/conf/bitbake.conf
  8. See second error

Screenshots First error: Capture Second error: image

OpenBMC Information:

Chia-Hung0 commented 7 months ago

It's the prerequisite issue. After I downgraded the Ubuntu version to 18.04, the issue was solved.