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

FWTS patch application failure while building BBR FWTS #73

Open
edhay opened this issue Jun 5, 2024 · 12 comments
Open

FWTS patch application failure while building BBR FWTS #73

edhay opened this issue Jun 5, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@edhay
Copy link
Contributor

edhay commented Jun 5, 2024

Patch application failure warnings when building FWTS through build_sbbr.sh

HEAD is now at f09402bb lib: fwts_version.h - update to V23.01.00
/BBR-BUILD/bbr-acs/sbbr/scripts
edhcha01@a074700:
/BBR-BUILD/bbr-acs/sbbr/scripts$ ./build-scripts/build_sbbr.sh
~/BBR-BUILD/bbr-acs/sbbr/scripts ~/BBR-BUILD/bbr-acs/sbbr/scripts
~/BBR-BUILD/bbr-acs/sbbr/scripts
~/BBR-BUILD/bbr-acs/sbbr/scripts/fwts ~/BBR-BUILD/bbr-acs/sbbr/scripts
~/BBR-BUILD/bbr-acs/sbbr/scripts
~/BBR-BUILD/bbr-acs/sbbr/scripts/fwts ~/BBR-BUILD/bbr-acs/sbbr/scripts
/home/edhcha01/BBR-BUILD/bbr-acs/sbbr/scripts/../..
2 out of 2 hunks FAILED
Applying FWTS Patch ...
patching file src/lib/src/fwts_framework.c
1 out of 1 hunk FAILED
1 out of 1 hunk FAILED

The same issue may exist in build_ebbr.sh too.
Also please check if the same issue exists when building FWTS in SystemReady ACS.

@edhay edhay added the bug Something isn't working label Jun 5, 2024
@sunnywang-arm
Copy link

sunnywang-arm commented Jun 6, 2024

I can reproduce this issue with WSL on a x86 system

sunny@xxxxx: /mnt/c/src/bbr-acs/sbbr/scripts$ ./build-scripts/build_sbbr.sh
/mnt/c/src/bbr-acs/sbbr/scripts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/fwts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/fwts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/../..
2 out of 2 hunks FAILED
Applying FWTS Patch ...
patching file src/lib/src/fwts_framework.c
1 out of 1 hunk FAILED
1 out of 1 hunk FAILED
Applying FWTS build patch ...
patching file src/lib/include/fwts_fileio.h
patching file src/lib/src/fwts_fileio.c
./build-scripts/build-fwts.sh: line 111: autoreconf: command not found

Build failed: error while running do_build at line 111 in ./build-scripts/build-fwts.sh for [][].
:/mnt/c/src/bbr-acs/sbbr/scripts$ ./build-scripts/build-fwts.sh SR S
/mnt/c/src/bbr-acs/sbbr/scripts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/fwts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/fwts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/../..
./build-scripts/build-fwts.sh: line 111: autoreconf: command not found

Build failed: error while running do_build at line 111 in ./build-scripts/build-fwts.sh for [][].

@chetan-rathore
Copy link
Collaborator

Hello @sunnywang-arm,

Can you please check with latest bbr-acs code if the SBBR/EBBR working fine on WSL environment, the issue seems to be due to autoconf tool dependency not met in build enviroment.

Thanks,
Chetan

@sunnywang-arm
Copy link

@chetan-rathore it somehow doesn't work and I still need to manually install the the autoconf. After installing autoconf, I ran into another build error

root@PF4Q726R:/mnt/c/src/bbr-acs/sbbr/scripts# ./build-scripts/build_sbbr.sh
ln: failed to create symbolic link '/mnt/c/src/bbr-acs/sbbr/scripts/build-scripts/framework.sh': File exists
ln: failed to create symbolic link '/mnt/c/src/bbr-acs/sbbr/scripts/build-scripts/parse_params.sh': File exists
ln: failed to create symbolic link '/mnt/c/src/bbr-acs/sbbr/scripts/build-scripts/build-sct.sh': File exists
ln: failed to create symbolic link '/mnt/c/src/bbr-acs/sbbr/scripts/build-scripts/build-uefi-apps.sh': File exists
ln: failed to create symbolic link '/mnt/c/src/bbr-acs/sbbr/scripts/build-scripts/build-fwts.sh': File exists
/mnt/c/src/bbr-acs/sbbr/scripts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/fwts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/fwts /mnt/c/src/bbr-acs/sbbr/scripts
/mnt/c/src/bbr-acs/sbbr/scripts/../..
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /usr/bin/autoconf --force
configure.ac:7: warning: AC_PROG_LEX without either yywrap or noyywrap is obsolete
./lib/autoconf/programs.m4:716: _AC_PROG_LEX is expanded from...
./lib/autoconf/programs.m4:709: AC_PROG_LEX is expanded from...
configure.ac:7: the top level
configure.ac:9: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1

Build failed: error while running do_build at line 111 in ./build-scripts/build-fwts.sh for [][].

@chetan-rathore
Copy link
Collaborator

Hi @sunnywang-arm,

It could be due to some missing dependencies in WSL system.
Can you provide information on OS and its version installed as part of WSL system.

Thanks,
ACS team

@sunnywang-arm
Copy link

sunnywang-arm commented Jun 20, 2024

@chetan-rathore

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

@chetan-rathore
Copy link
Collaborator

Hello @sunnywang-arm,

We tried to build bbr on a ubuntu 22.04.3 machine and it builds successfully at our end. I think the failure at your end could be due to some system specific environment dependency.

Thanks,
ACS team

@sunnywang-arm
Copy link

Thanks, @chetan-rathore

I'm fine with closing the issue now as it works on my WSL after I re-do everything (clone the bbr-acs source code and re-run all the commands mentioned in readme again).

@edhay do you want to give the latest bbr-acs a try on your side?

@chetan-rathore
Copy link
Collaborator

Thanks @sunnywang-arm for the confirmation.

@edhay Please let us know if bbr acs build works at your side also and the ticket can be closed.

@edhay
Copy link
Contributor Author

edhay commented Sep 10, 2024

Hi @chetan-rathore ,

Tried the build on the latest code. I am still getting the same error:
Screenshot 2024-09-10 162521

@chetan-rathore
Copy link
Collaborator

Hi @edhay,

Can you share the OS version details of the machine on which you are building.
It more seems to be system dependency issue rather than bbr-acs.
The daily scheduled builds are working fine: https://github.com/ARM-software/bbr-acs/actions

Thanks,
ACS team

@edhay
Copy link
Contributor Author

edhay commented Sep 11, 2024

Details shared by email.

@chetan-rathore
Copy link
Collaborator

Hi @edhay,

The error on the terminal is due to patch command -R (reverse) failure when applied to file where patch is already not applied.
https://github.com/ARM-software/bbr-acs/blob/main/common/scripts/build-fwts.sh#L90
The logic checks if "patch is not applied" then apply the patch...else if patch already applied then skip applying patch and proceed.

Thanks,
Chetan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants