Bug 254078 - new sysutils/uefi-edk2-bhyve will not compile
Summary: new sysutils/uefi-edk2-bhyve will not compile
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Rebecca Cran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-07 00:51 UTC by doctor
Modified: 2023-03-12 22:36 UTC (History)
7 users (show)

See Also:
linimon: maintainer-feedback? (bcran)


Attachments
compilation of port (213.52 KB, text/plain)
2021-03-07 00:51 UTC, doctor
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description doctor 2021-03-07 00:51:31 UTC
Created attachment 223037 [details]
compilation of port

Compiliation will not recognise a C++ Library
Comment 1 Rebecca Cran freebsd_committer freebsd_triage 2021-03-07 20:00:44 UTC
So the thing that ends up causing the build to fail is the following:

ld-elf.so.1: /usr/local/lib/compat/libstdc++.so.6: version CXXABI_1.3.8 required by /usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-2e1e8c35f3178df95d79da81ac6deec242da74c2/BaseTools/Source/C/bin/VfrCompile not found

From my experience this is normally caused by an unusual toolchain configuration being installed, for example gcc48. From discussions on the mailing list I understand it's not caused by that this time, but it's possible options in /etc/make.conf are causing problems.
Comment 2 doctor 2021-03-08 07:18:22 UTC
In one system

there is no /etc/make.conf so defaults.
Comment 3 doctor 2021-03-08 07:29:55 UTC
Looks like the libstbc++.so is the issue.

Just a simple rename does the trick
Comment 4 Rebecca Cran freebsd_committer freebsd_triage 2021-03-14 04:47:34 UTC
I think I might have found the issue.

If you don't mind doing some testing, could you do the following:
On the following line (line 83) in sysutils/uefi-edk2-bhyve/Makefile

(cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C edk2-${GH_TAGNAME}/BaseTools -j ${MAKE_JOBS_NUMBER} ${_MAKE_JOBS})

Add the following at the end of the line but before the closing parenthesis:

EXTRA_LDFLAGS=-static

The line should look like:

(cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C edk2-${GH_TAGNAME}/BaseTools -j ${MAKE_JOBS_NUMBER} ${_MAKE_JOBS} EXTRA_LDFLAGS=-static)
Comment 5 doctor 2021-05-21 11:17:17 UTC
How do I make this as solved?
Comment 6 Rebecca Cran freebsd_committer freebsd_triage 2021-05-22 17:09:34 UTC
I'll add the static flag and close this ticket.
Comment 7 doctor 2021-06-18 07:03:57 UTC
Still not compiling for some reason
Comment 8 doctor 2021-06-18 14:12:59 UTC
Now I get 

te__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -flto -DUSING_LTO -Os -mno-mmx -mno-sse -D DISABLE_NEW_DEPRECATED_INTERFACES -D ENABLE_MD5_DEPRECATED_INTERFACES -c -o /usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib/OUTPUT/./PeCoffLoaderEx.obj -I/usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg/Library/BasePeCoffLib -I/usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib/DEBUG -I/usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg -I/usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg/Include -I/usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg/Test/UnitTest/Include -I/usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg/Include/X64 /usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
rm -f /usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib/OUTPUT/BasePeCoffLib.lib
"gcc-ar" cr /usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib/OUTPUT/BasePeCoffLib.lib  @/usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib/OUTPUT/object_files.lst
ar: unrecognized option `--plugin'
usage:  ar -d [-Tjsvz] archive file ...
        ar -m [-Tjsvz] archive file ...
        ar -m [-Tabijsvz] position archive file ...
        ar -p [-Tv] archive [file ...]
        ar -q [-TcDjsUvz] archive file ...
        ar -r [-TcDjsUuvz] archive file ...
        ar -r [-TabcDijsUuvz] position archive file ...
        ar -s [-jz] archive
        ar -t [-Tv] archive [file ...]
        ar -x [-CTouv] archive [file ...]
        ar -V
make[2]: *** [GNUmakefile:311: /usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib/OUTPUT/BasePeCoffLib.lib] Error 64
make[2]: Leaving directory '/usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib'


build.py...
 : error 7000: Failed to execute command
        make tbuild [/usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BasePeCoffLib/BasePeCoffLib]


build.py...
 : error 7000: Failed to execute command
        make tbuild [/usr/ports/sysutils/uefi-edk2-bhyve/work/Build/BhyveX64/DEBUG_GCC5/X64/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib]


build.py...
 : error F002: Failed to build module
        /usr/ports/sysutils/uefi-edk2-bhyve/work/edk2-edk2-stable202102/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf [X64, GCC5, DEBUG]
Comment 9 Jan Martin Mikkelsen 2022-03-25 14:56:56 UTC
(In reply to Rebecca Cran from comment #4)

Adding the "EXTRA_LDFLAGS=-static" option fixes the "CXXABI_1.3.8" problem for me. I don't see the second problem reported in comment 8.

Building ports from ports r2022Q1 on 13.1-BETA2.
Comment 10 Volodymyr Kostyrko 2022-04-04 08:44:37 UTC
Happens to me right now. I'm on STABLE-13, and gcc48 is picked up by sysutils/uefi-edk2-bhyve-csm. I'm using portmaster, so all packages required are installed globally. I think about moving to dsynth but not ready for that yet.

Ans yes, STATIC doesn't help all.
Comment 11 Serge 2022-06-12 10:07:53 UTC
Where is it?
Comment 12 Rebecca Cran freebsd_committer freebsd_triage 2022-06-12 11:50:56 UTC
The sysutils/uefi-edk2-bhyve port was deleted and the sysutils/edk2 port was updated with a new bhyve FLAVOR.
Comment 13 Rebecca Cran freebsd_committer freebsd_triage 2022-06-12 11:52:56 UTC
The port was deleted and functionality is now provided by edk2@bhyve (i.e. a new bhyve FLAVOR of sysutils/edk2).
Comment 14 Serge 2022-06-12 14:59:57 UTC
Why not to add this change to UPDATING?
I can't compile it even with bhyve FLAVOR of sysutils/edk2, getting syntax errors.
Comment 15 Rebecca Cran freebsd_committer freebsd_triage 2022-06-12 17:04:48 UTC
An entry was added to MOVED noting the change.
What errors are you getting, and how are you building it? If you could provide the command and output here I can hopefully help.
Comment 16 Rebecca Cran freebsd_committer freebsd_triage 2022-06-12 17:05:07 UTC
Re-open to provide help with compilation.
Comment 17 Serge 2022-06-12 19:52:44 UTC
(In reply to Rebecca Cran from comment #15)
# FLAVOR=bhyve make
<...skipped...>
"gcc" -MMD -MF /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/OUTPUT/HiiLib.obj.deps -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=UefiHiiLibStrings -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -flto -DUSING_LTO -Os -Wno-unused-but-set-variable -Wno-unused-const-variable -DMDEPKG_NDEBUG -mno-mmx -mno-sse -D DISABLE_NEW_DEPRECATED_INTERFACES -D ENABLE_MD5_DEPRECATED_INTERFACES -c -o /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/OUTPUT/./HiiLib.obj -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdeModulePkg/Library/UefiHiiLib -I/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib/DEBUG -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdePkg -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdePkg/Include -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdePkg/Test/UnitTest/Include -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdePkg/Include/X64 -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdeModulePkg -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdeModulePkg/Include -I/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/include /usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
rm -f /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/UefiDriverEntryPoint.lib
"gcc-ar" cr /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/UefiDriverEntryPoint.lib  @/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/object_files.lst
rm -f /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiUsbLib/UefiUsbLib/OUTPUT/UefiUsbLib.lib
"gcc-ar" cr /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiUsbLib/UefiUsbLib/OUTPUT/UefiUsbLib.lib  @/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiUsbLib/UefiUsbLib/OUTPUT/object_files.lst
ar: unrecognized option `--plugin'
usage:  ar -d [-Tjsvz] archive file ...
	ar -m [-Tjsvz] archive file ...
	ar -m [-Tabijsvz] position archive file ...
	ar -p [-Tv] archive [file ...]
	ar -q [-TcDjsUvz] archive file ...
	ar -r [-TcDjsUuvz] archive file ...
	ar -r [-TabcDijsUuvz] position archive file ...
	ar -s [-jz] archive
	ar -t [-Tv] archive [file ...]
	ar -x [-CTouv] archive [file ...]
	ar -V
make[1]: *** [GNUmakefile:297: /usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiUsbLib/UefiUsbLib/OUTPUT/UefiUsbLib.lib] Error 1
make[1]: Leaving directory '/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiUsbLib/UefiUsbLib'


build.py...
 : error 7000: Failed to execute command
	make tbuild [/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiUsbLib/UefiUsbLib]


build.py...
 : error 7000: Failed to execute command
	make tbuild [/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint]


build.py...
 : error 7000: Failed to execute command
	make tbuild [/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib]


build.py...
 : error 7000: Failed to execute command
	make tbuild [/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib]


build.py...
 : error 7000: Failed to execute command
	make tbuild [/usr/ports/sysutils/edk2/work-bhyve/Build/BhyveX64/RELEASE_GCC5/X64/MdePkg/Library/UefiLib/UefiLib]


build.py...
 : error F002: Failed to build module
	/usr/ports/sysutils/edk2/work-bhyve/edk2-edk2-stable202202/MdePkg/Library/UefiUsbLib/UefiUsbLib.inf [X64, GCC5, RELEASE]

- Failed -
Build end time: 22:48:33, Jun.12 2022
Build total time: 00:00:51

*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/edk2
Comment 18 Rebecca Cran freebsd_committer freebsd_triage 2023-03-12 22:36:10 UTC
Sorry for the delay in working on this again.
Are you still having a problem compiling the port?