Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Build error #5

Open
Cl1nkkk opened this issue May 4, 2022 · 13 comments
Open

Build error #5

Cl1nkkk opened this issue May 4, 2022 · 13 comments

Comments

@Cl1nkkk
Copy link

Cl1nkkk commented May 4, 2022

bash build.sh
EDK2 Path: /root/edk2-sm7150/edk2
EDK2_PLATFORMS Path: /root/edk2-sm7150/edk2-platforms
Loading previous configuration from /root/edk2-sm7150/edk2/Conf/BuildEnv.sh
Using EDK2 in-source Basetools
WORKSPACE: /root/edk2-sm7150
EDK_TOOLS_PATH: /root/edk2-sm7150/edk2/BaseTools
CONF_PATH: /root/edk2-sm7150/edk2/Conf
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/8/libgcc.a:(.data+0x0): multiple definition of _binary__usr_lib_gcc_aarch64_linux_gnu_8_libgcc_a_start'; /usr/lib/gcc/aarch64-linux-gnu/8/libgcc.a:(.data+0x0): first defined here /usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/8/libgcc.a:(.data+0x2a038): multiple definition of _binary__usr_lib_gcc_aarch64_linux_gnu_8_libgcc_a_end'; /usr/lib/gcc/aarch64-linux-gnu/8/libgcc.a:(.data+0x2a038): first defined here
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status

@MollySophia
Copy link
Member

Could you please provide more information? Build environment, toolchain, etc.

@Cl1nkkk
Copy link
Author

Cl1nkkk commented May 4, 2022

Linux deploy debian arm64 chroot

@adamnickster
Copy link

Hi I'm getting another error on Ubuntu 20.04. Any idea how to find where is the issue? (edk2-sdm845 building successfully)

bash build.sh
EDK2 Path: /home/adam/git/edk2-sm7150/edk2
EDK2_PLATFORMS Path: /home/adam/git/edk2-sm7150/edk2-platforms
Loading previous configuration from /home/adam/git/edk2-sm7150/edk2/Conf/BuildEnv.sh
Using EDK2 in-source Basetools
WORKSPACE: /home/adam/git/edk2-sm7150
EDK_TOOLS_PATH: /home/adam/git/edk2-sm7150/edk2/BaseTools
CONF_PATH: /home/adam/git/edk2-sm7150/edk2/Conf
make: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C'
Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
make -C Common
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/Common'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/Common'
make -C BrotliCompress
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/BrotliCompress'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/BrotliCompress'
make -C VfrCompile
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/VfrCompile'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/VfrCompile'
make -C EfiRom
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/EfiRom'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/EfiRom'
make -C GenFfs
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenFfs'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenFfs'
make -C GenFv
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenFv'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenFv'
make -C GenFw
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenFw'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenFw'
make -C GenSec
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenSec'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenSec'
make -C GenCrc32
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenCrc32'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/GenCrc32'
make -C LzmaCompress
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/LzmaCompress'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/LzmaCompress'
make -C TianoCompress
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/TianoCompress'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/TianoCompress'
make -C VolInfo
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/VolInfo'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/VolInfo'
make -C DevicePath
make[1]: Entering directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/DevicePath'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C/DevicePath'
Finished building BaseTools C Tools with HOST_ARCH=X64
make: Leaving directory '/home/adam/git/edk2-sm7150/edk2/BaseTools/Source/C'
Build environment: Linux-5.13.0-40-generic-x86_64-with-Ubuntu-20.04-focal
Build start time: 22:05:40, May.06 2022

WORKSPACE = /home/adam/git/edk2-sm7150
PACKAGES_PATH = /home/adam/git/edk2-sm7150/edk2:/home/adam/git/edk2-sm7150/edk2-platforms:/home/adam/git/edk2-sm7150/F11/Library/SimpleInit:/home/adam/git/edk2-sm7150
EDK_TOOLS_PATH = /home/adam/git/edk2-sm7150/edk2/BaseTools
CONF_PATH = /home/adam/git/edk2-sm7150/edk2/Conf
PYTHON_COMMAND = python2.7

Processing meta-data .Architecture(s) = AARCH64
Build target = DEBUG
Toolchain = GCC5

Active Platform = /home/adam/git/edk2-sm7150/F11/F11.dsc
..

  • Failed -
    Build end time: 22:05:43, May.06 2022
    Build total time: 00:00:03

@Cl1nkkk Cl1nkkk closed this as completed May 8, 2022
@Cl1nkkk
Copy link
Author

Cl1nkkk commented May 8, 2022

.

@adamnickster
Copy link

adamnickster commented May 11, 2022

Update:
Successfully run the build with recent version of edk2 and changes by @MollySophia [https://github.com/MollySophia/edk2-sm7150] on Ubuntu 20.04 arm64 (chroot on Android).
Not working on Ubuntu 18.4 - arm64 Android chroot as @Cl1nkkk comment and not working on Ubuntu 20.04 PC x64)

