Jump to content

Build_Clover.command, another Script to build standard Clover (or customized)


Micky1979
2,126 posts in this topic

Recommended Posts

I get the following error when trying to build after updating the script this morning (Not yet updated Xcode)...

[GENFW] OsxAptioFix2Drv
[CC] lib
[CC] menu
[CC] screen
[CC] IO
[CC] common
[CC] legacy
[CC] loader
[CC] tool
[CC] secureboot
[CC] securehash
[CC] securemenu
[CC] securevars
[CC] bootscreen
[CC] lockedgraphics
[CC] egemb_icons
[CC] egemb_font
[CC] scroll_images
[CC] BmLib
[CC] image
[CC] load_icns
[CC] libscreen
[CC] lodepng
[CC] text
[CC] AcpiPatcher
[CC] AmlGenerator
[CC] ati
[CC] BootLog
[CC] BootOptions
[CC] Console
[CC] cpu
[CC] DataHubCpu
[CC] device_inject
[CC] device_tree
[CC] Edid
[CC] Events
[CC] hda
[CC] gma
[CC] guid
[CC] Injectors
[CC] LegacyBiosThunk
[CC] LegacyBoot
[CC] nvidia
[CC] platformdata
[CC] plist
[CC] Pointer
[CC] Settings
[CC] smbios
[CC] spd
[CC] string
[CC] StateGenerator
[CC] usbfix
[CC] b64cdecode
[CC] FixBiosDsdt
/Users/dan/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:1879:5: error: member reference base type 'char' is not a structure or union
    DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dan/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:26:60: note: expanded from macro 'DBG_RT'
#define DBG_RT(entry, ...)    if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { AsciiPrint(__VA_ARGS__); }
                                                      ~~~~~^ ~~~~~~~~~~~~~~~~~~~~
/Users/dan/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:1879:5: error: member reference base type 'char' is not a structure or union
    DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dan/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:26:100: note: expanded from macro 'DBG_RT'
#define DBG_RT(entry, ...)    if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { AsciiPrint(__VA_ARGS__); }
                                                                                              ~~~~~^ ~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [/Users/dan/src/edk2/Build/Clover/RELEASE_XCODE8/X64/Clover/rEFIt_UEFI/refit/OUTPUT/Platform/kernel_patcher.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/dan/src/edk2/Build/Clover/RELEASE_XCODE8/X64/Clover/rEFIt_UEFI/refit]


build.py...
 : error F002: Failed to build module
	/Users/dan/src/edk2/Clover/rEFIt_UEFI/refit.inf [X64, XCODE8, RELEASE]

- Failed -
Build end time: 05:56:26, Oct.20 2017
Build total time: 00:00:36


o_Ops, ./ebuild.sh exited with error(s), aborting..
Dans-Mac-mini:~ dan$ 

Link to comment
Share on other sites

Those errors are produced by ~/src/edk2/Clover/buildgettext.sh, so... no script-related issue, at least not with this script. Disabled temporarily my MacPorts install and gettext builds fine here (Xcode 9, macOS 10.12.6) through the same script.

 

Once he install MacPorts, the buildgettext.sh script will be omitted automatically.

Side note: the last commit r4257 seems to be broken.

 

[CC] smbios

[CC] spd

[CC] string

[CC] StateGenerator

[CC] usbfix

[CC] b64cdecode

[CC] FixBiosDsdt

/Users/philip/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:1879:5: error: member reference base type 'char' is not a structure or union

    DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/philip/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:26:60: note: expanded from macro 'DBG_RT'

#define DBG_RT(entry, ...)    if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { AsciiPrint(__VA_ARGS__); }

                                                      ~~~~~^ ~~~~~~~~~~~~~~~~~~~~

/Users/philip/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:1879:5: error: member reference base type 'char' is not a structure or union

    DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/philip/src/edk2/Clover/rEFIt_UEFI/Platform/kernel_patcher.c:26:100: note: expanded from macro 'DBG_RT'

#define DBG_RT(entry, ...)    if ((entry != NULL) && (entry->KernelAndKextPatches != NULL) && entry->KernelAndKextPatches->KPDebug) { AsciiPrint(__VA_ARGS__); }

                                                                                              ~~~~~^ ~~~~~~~~~~~~~~~~~~~~

2 errors generated.

make: *** [/users/philip/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/rEFIt_UEFI/refit/OUTPUT/Platform/kernel_patcher.obj] Error 1

 

 

build.py...

 : error 7000: Failed to execute command

    make tbuild [/users/philip/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/rEFIt_UEFI/refit]

 

 

build.py...

 : error F002: Failed to build module

    /Users/philip/src/edk2/Clover/rEFIt_UEFI/refit.inf [X64, XCODE5, RELEASE]

 

- Failed -

Build end time: 07:57:51, Oct.20 2017

Build total time: 00:00:35

 

Getting the same error here. Will wait for fix.

Link to comment
Share on other sites

And to correct this we need to do?

DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");

to (kernel_patcher.c)

DBG_RT(Entry, "EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");

GCC53 compile will error without this change. (at least on my end)

  • Like 2
Link to comment
Share on other sites

DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");

to (kernel_patcher.c)

DBG_RT(Entry, "EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");

GCC53 compile will error without this change. (at least on my end)

 

Build fine with change above.

Link to comment
Share on other sites

 

DBG_RT("EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");
to (kernel_patcher.c)
DBG_RT(Entry, "EnableExtCpuXCPM - %a!\n", patchedOk? "OK" : "FAILED");
GCC53 compile will error without this change. (at least on my end)
Commited. Thanks

 

나의 LG-F800S 의 Tapatalk에서 보냄

  • Like 4
Link to comment
Share on other sites

Hello, I cleansed my ~/src folder to rebuild clover local sources from scratch but gotta this, what's the caused? Thanks.

I've tried again many times but have no luck. (XCode 8.2 under OS X El Capitan 10.11.6 15G17020).

 

"Error compiling gettext latest !

 

#SOLVED:

1. Updating El Capitan 10.11.6 to (15G17022)

2. Removing previously installed jdk9.0.1

3. $ buildclover - "gettext make" noticed me "To use the 'javac' command-line tool you need to install a JDK."

4. I clicked "More Info" and from web it suggest me to install JDK 8 Upd 151.

5. I cancelled the script, installing JDK 8 Upd 151, then repeat the build.

6. Done! "gettext" installed as usual.

 

Though I'm not really sure that this was the cause, but I'm happy it now works again. Thanks anyway.  :)

post-826765-0-82453100-1508500135_thumb.png

  • Like 3
Link to comment
Share on other sites

Hello i have this error any solution?

 

Building ... /Users/alex/src/edk2/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf [X64]
In file included from /Users/alex/src/edk2/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c:16:
In file included from /Users/alex/src/edk2/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h:31:
/Users/alex/src/edk2/MdePkg/Include/Protocol/HiiPopup.h:76:3: error: redefinition of typedef 'EFI_HII_POPUP_PROTOCOL' is a C11 feature [-Werror,-Wtypedef-redefinition]
} EFI_HII_POPUP_PROTOCOL;
  ^
/Users/alex/src/edk2/MdePkg/Include/Protocol/HiiPopup.h:24:40: note: previous definition is here
typedef struct _EFI_HII_POPUP_PROTOCOL EFI_HII_POPUP_PROTOCOL;
                                       ^
1 error generated.
make: *** [/users/alex/src/edk2/Build/Clover/RELEASE_XCODE5/X64/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe/OUTPUT/FormDisplay.obj] Error 1


build.py...
 : error 7000: Failed to execute command
    make tbuild [/users/alex/src/edk2/Build/Clover/RELEASE_XCODE5/X64/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe]


build.py...
 : error F002: Failed to build module
    /Users/alex/src/edk2/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf [X64, XCODE5, RELEASE]

- Failed -
Build end time: 21:09:45, Oct.22 2017
Build total time: 00:00:58


o_Ops, ./ebuild.sh exited with error(s), aborting..
logout

[Process completed]
 

Link to comment
Share on other sites

That doesn't help much, post the full log. Anyway, looks like Clover source problem.

Your script and clover source are no problem. Tested it. Now clover sf site has some issue. I first saw metadata issue. Anyways script can get r4260 source and can build.

 

나의 LG-F800S 의 Tapatalk에서 보냄

  • Like 1
Link to comment
Share on other sites

That doesn't help much, post the full log. Anyway, looks like Clover source problem.

 

Your script and clover source are no problem. Tested it. Now clover sf site has some issue. I first saw metadata issue. Anyways script can get r4260 source and can build.

 

나의 LG-F800S 의 Tapatalk에서 보냄

It works ok here as well, I just compiled the r4260.

  • Like 1
Link to comment
Share on other sites

You don't need to remove the whole ~/src folder, removing only the edk2 subfolder is enough.

Thanks for the tip.

 

By the way I never got the chance to thank you for updating, maintaining and supporting the Build_Clover command. So Thanks a lot man :)

  • Like 1
Link to comment
Share on other sites

Sorry for asking;

I read as noted by the script, it requires at least 16.04 for Ubuntu version, but I've installed Ubuntu 17.10 on my mach.

I then tried to run the script and get these:

BOOTX64.efi && CLOVERX64.efi @1,1KB (instead of 7xxKB if using Ubuntu 16.04 or XCode toolchain under macOS).

(I also remember that on prev 16.04 the script forced to use gcc53 as buildtool, as same as on 17.10 which is gcc72)

 

Any idea to make the script becomes compatible under Ubuntu 17.10? Thanks.  :)

Build_Clover_4.5.6_Ub17.10_gcc53.zip

EFI-r4265_1kb_*.efi.zip

Link to comment
Share on other sites

I'll try to reproduce the problem, there's nothing unusual in your log though.

 

EDIT: just tested it, happens to me too. It seems the GCC53 profile is not fully compatible with GCC 7.x, so until someone more experienced in that matter figure out a new one, it will (not) work this way.

  • Like 1
Link to comment
Share on other sites

I'll try to reproduce the problem, there's nothing unusual in your log though.

 

EDIT: just tested it, happens to me too. It seems the GCC53 profile is not fully compatible with GCC 7.x, so until someone more experienced in that matter figure out a new one, it will (not) work this way.

Running under Ubuntu 17.10, on ~/BuildCloverConfig.txt, "Build_tool=XCODE" is still as it, I manually changed it to =GCC but also produces same result, thanks. 

Link to comment
Share on other sites

Running under Ubuntu 17.10, on ~/BuildCloverConfig.txt, "Build_tool=XCODE" is still as it, I manually changed it to =GCC but also produces same result, thanks. 

That option is not even considered by the script, running on Linux. GCC53 is used by default, so editing it and the "XCODE=" options has no effect on Linux.

  • Like 1
Link to comment
Share on other sites

I understood from the usage section that the script can skip interactive menus entirely if at least a single argument is provided, but that doesn't seem to be the case. No matter what argument I provide, it always shows the menus.

 

I'm trying to automate it to a single command, but from what I can tell the script doesn't support fully headless/non-interactive running?

 

EDIT: Maybe just allow something like this to override build options?

FORCEREBUILD="-fr" UPDATE_FLAG="NO" BUILD_FLAG="YES" ARCH="X64" buildclover

EDIT 2: Found a workaround by adding the following to "var_defaults":

	"FORCEREBUILD",,,
	"UPDATE_FLAG",,,"YES"
	"BUILD_FLAG",,,"NO"
	"ARCH",,,
	)

This way I can simply override them in the config file, which seems to work perfectly for running in headless/non-interactive mode.

Note that I also had to change the logic in the build() function to take into account if these values are set/overwritten.

Link to comment
Share on other sites

I understood from the usage section that the script can skip interactive menus entirely if at least a single argument is provided, but that doesn't seem to be the case. No matter what argument I provide, it always shows the menus.

 

I'm trying to automate it to a single command, but from what I can tell the script doesn't support fully headless/non-interactive running?

 

EDIT: Maybe just allow something like this to override build options?

FORCEREBUILD="-fr" UPDATE_FLAG="NO" BUILD_FLAG="YES" ARCH="X64" buildclover

EDIT 2: Found a workaround by adding the following to "var_defaults":

	"FORCEREBUILD",,,
	"UPDATE_FLAG",,,"YES"
	"BUILD_FLAG",,,"NO"
	"ARCH",,,
	)

This way I can simply override them in the config file, which seems to work perfectly for running in headless/non-interactive mode.

Note that I also had to change the logic in the build() function to take into account if these values are set/overwritten.

That's actually a good one. Worked on that yesterday and now the beta branch supports that "non-interactive mode". All you have to do is to start the script at least once so the new options to be added to the config, then change in it the INTERACTIVE option from YES (default value) to NO and the script will work as an equivalent of the 5) build existing revision for release (no update, standard build) option without almost any user intervention.

For those who want to test it, the script is here.

  • Like 4
Link to comment
Share on other sites

That's actually a good one. Worked on that yesterday and now the beta branch supports that "non-interactive mode". All you have to do is to start the script at least once so the new options to be added to the config, then change in it the INTERACTIVE option from YES (default value) to NO and the script will work as an equivalent of the 5) build existing revision for release (no update, standard build) option without almost any user intervention.

For those who want to test it, the script is here.

 

Awesome, thank you! One additional feature/option I'd like to see is to force it to update everything first, then run a build, which is how I currently have it setup, by simply enabling both UPDATE_FLAG=YES and BUILD_FLAG=YES.

This way it's easy to build an always up to date version, but again entirely non-interactively.

Link to comment
Share on other sites

×
×
  • Create New...