dakanji / RefindPlusUDK

RefindPlus UEFI Development Kit
BSD 2-Clause "Simplified" License
7 stars 39 forks source link

Failure to Build on Some GCC Versions #12

Closed startergo closed 1 year ago

startergo commented 1 year ago

RefindPlus Version

Pre-Release Code Build

Device Type

Apple Mac

Problem Description

First error is "Unknown switch -G" After changing EDIT_BRANCH="-GOPFix" to EDIT_BRANCH="GOPFix" I get this error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C BrotliCompress
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 tools/bro.c -o tools/bro.o
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 common/dictionary.c -o common/dictionary.o
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 dec/bit_reader.c -o dec/bit_reader.o
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 dec/decode.c -o dec/decode.o
dec/decode.c:2023:13: error: variable 'bytes_copied' set but not used [-Werror,-Wunused-but-set-variable]
        int bytes_copied = s->meta_block_remaining_len;
            ^
1 error generated.
make[1]: *** [dec/decode.o] Error 1
make: *** [BrotliCompress] Error 2

Runtime Error ... Exiting

Problem Point

Other

Affected Items

Other Item

Debug Log

No debug log.

Additional Context

No additional context.

startergo commented 1 year ago

Code snippet:

case BROTLI_STATE_UNCOMPRESSED: {
        int bytes_copied = s->meta_block_remaining_len;
        result = CopyUncompressedBlockToOutput(
            available_out, next_out, total_out, s);
        bytes_copied -= s->meta_block_remaining_len;
        if (result != BROTLI_DECODER_SUCCESS) {
          break;
        }
        s->state = BROTLI_STATE_METABLOCK_DONE;
        break;

Here is the brotli code snippet: https://github.com/google/brotli/blob/6d03dfbedda1615c4cba1211f8d81735575209c8/c/dec/decode.c#L2494

startergo commented 1 year ago

After changing that snippet to:

case BROTLI_STATE_UNCOMPRESSED: {
        result = CopyUncompressedBlockToOutput(
            available_out, next_out, total_out, s);
        if (result != BROTLI_DECODER_SUCCESS) {
          break;
        }
        s->state = BROTLI_STATE_METABLOCK_DONE;
        break;

I get this error:

## RefindPlusBuilder - Building DBG Version ##
----------------------------------------------
cp: /Users/macmini/Documents/RefindPlus/edk2/RefindPlusPkg/BootMaster/globalExtra-DBG.txt: No such file or directory
cp: /Users/macmini/Documents/RefindPlus/edk2/RefindPlusPkg/RefindPlusPkg-DBG.dsc: No such file or directory
Loading previous configuration from /Users/macmini/Documents/RefindPlus/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/macmini/Documents/RefindPlus/edk2
EDK_TOOLS_PATH: /Users/macmini/Documents/RefindPlus/edk2/BaseTools
CONF_PATH: /Users/macmini/Documents/RefindPlus/edk2/Conf
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: module 'sys' has no attribute 'setdefaultencoding'
  File "/Users/macmini/Documents/RefindPlus/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 549
    except BaseException, X:
           ^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

Completed DBG Build on GOPFix of RefindPlus

cp: /Users/macmini/Documents/RefindPlus/edk2/RefindPlusPkg/BootMaster/globalExtra-REL.txt: No such file or directory

Runtime Error ... Exiting
startergo commented 1 year ago

The new python version throws exception errors if:

except FatalError, X

It needs to be:

except FatalError(X)

instead. After changing that I get this error:


## RefindPlusBuilder - Building DBG Version ##
----------------------------------------------
cp: : No such file or directory
cp: /Users/macmini/Documents/RefindPlus/edk2/RefindPlusPkg/RefindPlusPkg.dsc: No such file or directory
Loading previous configuration from /Users/macmini/Documents/RefindPlus/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/macmini/Documents/RefindPlus/edk2
EDK_TOOLS_PATH: /Users/macmini/Documents/RefindPlus/edk2/BaseTools
CONF_PATH: /Users/macmini/Documents/RefindPlus/edk2/Conf
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: module 'sys' has no attribute 'setdefaultencoding'
Traceback (most recent call last):
  File "/Users/macmini/Documents/RefindPlus/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 19, in <module>
    import Common.LongFilePathOs as os
  File "/Users/macmini/Documents/RefindPlus/edk2/BaseTools/Source/Python/Common/LongFilePathOs.py", line 36
    def makedirs(name, mode=0777):
                            ^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers

Completed DBG Build on GOPFix of RefindPlus

cp: : No such file or directory

Runtime Error ... Exiting
dakanji commented 1 year ago

You are trying to use an out of date build script. Ensure your RefindPlus and RefindPlusUDK repos are properly synced and use the up to date build script.

startergo commented 1 year ago

I have synced the branches. I used @joevt RUDK before, but still I am getting an error:

## RefindPlusBuilder - Setting Up ##  :  GOPFix
##--------------------------------##
/Users/macmini/Documents/RefindPlus/edk2/000-BuildScript/RefindPlusBuilder.sh: line 140: /Users/macmini/Documents/RefindPlus/edk2/000-Bu
Checkout 'GOPFix' branch...
Already on 'GOPFix'
...OK

Update RefindPlusPkg...
...OK

Make Clean...
Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C BootSectImage clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C BrotliCompress clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Common clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C DevicePath clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C EfiLdrImage clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C EfiRom clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenCrc32 clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenFfs clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenFv clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenFw clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenPage clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenSec clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GenVtf clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C GnuGenBootSector clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C LzmaCompress clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Split clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C TianoCompress clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C VfrCompile clean
BIN_DIR='.' /Applications/Xcode.app/Contents/Developer/usr/bin/make -C Pccts/antlr clean
rm -f ./antlr *.o core
BIN_DIR='.' /Applications/Xcode.app/Contents/Developer/usr/bin/make -C Pccts/dlg clean
rm -f ./dlg *.o core
rm -f EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C VolInfo clean
rm -f ./bin/*
rmdir ./libs ./bin
rmdir: ./libs: No such file or directory
rmdir: ./bin: No such file or directory
make: [localClean] Error 1 (ignored)
...OK

Make BaseTools...
Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
mkdir ./libs 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Common
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
ar crs ../libs/libCommon.a BasePeCoff.o BinderFuncs.o CommonLib.o Crc32.o Decompress.o EfiCompress.o EfiUtilityMsgs.o FirmwareVolumeBuff
mkdir ./bin
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C VfrCompile VfrLexer.h
BIN_DIR='.' /Applications/Xcode.app/Contents/Developer/usr/bin/make -C Pccts/dlg
cc -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536 -c dlg_p.c
cc -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536 -c dlg_a.c
cc -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536 -c main.c
cc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536  err.c -o err.o
cc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536 ../support/set/set.c
cc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536  support.c -o support.o
cc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536  output.c -o output.o
cc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536  relabel.c -o relabel.o
cc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536  automata.c -o automata.o
cc -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=65536 -o ./dlg dlg_p.o dlg_a.o main.o err.o set.o support.o output.o relab
BIN_DIR='.' /Applications/Xcode.app/Contents/Developer/usr/bin/make -C Pccts/antlr
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  antlr.c -o antlr.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  scan.c -o scan.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  err.c -o err.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  bits.c -o bits.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  build.c -o build.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  fset2.c -o fset2.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  fset.c -o fset.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  gen.c -o gen.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  globals.c -o globals.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  hash.c -o hash.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  lex.c -o lex.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  main.c -o main.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  misc.c -o misc.o
gcc -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536 -c -o set.o ../support/set/set.c
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  pred.c -o pred.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  egman.c -o egman.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  mrhoist.c -o mrhoist.o
gcc -c -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536  fcache.c -o fcache.o
gcc -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536 -o ./antlr antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.
Pccts/antlr/antlr -CC -e3 -ck 3 -k 2 -fl VfrParser.dlg -ft VfrTokens.h -o . VfrSyntax.g
Antlr parser generator   Version 1.33MR33   1989-2001
VfrSyntax.g, line 2018: warning: predicate: LT(i) missing, bad, or with i=0; assuming i=1
VfrSyntax.g, line 2023: warning: predicate: LT(i) missing, bad, or with i=0; assuming i=1
VfrSyntax.g, line 3651: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableI
VfrSyntax.g, line 3660: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableI
VfrSyntax.g, line 3669: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableI
VfrSyntax.g, line 3679: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableI
VfrSyntax.g, line 3709: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableI
VfrSyntax.g, line 3718: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableI
Pccts/dlg/dlg -C2 -i -CC -cl VfrLexer -o . VfrParser.dlg
dlg  Version 1.33MR33   1989-2001

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C BrotliCompress
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib 
dec/decode.c:2023:13: error: variable 'bytes_copied' set but not used [-Werror,-Wunused-but-set-variable]
        int bytes_copied = s->meta_block_remaining_len;
            ^
1 error generated.
make[1]: *** [dec/decode.o] Error 1
make: *** [BrotliCompress] Error 2

Runtime Error ... Exiting
dakanji commented 1 year ago

I just ran everything, including BaseTools, on my machine without issue and i note that this item from a few weeks ago seemed to have gone ok as well: https://github.com/dakanji/RefindPlus/discussions/125. There has been no changes to RefindPlusUDK in the time that has passed.

You might want to delete what you currently have , probably tainted, and set things up from scratch according to the Repo Instructions: https://github.com/dakanji/RefindPlus/blob/GOPFix/BUILDING.md

startergo commented 1 year ago
image image
Last login: Wed Nov 16 13:34:38 on ttys000
macmini@MacMinis-Mac-mini edk2 % git pull
Already up to date.
macmini@MacMinis-Mac-mini edk2 % cd /Users/macmini/Documents/RefindPlus/Working  
macmini@MacMinis-Mac-mini Working % git pull
Already up to date.
macmini@MacMinis-Mac-mini Working % 

Nope. Does not work.

startergo commented 1 year ago

It builds fine with Docker, but not through the script.

dakanji commented 1 year ago

I see. Well, the script works for me and seems to have independently done for at least one other. Perhaps someone like @MarioG-X might be willing to give it a shot on his rig.

dakanji commented 1 year ago

After changing EDIT_BRANCH="-GOPFix" to EDIT_BRANCH="GOPFix"

Btw, there is no such thing as EDIT_BRANCH in the build script from the up to date RefindPlusUDK repo. Not sure which script it is you are actually using but it doesn't seem to be the correct one.

Also note that you need to open a new Terminal window when you want to build to avoid tainting

startergo commented 1 year ago

That was before. In the beginning I used @joevt RUDK branch as I already stated, but then I fixed that. I no longer get that error, but different one. Look here: https://github.com/dakanji/RefindPlusUDK/issues/12

dakanji commented 1 year ago

OK. Got it now. Well, no idea why it isn't working for you, sorry. Let's see if an independent test throws something up.

startergo commented 1 year ago

Same error directly building tools:

edk2 % . ./edksetup.sh
WORKSPACE: /Users/macmini/Documents/RefindPlus/edk2
EDK_TOOLS_PATH: /Users/macmini/Documents/RefindPlus/edk2/BaseTools
CONF_PATH: /Users/macmini/Documents/RefindPlus/edk2/Conf
macmini@MacMinis-Mac-mini edk2 % make -C BaseTools 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Source/C
Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Common
make[2]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C BrotliCompress
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  -O2 dec/decode.c -o dec/decode.o
dec/decode.c:2023:13: error: variable 'bytes_copied' set but not used [-Werror,-Wunused-but-set-variable]
        int bytes_copied = s->meta_block_remaining_len;
            ^
1 error generated.
make[2]: *** [dec/decode.o] Error 1
make[1]: *** [BrotliCompress] Error 2
make: *** [Source/C] Error 2
startergo commented 1 year ago

I saw this : https://github.com/xaionaro/edk2-builder-docker/blob/main/build-edk2.sh#L11 Where can I change -Werror to -Wno-error for testing?

dakanji commented 1 year ago

No issues here:

Direct Tools Build ``` Last login: Wed Nov 16 21:53:29 on ttys000 Dayos-Mac-Pro:~ dayo$ cd /Users/dayo/Documents/RefindPlus/edk2 Dayos-Mac-Pro:edk2 dayo$ . ./edksetup.sh Loading previous configuration from /Users/dayo/Documents/RefindPlus/edk2/Conf/BuildEnv.sh WORKSPACE: /Users/dayo/Documents/RefindPlus/edk2 EDK_TOOLS_PATH: /Users/dayo/Documents/RefindPlus/edk2/BaseTools CONF_PATH: /Users/dayo/Documents/RefindPlus/edk2/Conf Dayos-Mac-Pro:edk2 dayo$ make -C BaseTools /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C Source/C Attempting to detect HOST_ARCH from 'uname -m': x86_64 Detected HOST_ARCH of X64 using uname. mkdir -p . /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C Common make[2]: Nothing to be done for `all'. mkdir ./bin /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C BrotliCompress gcc -o ../bin/Brotli tools/bro.o common/dictionary.o dec/bit_reader.o dec/decode.o dec/huffman.o dec/state.o enc/backward_references.o enc/bit_cost.o enc/block_splitter.o enc/brotli_bit_stream.o enc/cluster.o enc/compress_fragment.o enc/compress_fragment_two_pass.o enc/encode.o enc/entropy_encode.o enc/histogram.o enc/literal_cost.o enc/memory.o enc/metablock.o enc/static_dict.o enc/utf8_util.o -L../libs -lm /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C VfrCompile g++ -o ../bin/VfrCompile AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GnuGenBootSector gcc -o ../bin/GnuGenBootSector GnuGenBootSector.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C BootSectImage gcc -o ../bin/BootSectImage bootsectimage.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C EfiLdrImage gcc -o ../bin/EfiLdrImage EfiLdrImage.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C EfiRom gcc -o ../bin/EfiRom EfiRom.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenFfs gcc -o ../bin/GenFfs GenFfs.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenFv gcc -o ../bin/GenFv GenFv.o GenFvInternalLib.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenFw gcc -o ../bin/GenFw GenFw.o ElfConvert.o Elf32Convert.o Elf64Convert.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenPage gcc -o ../bin/GenPage GenPage.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenSec gcc -o ../bin/GenSec GenSec.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenCrc32 gcc -o ../bin/GenCrc32 GenCrc32.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C GenVtf gcc -o ../bin/GenVtf GenVtf.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C LzmaCompress gcc -o ../bin/LzmaCompress LzmaCompress.o Sdk/C/Alloc.o Sdk/C/LzFind.o Sdk/C/LzmaDec.o Sdk/C/LzmaEnc.o Sdk/C/7zFile.o Sdk/C/7zStream.o Sdk/C/Bra86.o -L../libs /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C Split gcc -o ../bin/Split Split.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C TianoCompress gcc -o ../bin/TianoCompress TianoCompress.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C VolInfo gcc -o ../bin/VolInfo VolInfo.o -L../libs -lCommon /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C DevicePath gcc -o ../bin/DevicePath DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtilities.o -L../libs -lCommon Finished building BaseTools C Tools with HOST_ARCH=X64 /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C Source/Python make[1]: Nothing to be done for `all'. /Applications/Installs/XCode/Xcode.app/Contents/Developer/usr/bin/make -C Tests testHelp (TianoCompress.Tests) ... ok testRandomDataCycles (TianoCompress.Tests) ... ok test_AutoGen_AutoGen (CheckPythonSyntax.Tests) ... ok test_AutoGen_BuildEngine (CheckPythonSyntax.Tests) ... ok test_AutoGen_GenC (CheckPythonSyntax.Tests) ... ok test_AutoGen_GenDepex (CheckPythonSyntax.Tests) ... ok test_AutoGen_GenMake (CheckPythonSyntax.Tests) ... ok test_AutoGen_GenPcdDb (CheckPythonSyntax.Tests) ... ok test_AutoGen_GenVar (CheckPythonSyntax.Tests) ... ok test_AutoGen_IdfClassObject (CheckPythonSyntax.Tests) ... ok test_AutoGen_InfSectionParser (CheckPythonSyntax.Tests) ... ok test_AutoGen_StrGather (CheckPythonSyntax.Tests) ... ok test_AutoGen_UniClassObject (CheckPythonSyntax.Tests) ... ok test_AutoGen_ValidCheckingInfoObject (CheckPythonSyntax.Tests) ... ok test_AutoGen___init__ (CheckPythonSyntax.Tests) ... ok test_BPDG_BPDG (CheckPythonSyntax.Tests) ... ok test_BPDG_GenVpd (CheckPythonSyntax.Tests) ... ok test_BPDG_StringTable (CheckPythonSyntax.Tests) ... ok test_BPDG___init__ (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_CommonClass (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_DataClass (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_Exceptions (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_FdfClass (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_ModuleClass (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_PackageClass (CheckPythonSyntax.Tests) ... ok test_CommonDataClass_PlatformClass (CheckPythonSyntax.Tests) ... ok test_CommonDataClass___init__ (CheckPythonSyntax.Tests) ... ok test_Common_BuildToolError (CheckPythonSyntax.Tests) ... ok test_Common_BuildVersion (CheckPythonSyntax.Tests) ... ok test_Common_DataType (CheckPythonSyntax.Tests) ... ok test_Common_Database (CheckPythonSyntax.Tests) ... ok test_Common_DecClassObject (CheckPythonSyntax.Tests) ... ok test_Common_Dictionary (CheckPythonSyntax.Tests) ... ok test_Common_DscClassObject (CheckPythonSyntax.Tests) ... ok test_Common_EdkIIWorkspace (CheckPythonSyntax.Tests) ... ok test_Common_EdkIIWorkspaceBuild (CheckPythonSyntax.Tests) ... ok test_Common_EdkLogger (CheckPythonSyntax.Tests) ... ok test_Common_Expression (CheckPythonSyntax.Tests) ... ok test_Common_FdfClassObject (CheckPythonSyntax.Tests) ... ok test_Common_FdfParserLite (CheckPythonSyntax.Tests) ... ok test_Common_GlobalData (CheckPythonSyntax.Tests) ... ok test_Common_Identification (CheckPythonSyntax.Tests) ... ok test_Common_InfClassObject (CheckPythonSyntax.Tests) ... ok test_Common_LongFilePathOs (CheckPythonSyntax.Tests) ... ok test_Common_LongFilePathOsPath (CheckPythonSyntax.Tests) ... ok test_Common_LongFilePathSupport (CheckPythonSyntax.Tests) ... ok test_Common_MigrationUtilities (CheckPythonSyntax.Tests) ... ok test_Common_Misc (CheckPythonSyntax.Tests) ... ok test_Common_MultipleWorkspace (CheckPythonSyntax.Tests) ... ok test_Common_Parsing (CheckPythonSyntax.Tests) ... ok test_Common_RangeExpression (CheckPythonSyntax.Tests) ... ok test_Common_String (CheckPythonSyntax.Tests) ... ok test_Common_TargetTxtClassObject (CheckPythonSyntax.Tests) ... ok test_Common_ToolDefClassObject (CheckPythonSyntax.Tests) ... ok test_Common_VariableAttributes (CheckPythonSyntax.Tests) ... ok test_Common_VpdInfoFile (CheckPythonSyntax.Tests) ... ok test_Common___init__ (CheckPythonSyntax.Tests) ... ok test_Ecc_CLexer (CheckPythonSyntax.Tests) ... ok test_Ecc_CParser (CheckPythonSyntax.Tests) ... ok test_Ecc_Check (CheckPythonSyntax.Tests) ... ok test_Ecc_CodeFragment (CheckPythonSyntax.Tests) ... ok test_Ecc_CodeFragmentCollector (CheckPythonSyntax.Tests) ... ok test_Ecc_Configuration (CheckPythonSyntax.Tests) ... ok test_Ecc_Database (CheckPythonSyntax.Tests) ... ok test_Ecc_Ecc (CheckPythonSyntax.Tests) ... ok test_Ecc_EccGlobalData (CheckPythonSyntax.Tests) ... ok test_Ecc_EccToolError (CheckPythonSyntax.Tests) ... ok test_Ecc_Exception (CheckPythonSyntax.Tests) ... ok test_Ecc_FileProfile (CheckPythonSyntax.Tests) ... ok test_Ecc_MetaDataParser (CheckPythonSyntax.Tests) ... ok test_Ecc_MetaFileWorkspace_MetaDataTable (CheckPythonSyntax.Tests) ... ok test_Ecc_MetaFileWorkspace_MetaFileParser (CheckPythonSyntax.Tests) ... ok test_Ecc_MetaFileWorkspace_MetaFileTable (CheckPythonSyntax.Tests) ... ok test_Ecc_MetaFileWorkspace___init__ (CheckPythonSyntax.Tests) ... ok test_Ecc_ParserWarning (CheckPythonSyntax.Tests) ... ok test_Ecc_Xml_XmlRoutines (CheckPythonSyntax.Tests) ... ok test_Ecc_Xml___init__ (CheckPythonSyntax.Tests) ... ok test_Ecc___init__ (CheckPythonSyntax.Tests) ... ok test_Ecc_c (CheckPythonSyntax.Tests) ... ok test_Eot_CLexer (CheckPythonSyntax.Tests) ... ok test_Eot_CParser (CheckPythonSyntax.Tests) ... ok test_Eot_CodeFragment (CheckPythonSyntax.Tests) ... ok test_Eot_CodeFragmentCollector (CheckPythonSyntax.Tests) ... ok test_Eot_Database (CheckPythonSyntax.Tests) ... ok test_Eot_Eot (CheckPythonSyntax.Tests) ... ok test_Eot_EotGlobalData (CheckPythonSyntax.Tests) ... ok test_Eot_EotToolError (CheckPythonSyntax.Tests) ... ok test_Eot_FileProfile (CheckPythonSyntax.Tests) ... ok test_Eot_FvImage (CheckPythonSyntax.Tests) ... ok test_Eot_InfParserLite (CheckPythonSyntax.Tests) ... ok test_Eot_Parser (CheckPythonSyntax.Tests) ... ok test_Eot_ParserWarning (CheckPythonSyntax.Tests) ... ok test_Eot_Report (CheckPythonSyntax.Tests) ... ok test_Eot___init__ (CheckPythonSyntax.Tests) ... ok test_Eot_c (CheckPythonSyntax.Tests) ... ok test_GenFds_AprioriSection (CheckPythonSyntax.Tests) ... ok test_GenFds_Attribute (CheckPythonSyntax.Tests) ... ok test_GenFds_Capsule (CheckPythonSyntax.Tests) ... ok test_GenFds_CapsuleData (CheckPythonSyntax.Tests) ... ok test_GenFds_ComponentStatement (CheckPythonSyntax.Tests) ... ok test_GenFds_CompressSection (CheckPythonSyntax.Tests) ... ok test_GenFds_DataSection (CheckPythonSyntax.Tests) ... ok test_GenFds_DepexSection (CheckPythonSyntax.Tests) ... ok test_GenFds_EfiSection (CheckPythonSyntax.Tests) ... ok test_GenFds_Fd (CheckPythonSyntax.Tests) ... ok test_GenFds_FdfParser (CheckPythonSyntax.Tests) ... ok test_GenFds_Ffs (CheckPythonSyntax.Tests) ... ok test_GenFds_FfsFileStatement (CheckPythonSyntax.Tests) ... ok test_GenFds_FfsInfStatement (CheckPythonSyntax.Tests) ... ok test_GenFds_Fv (CheckPythonSyntax.Tests) ... ok test_GenFds_FvImageSection (CheckPythonSyntax.Tests) ... ok test_GenFds_GenFds (CheckPythonSyntax.Tests) ... ok test_GenFds_GenFdsGlobalVariable (CheckPythonSyntax.Tests) ... ok test_GenFds_GuidSection (CheckPythonSyntax.Tests) ... ok test_GenFds_OptRomFileStatement (CheckPythonSyntax.Tests) ... ok test_GenFds_OptRomInfStatement (CheckPythonSyntax.Tests) ... ok test_GenFds_OptionRom (CheckPythonSyntax.Tests) ... ok test_GenFds_Region (CheckPythonSyntax.Tests) ... ok test_GenFds_Rule (CheckPythonSyntax.Tests) ... ok test_GenFds_RuleComplexFile (CheckPythonSyntax.Tests) ... ok test_GenFds_RuleSimpleFile (CheckPythonSyntax.Tests) ... ok test_GenFds_Section (CheckPythonSyntax.Tests) ... ok test_GenFds_UiSection (CheckPythonSyntax.Tests) ... ok test_GenFds_VerSection (CheckPythonSyntax.Tests) ... ok test_GenFds_Vtf (CheckPythonSyntax.Tests) ... ok test_GenFds___init__ (CheckPythonSyntax.Tests) ... ok test_GenPatchPcdTable_GenPatchPcdTable (CheckPythonSyntax.Tests) ... ok test_GenPatchPcdTable___init__ (CheckPythonSyntax.Tests) ... ok test_PatchPcdValue_PatchPcdValue (CheckPythonSyntax.Tests) ... ok test_PatchPcdValue___init__ (CheckPythonSyntax.Tests) ... ok test_Pkcs7Sign_Pkcs7Sign (CheckPythonSyntax.Tests) ... ok test_Rsa2048Sha256Sign_Rsa2048Sha256GenerateKeys (CheckPythonSyntax.Tests) ... ok test_Rsa2048Sha256Sign_Rsa2048Sha256Sign (CheckPythonSyntax.Tests) ... ok test_Table_Table (CheckPythonSyntax.Tests) ... ok test_Table_TableDataModel (CheckPythonSyntax.Tests) ... ok test_Table_TableDec (CheckPythonSyntax.Tests) ... ok test_Table_TableDsc (CheckPythonSyntax.Tests) ... ok test_Table_TableEotReport (CheckPythonSyntax.Tests) ... ok test_Table_TableFdf (CheckPythonSyntax.Tests) ... ok test_Table_TableFile (CheckPythonSyntax.Tests) ... ok test_Table_TableFunction (CheckPythonSyntax.Tests) ... ok test_Table_TableIdentifier (CheckPythonSyntax.Tests) ... ok test_Table_TableInf (CheckPythonSyntax.Tests) ... ok test_Table_TablePcd (CheckPythonSyntax.Tests) ... ok test_Table_TableQuery (CheckPythonSyntax.Tests) ... ok test_Table_TableReport (CheckPythonSyntax.Tests) ... ok test_Table___init__ (CheckPythonSyntax.Tests) ... ok test_TargetTool_TargetTool (CheckPythonSyntax.Tests) ... ok test_TargetTool___init__ (CheckPythonSyntax.Tests) ... ok test_Trim_Trim (CheckPythonSyntax.Tests) ... ok test_UPT_BuildVersion (CheckPythonSyntax.Tests) ... ok test_UPT_Core_DependencyRules (CheckPythonSyntax.Tests) ... ok test_UPT_Core_DistributionPackageClass (CheckPythonSyntax.Tests) ... ok test_UPT_Core_FileHook (CheckPythonSyntax.Tests) ... ok test_UPT_Core_IpiDb (CheckPythonSyntax.Tests) ... ok test_UPT_Core_PackageFile (CheckPythonSyntax.Tests) ... ok test_UPT_Core___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_GenMetaFile_GenDecFile (CheckPythonSyntax.Tests) ... ok test_UPT_GenMetaFile_GenInfFile (CheckPythonSyntax.Tests) ... ok test_UPT_GenMetaFile_GenMetaFileMisc (CheckPythonSyntax.Tests) ... ok test_UPT_GenMetaFile_GenXmlFile (CheckPythonSyntax.Tests) ... ok test_UPT_GenMetaFile___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_InstallPkg (CheckPythonSyntax.Tests) ... ok test_UPT_InventoryWs (CheckPythonSyntax.Tests) ... ok test_UPT_Library_CommentGenerating (CheckPythonSyntax.Tests) ... ok test_UPT_Library_CommentParsing (CheckPythonSyntax.Tests) ... ok test_UPT_Library_DataType (CheckPythonSyntax.Tests) ... ok test_UPT_Library_ExpressionValidate (CheckPythonSyntax.Tests) ... ok test_UPT_Library_GlobalData (CheckPythonSyntax.Tests) ... ok test_UPT_Library_Misc (CheckPythonSyntax.Tests) ... ok test_UPT_Library_ParserValidate (CheckPythonSyntax.Tests) ... ok test_UPT_Library_Parsing (CheckPythonSyntax.Tests) ... ok test_UPT_Library_String (CheckPythonSyntax.Tests) ... ok test_UPT_Library_UniClassObject (CheckPythonSyntax.Tests) ... ok test_UPT_Library_Xml_XmlRoutines (CheckPythonSyntax.Tests) ... ok test_UPT_Library_Xml___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_Library___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_Logger_Log (CheckPythonSyntax.Tests) ... ok test_UPT_Logger_StringTable (CheckPythonSyntax.Tests) ... ok test_UPT_Logger_ToolError (CheckPythonSyntax.Tests) ... ok test_UPT_Logger___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_MkPkg (CheckPythonSyntax.Tests) ... ok test_UPT_Object_POM_CommonObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_POM_ModuleObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_POM_PackageObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_POM___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_DecObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfBinaryObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfBuildOptionObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfCommonObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfDefineCommonObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfDefineObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfDepexObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfGuidObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfHeaderObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfLibraryClassesObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfMisc (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfPackagesObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfPcdObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfPpiObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfProtocolObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfSoucesObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser_InfUserExtensionObject (CheckPythonSyntax.Tests) ... ok test_UPT_Object_Parser___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_Object___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_DecParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_DecParserMisc (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfAsBuiltProcess (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfBinarySectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfBuildOptionSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfDefineSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfDepexSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfGuidPpiProtocolSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfLibrarySectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfPackageSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfParserMisc (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfPcdSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser_InfSourceSectionParser (CheckPythonSyntax.Tests) ... ok test_UPT_Parser___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_PomAdapter_DecPomAlignment (CheckPythonSyntax.Tests) ... ok test_UPT_PomAdapter_InfPomAlignment (CheckPythonSyntax.Tests) ... ok test_UPT_PomAdapter_InfPomAlignmentMisc (CheckPythonSyntax.Tests) ... ok test_UPT_PomAdapter___init__ (CheckPythonSyntax.Tests) ... ok test_UPT_ReplacePkg (CheckPythonSyntax.Tests) ... ok test_UPT_RmPkg (CheckPythonSyntax.Tests) ... ok test_UPT_TestInstall (CheckPythonSyntax.Tests) ... ok test_UPT_UPT (CheckPythonSyntax.Tests) ... ok test_UPT_UnitTest_CommentGeneratingUnitTest (CheckPythonSyntax.Tests) ... ok test_UPT_UnitTest_CommentParsingUnitTest (CheckPythonSyntax.Tests) ... ok test_UPT_UnitTest_DecParserTest (CheckPythonSyntax.Tests) ... ok test_UPT_UnitTest_DecParserUnitTest (CheckPythonSyntax.Tests) ... ok test_UPT_UnitTest_InfBinarySectionTest (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_CommonXml (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_GuidProtocolPpiXml (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_IniToXml (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_ModuleSurfaceAreaXml (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_PackageSurfaceAreaXml (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_PcdXml (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_XmlParser (CheckPythonSyntax.Tests) ... ok test_UPT_Xml_XmlParserMisc (CheckPythonSyntax.Tests) ... ok test_UPT_Xml___init__ (CheckPythonSyntax.Tests) ... ok test_Workspace_BuildClassObject (CheckPythonSyntax.Tests) ... ok test_Workspace_DecBuildData (CheckPythonSyntax.Tests) ... ok test_Workspace_DscBuildData (CheckPythonSyntax.Tests) ... ok test_Workspace_InfBuildData (CheckPythonSyntax.Tests) ... ok test_Workspace_MetaDataTable (CheckPythonSyntax.Tests) ... ok test_Workspace_MetaFileCommentParser (CheckPythonSyntax.Tests) ... ok test_Workspace_MetaFileParser (CheckPythonSyntax.Tests) ... ok test_Workspace_MetaFileTable (CheckPythonSyntax.Tests) ... ok test_Workspace_WorkspaceCommon (CheckPythonSyntax.Tests) ... ok test_Workspace_WorkspaceDatabase (CheckPythonSyntax.Tests) ... ok test_Workspace___init__ (CheckPythonSyntax.Tests) ... ok test_build_BuildReport (CheckPythonSyntax.Tests) ... ok test_build___init__ (CheckPythonSyntax.Tests) ... ok test_build_build (CheckPythonSyntax.Tests) ... ok test_sitecustomize (CheckPythonSyntax.Tests) ... ok test32bitUnicodeCharInUtf8Comment (CheckUnicodeSourceFiles.Tests) ... ok test32bitUnicodeCharInUtf8File (CheckUnicodeSourceFiles.Tests) ... ok testSupplementaryPlaneUnicodeCharInUtf16File (CheckUnicodeSourceFiles.Tests) ... ok testSurrogatePairUnicodeCharInUtf16File (CheckUnicodeSourceFiles.Tests) ... ok testSurrogatePairUnicodeCharInUtf8File (CheckUnicodeSourceFiles.Tests) ... ok testSurrogatePairUnicodeCharInUtf8FileWithBom (CheckUnicodeSourceFiles.Tests) ... ok testUtf16InUniFile (CheckUnicodeSourceFiles.Tests) ... ok testValidUtf8File (CheckUnicodeSourceFiles.Tests) ... ok testValidUtf8FileWithBom (CheckUnicodeSourceFiles.Tests) ... ok ---------------------------------------------------------------------- Ran 267 tests in 1.960s OK Dayos-Mac-Pro:edk2 dayo$ ```
dakanji commented 1 year ago

Where can I change -Werror to -Wno-error for testing?

Look in ~/Documents/RefindPlus/edk2/BaseTools/Source/C/Makefiles/header.makefile

Remember you need to open new Terminal windows to generate new build sessions

dakanji commented 1 year ago

Transferred here.

startergo commented 1 year ago

By the way I got the same error on another machine. Both machines are running Monterey 12.6.1. OpenCore builds the base tools and everything else without an issue through the build OC script. The Docker image runs Linux and uses Clang38 for building plus -Wno-error rather than -Werror. I use the latest Xcode and command line tools. So the common denominator here is the operating system, coder and python versions.

startergo commented 1 year ago

Ok. It work after you changed -Wno-error. Tested it on Big Sur.

startergo commented 1 year ago

Tested on Monterey. The original error was still there as a warning only, but it stopped at a different place:

## RefindPlusBuilder - Building REL Version ##  :  GOPFix
##------------------------------------------##
WORKSPACE: /Users/x299/Documents/RefindPlus/edk2
EDK_TOOLS_PATH: /Users/x299/Documents/RefindPlus/edk2/BaseTools
CONF_PATH: /Users/x299/Documents/RefindPlus/edk2/Conf
/Users/x299/Documents/RefindPlus/edk2/BaseTools/BinWrappers/PosixLike/build: line 14: exec: python: not found
Runtime Error ... Exiting

That is weird. How come python does not come with MacOS?

startergo commented 1 year ago
ls -l /usr/bin/python*
-rwxr-xr-x  76 root  wheel  167120 Oct 13 02:06 /usr/bin/python3
which python
python not found
startergo commented 1 year ago

Apparently python now is python3 but:

 sudo ln -s /usr/bin/python3 /usr/bin/python
ln: /usr/bin/python: Operation not permitted

After:

sudo ln -s /usr/bin/python3 /usr/local/bin/python

It asked me to install Command line tools:

python: error: Failed to locate 'python'.
xcode-select: Failed to locate 'python', requesting installation of command line tools
dakanji commented 1 year ago

Python2 was dropped in Monterey but only a stub version of Python3 is provided OOB and linked to XCode or something like that.

You basically need to install it yourself. You can download from python.org or use homebrew.

startergo commented 1 year ago

Well, that is the funny part as I installed Python from their page and it is not linked properly.

startergo commented 1 year ago

After installation it asked me again to install command line tools. It is an endless loop.

startergo commented 1 year ago

Removed the Symlink and it’s missing python again in path.

startergo commented 1 year ago

On my other Monterey machine it stumbles here now:

## RefindPlusBuilder - Building REL Version ##  :  GOPFix
##------------------------------------------##
Loading previous configuration from /Users/macmini/Documents/RefindPlus/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/macmini/Documents/RefindPlus/edk2
EDK_TOOLS_PATH: /Users/macmini/Documents/RefindPlus/edk2/BaseTools
CONF_PATH: /Users/macmini/Documents/RefindPlus/edk2/Conf
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: module 'sys' has no attribute 'setdefaultencoding'
  File "/Users/macmini/Documents/RefindPlus/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 549
    except BaseException, X:
           ^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

Runtime Error ... Exiting
python --version
Python 3.10.4
startergo commented 1 year ago

As I said before latest Pythons don't like:

except BaseException, X

but,

except BaseException(X)

instead

startergo commented 1 year ago

This is how acidanthera handles except in build.py of base tools:

except FatalError as e
startergo commented 1 year ago

This is in your file:

File "/Users/macmini/Documents/RefindPlus/edk2/BaseTools/Source/Python/Common/LongFilePathOs.py", line 36
    def makedirs(name, mode=0777):

And this in Acidanthera:

def makedirs(name, mode=0o777):
startergo commented 1 year ago

Another one:

 File "/Users/macmini/Documents/RefindPlus/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 21, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'

But StringIO is in python 2.7 folder and we don't have python 2.7

dakanji commented 1 year ago

Suggest you stick to a Mac OS version that supports Python 2 (Big Sur and earlier) for now.

startergo commented 1 year ago

Or maybe there is a way to install Python 2 same way as Xcode installed it before (same location).

startergo commented 1 year ago

Just installed python 2.7 from https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg and it built without a problem.

dakanji commented 1 year ago

Python is actually only being used for some tests that are not critical. I will disable these.

dakanji commented 7 months ago

Related: RefindPlus Fails to Build with Monterey