@MollySophia MollySophia reopened this May 11, 2022
@MollySophia
Copy link
Member

MollySophia commented May 12, 2022

Update: Successfully run the build with recent version of edk2 and changes by @MollySophia [https://github.com/MollySophia/edk2-sm7150] on Ubuntu 20.04 arm64 (chroot on Android). Not working on Ubuntu 18.4 - arm64 Android chroot as @Cl1nkkk comment and not working on Ubuntu 20.04 PC x64)

It's the same here. This edk2 was compiled successfully on an aarch64 server when I pushed those commits. However, on x86_64 platform it wouldn't compile, with no error messages. Haven't figured out what's wrong yet :P

@adamnickster
Copy link

I did a new clone of your repo on Ubuntu x86_64 add aarch64-linux-gnu- to GCC5_AARCH64_PREFIX in build.sh and compiling stared, but fail on another error. At last there is an error message this time 😀

/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: unknown architecture of input file `/home/adam/git/edk2-sm7150-test-sub/Build/F11/DEBUG_GCC5/AARCH64/src/SimpleInitRootFS/OUTPUT/SimpleInitRootFS.lib(rootfs_data.o)' is incompatible with aarch64 output
collect2: error: ld returned 1 exit status
make: *** [GNUmakefile:446: /home/adam/git/edk2-sm7150-test-sub/Build/F11/DEBUG_GCC5/AARCH64/src/main/SimpleInitMain/DEBUG/SimpleInitMain.dll] Error 1


build.py...
 : error 7000: Failed to execute command
	make -s tbuild [/home/adam/git/edk2-sm7150-test-sub/Build/F11/DEBUG_GCC5/AARCH64/src/main/SimpleInitMain]


build.py...
 : error F002: Failed to build module
	/home/adam/git/edk2-sm7150-test-sub/F11/Library/SimpleInit/src/main/SimpleInitMain.inf [AARCH64, GCC5, DEBUG]

- Failed -
Build end time: 11:50:26, May.12 2022
Build total time: 00:00:56

@MollySophia
Copy link
Member

MollySophia commented May 12, 2022

I did a new clone of your repo on Ubuntu x86_64 add aarch64-linux-gnu- to GCC5_AARCH64_PREFIX in build.sh and compiling stared, but fail on another error. At last there is an error message this time grinning

/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: unknown architecture of input file `/home/adam/git/edk2-sm7150-test-sub/Build/F11/DEBUG_GCC5/AARCH64/src/SimpleInitRootFS/OUTPUT/SimpleInitRootFS.lib(rootfs_data.o)' is incompatible with aarch64 output
collect2: error: ld returned 1 exit status
make: *** [GNUmakefile:446: /home/adam/git/edk2-sm7150-test-sub/Build/F11/DEBUG_GCC5/AARCH64/src/main/SimpleInitMain/DEBUG/SimpleInitMain.dll] Error 1


build.py...
 : error 7000: Failed to execute command
	make -s tbuild [/home/adam/git/edk2-sm7150-test-sub/Build/F11/DEBUG_GCC5/AARCH64/src/main/SimpleInitMain]


build.py...
 : error F002: Failed to build module
	/home/adam/git/edk2-sm7150-test-sub/F11/Library/SimpleInit/src/main/SimpleInitMain.inf [AARCH64, GCC5, DEBUG]

- Failed -
Build end time: 11:50:26, May.12 2022
Build total time: 00:00:56

Maybe reverting the commit that enabled SimpleInit would help, I assume?

@adamnickster
Copy link

Hi @MollySophia fixed compilation issues on x86_64 platform https://github.com/adamnickster/edk2-sm7150/commits/master
Could you check it? (tested on Ubuntu 20.04 on aarch64 and x86_64)

@MollySophia
Copy link
Member

MollySophia commented May 13, 2022

@adamnickster Thanks a lot for your efforts, but it's still the same on my x86 machines (ubuntu 22.04 vm, ubuntu wsl2, archlinux x86_64) with no error messages unfortunately.

@adamnickster
Copy link

@MollySophia Could you try with a clean state? Without submodules(let build script to retrieve and build them) and without existing edk2 folders one level up. Thanks

@MollySophia
Copy link
Member

@MollySophia Could you try with a clean state? Without submodules(let build script to retrieve and build them) and without existing edk2 folders one level up. Thanks

Still the same.

@adamnickster
Copy link

@MollySophia I created fresh install of Ubuntu 20.04 and 22.04 in VirtualBox install system updates and run these commands:
sudo apt install build-essential uuid-dev iasl git nasm python3-distutils gcc-aarch64-linux-gnu abootimg python-is-python3
git clone https://github.com/adamnickster/edk2-sm7150.git --depth=1
cd edk2-sm7150
bash build.sh

everything is fine in both versions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants