Jump to content

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


Micky1979
2,126 posts in this topic

Recommended Posts

If i wanted to remove all files related to this script what would i need to delete? Just the src folder and the script itself?

4.4.7 works fine for me but as soon as i upgraded to 4.4.8 i get this

cat: /tmp/Build_Clover.tmp: No such file or directory
================================================================================
Build_Clover script v4.4.8

Remote version unavailable due to unknown reasons!
Link to comment
Share on other sites

According to that log, the remote script is not being downloaded in /tmp. Which is strange, because you should have write access to that folder. Ok, try to create a file in it like this:

touch /tmp/test.txt

then see if you really have it:

ls /tmp/*.txt

Also, make sure you have that /tmp symlink, if you don't have it, as a workaround I'll just change the script to use the original place (/private/tmp)

Link to comment
Share on other sites

According to that log, the remote script is not being downloaded in /tmp. Which is strange, because you should have write access to that folder. Ok, try to create a file in it like this:

touch /tmp/test.txt

then see if you really have it:

ls /tmp/*.txt

Also, make sure you have that /tmp symlink, if you don't have it, as a workaround I'll just change the script to use the original place (/private/tmp)

Shanes-iMac:~ shane$ touch /tmp/test.txt
Shanes-iMac:~ shane$ ls /tmp/*.txt
/tmp/test.txt
Shanes-iMac:~ shane$ 

post-1083558-0-31799800-1497491900_thumb.png

Link to comment
Share on other sites

Strange. How about the following:

/usr/bin/curl -sLk https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp

Does it create a file Build_Clover.tmp in /tmp?

Negative

 

Shanes-iMac:~ shane$ /usr/bin/curl -sLk https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp
Shanes-iMac:~ shane$ ls /tmp/
Shanes-iMac:~ shane$ ls -la /tmp
lrwxr-xr-x@ 1 root  wheel  11 16 May 22:28 /tmp -> private/tmp
Link to comment
Share on other sites

Ok, that's something to start from. Try the above command, but remove that -s parameter:

/usr/bin/curl -Lk https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp

Also, let me see you curl version:

curl --version
Link to comment
Share on other sites

 

Ok, that's something to start from. Try the above command, but remove that -s parameter:

/usr/bin/curl -Lk https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp

Also, let me see you curl version:

curl --version
Shanes-iMac:~ shane$ /usr/bin/curl -Lk https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) Unknown SSL protocol error in connection to raw.githubusercontent.com:-9805
Shanes-iMac:~ shane$ curl --version
curl 7.54.0 (x86_64-apple-darwin16.0) libcurl/7.54.0 SecureTransport zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets 
Link to comment
Share on other sites

It appears to be curl-related problem, but I'm not sure what exactly. There are however plenty of reports at the curl bugs report site about this error message. Ok, try to remove the -k parameter as well.

 

What is the macOS version you're trying the script on?

Link to comment
Share on other sites

It appears to be curl-related problem, but I'm not sure what exactly. There are however plenty of reports at the curl bugs report site about this error message. Ok, try to remove the -k parameter as well.

 

What is the macOS version you're trying the script on?

Shanes-iMac:~ shane$ /usr/bin/curl -L https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 57258  100 57258    0     0   122k      0 --:--:-- --:--:-- --:--:--  122k
Shanes-iMac:~ shane$ ls /tmp
Build_Clover.tmp  com.apple.launchd.ZDmhuZpO1X
com.apple.launchd.CxjelltCwu ntfs-automount.log

10.12.6 Beta (16G16b)

Link to comment
Share on other sites

Can clover be built on XCODE 9?? I've tried changing the command to this, but the build fails...

checkXcode () {
if [[ ! -x /usr/bin/gcc ]]; then printError "Xcode clt not found, exiting!\n"; exit 1; fi
if [[ ! -x /usr/bin/xcodebuild ]]; then printError "xcodebuild not found, exiting!\n"; exit 1; fi
# Autodetect the Xcode version if no specific version is set (XCODE) and disable LTO if Xcode is version 7.2.x or earlier
if [[ "$XCODE" == "" ]]; then
	local xcversion=$(/usr/bin/xcodebuild -version | grep 'Xcode' | awk '{print $NF}')
	case "$xcversion" in
		[1-6]* | 7 | 7.[0-2]*) XCODE="XCODE5"; LTO_FLAG="--no-lto";;
		7.[34]*) XCODE="XCODE5";;
		8*) XCODE="XCODE8";;
                9*) XCODE="XCODE8";;
		*) printError "Unknown Xcode version format, exiting!\n"; exit 1;;
	esac
fi
}
Link to comment
Share on other sites

Shanes-iMac:~ shane$ /usr/bin/curl -L https://raw.githubusercontent.com/Micky1979/Build_Clover/master/Build_Clover.command -o /tmp/Build_Clover.tmp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 57258  100 57258    0     0   122k      0 --:--:-- --:--:-- --:--:--  122k
Shanes-iMac:~ shane$ ls /tmp
Build_Clover.tmp  com.apple.launchd.ZDmhuZpO1X
com.apple.launchd.CxjelltCwu ntfs-automount.log
10.12.6 Beta (16G16b)

 

 

Hm... curious. According to the curl man page, the -k option is used to tell curl to use the so-called insecure SSL connections. Useful, when a site certificate has just expired and hasn't been updated in time, though I didn't think it may become a problem, curl works fine with this parameter here on my laptop (macOS 10.11.6) and my desktop (macOS 10.12.5). Ok, made some modifications to the beta script, download it and try:

 

https://github.com/Micky1979/Build_Clover/raw/work/Build_Clover.command

 

Can clover be built on XCODE 9?? I've tried changing the command to this, but the build fails...

checkXcode () {
if [[ ! -x /usr/bin/gcc ]]; then printError "Xcode clt not found, exiting!\n"; exit 1; fi
if [[ ! -x /usr/bin/xcodebuild ]]; then printError "xcodebuild not found, exiting!\n"; exit 1; fi
# Autodetect the Xcode version if no specific version is set (XCODE) and disable LTO if Xcode is version 7.2.x or earlier
if [[ "$XCODE" == "" ]]; then
	local xcversion=$(/usr/bin/xcodebuild -version | grep 'Xcode' | awk '{print $NF}')
	case "$xcversion" in
		[1-6]* | 7 | 7.[0-2]*) XCODE="XCODE5"; LTO_FLAG="--no-lto";;
		7.[34]*) XCODE="XCODE5";;
		8*) XCODE="XCODE8";;
                9*) XCODE="XCODE8";;
		*) printError "Unknown Xcode version format, exiting!\n"; exit 1;;
	esac
fi
}

 

Probably yes, but not with exactly this compiler profile (XCODE8). You could try the other one (XCODE5) to see if it still works. In any case, I'll update that part of the code when someone has confirmed the right way to use Xcode 9 with the Clover source.

  • Like 1
Link to comment
Share on other sites

 

Hm... curious. According to the curl man page, the -k option is used to tell curl to use the so-called insecure SSL connections. Useful, when a site certificate has just expired and hasn't been updated in time, though I didn't think it may become a problem, curl works fine with this parameter here on my laptop (macOS 10.11.6) and my desktop (macOS 10.12.5). Ok, made some modifications to the beta script, download it and try:

 

https://github.com/Micky1979/Build_Clover/raw/work/Build_Clover.command

 

 

Probably yes, but not with exactly this compiler profile (XCODE8). You could try the other one (XCODE5) to see if it still works. In any case, I'll update that part of the code when someone has confirmed the right way to use Xcode 9 with the Clover source.

Working with no error

================================================================================
Build_Clover script v4.4.9                  Wow, are you coming from the future?
                             <--------------------------------------------------
================================================================================
By Micky1979 based on Slice, Zenith432, STLVNUB, JrCs, cecekpawon, Needy,
cvad, Rehabman, philip_petev, ErmaC
 
Supported OSes: macOS X, Ubuntu (16.04/16.10), Debian Jessie (8.4/8.5/8.6/8.7)
                             <--------------------------------------------------
CLOVER Remote revision: 4089 Local revision: 4089
EDK2 Remote revision: 24799 Local revision: 24552
 
The current local EDK2 revision is the suggested one (24552). 
                             <--------------------------------------------------
Please enter your choice: 
 1) update Clover only (no building)
 2) update Clover + force edk2 update (no building)
 3) run my script on the source
 4) build existing revision (no update, for testing only)
 5) build existing revision for release (no update, standard build)
 6) build existing revision with custom macros enabled
 7) info and limitations about this script
 8) enter Developers mode (only for devs)
 9) Exit
? 
Link to comment
Share on other sites

 

Hm... curious. According to the curl man page, the -k option is used to tell curl to use the so-called insecure SSL connections. Useful, when a site certificate has just expired and hasn't been updated in time, though I didn't think it may become a problem, curl works fine with this parameter here on my laptop (macOS 10.11.6) and my desktop (macOS 10.12.5). Ok, made some modifications to the beta script, download it and try:

 

https://github.com/Micky1979/Build_Clover/raw/work/Build_Clover.command

 

 

Probably yes, but not with exactly this compiler profile (XCODE8). You could try the other one (XCODE5) to see if it still works. In any case, I'll update that part of the code when someone has confirmed the right way to use Xcode 9 with the Clover source.

 

 

Didn't work, xcode 9 support wont come anytime soon from clover devs...

 

Anyways, here's the  error it throws:

[CC] DivS64x64Remainder
/Users/denis/src/edk2/MdePkg/Library/UefiLib/UefiLib.c:1530:19: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
  VA_START (Args, Iso639Language);
                  ^
/Users/denis/src/edk2/MdePkg/Library/UefiLib/UefiLib.c:1517:19: note: parameter of type 'BOOLEAN' (aka 'unsigned char') is declared here
  IN BOOLEAN      Iso639Language,
                  ^
1 error generated.
[CC] ARShiftU64
make: *** [/Users/denis/src/edk2/Build/Clover/RELEASE_XCODE5/X64/MdePkg/Library/UefiLib/UefiLib/OUTPUT/UefiLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	make tbuild [/Users/denis/src/edk2/Build/Clover/RELEASE_XCODE5/X64/MdePkg/Library/UefiLib/UefiLib]
Link to comment
Share on other sites

Hy, I was trying to build Clover 4077 with this script but I get this error:

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
  Referenced from: /usr/local/bin/bash

Can you help me?

Thanks

Full log:

 

================================================================================
Build_Clover script v4.4.9                                  No update available.
                             <--------------------------------------------------
================================================================================
By Micky1979 based on Slice, Zenith432, STLVNUB, JrCs, cecekpawon, Needy,
cvad, Rehabman, philip_petev, ErmaC

Supported OSes: macOS X, Ubuntu (16.04/16.10), Debian Jessie (8.4/8.5/8.6/8.7)
                             <--------------------------------------------------
CLOVER	Remote revision: 4089	Local revision: 4077
EDK2	Remote revision: 24800	Local revision: 24552

The current local EDK2 revision is the suggested one (24552). 
                             <--------------------------------------------------
Please enter your choice: 
 1) add "buildclover" symlink to /usr/local/bin
 2) update Clover only (no building)
 3) update Clover + force edk2 update (no building)
 4) run my script on the source
 5) build existing revision (no update, for testing only)
 6) build existing revision for release (no update, standard build)
 7) build existing revision with custom macros enabled
 8) info and limitations about this script
 9) enter Developers mode (only for devs)
 10) Exit
? 6








================================================================================
Select the desired architecture
                             <--------------------------------------------------
	 1) Standard x64 only
	 2) ia32 and x64 (ia32 is deprecated)
	 3) ia32 only (deprecated)
	 4) Back to Main Menu
	 5) Exit
? 1

























================================================================================
Select the desired pkg type
                             <--------------------------------------------------
	 1) Standard
	 2) slim pkg that skip themes and CloverThemeManager.app
	 3) slim pkg that skip themes and CloverThemeManager.app, updater and PrefPanel
	 4) slim pkg UEFI only, without RC Scripts, themes & CTM, updater and PrefPanel
	 5) Back to Select architecture menu
	 6) Exit
? 1
================================================================================
Running from: macOS 10.11.6
Xcode 8.2.1
Build version 8C1002
                             <--------------------------------------------------
================================================================================
Compiler settings
                             <--------------------------------------------------
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
                             <--------------------------------------------------
================================================================================
BUILDTOOL is XCODE8
                             <--------------------------------------------------

================================================================================
nasm check:
                             <--------------------------------------------------
NASM version 2.12.02 compiled on Jul  6 2016
================================================================================
gettext check:
                             <--------------------------------------------------
found gettext at /Users/PanzerSajt/src/opt/local/bin
================================================================================
boot6
                             <--------------------------------------------------
TOOLCHAIN_DIR: /Users/PanzerSajt/src/opt/local
NASM_PREFIX: /Users/PanzerSajt/src/opt/local/bin/
NASM_VER: 2.12.02
Initializing workspace
Loading previous configuration from /Users/PanzerSajt/src/edk2/Conf/BuildEnv.sh
WORKSPACE: /Users/PanzerSajt/src/edk2
EDK_TOOLS_PATH: /Users/PanzerSajt/src/edk2/BaseTools
CONF_PATH: /Users/PanzerSajt/src/edk2/Conf

Running edk2 build for CloverX64 using the command:
build  -D NO_GRUB_DRIVERS_EMBEDDED -D CHECK_FLAGS -D USE_LOW_EBDA -p Clover/Clover.dsc  -a X64 -b RELEASE -t XCODE8 -n 9 

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
  Referenced from: /usr/local/bin/bash
  Reason: image not found
./ebuild.sh: line 684: 32547 Trace/BPT trap: 5       build -D NO_GRUB_DRIVERS_EMBEDDED -D CHECK_FLAGS -D USE_LOW_EBDA -p Clover/Clover.dsc -a X64 -b RELEASE -t XCODE8 -n 9

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

Edited by PanzerSajt
Link to comment
Share on other sites

That's not related to the script, more like the custom bash version you may have. /usr/local/bin/bash is not the place where bash should be, unless you have installed any custom repository like MacPorts (unlikely, MacPorts uses /opt/local/bin instead) or HomeBrew (very likely).

  • Like 2
Link to comment
Share on other sites

That's not related to the script, more like the custom bash version you may have. /usr/local/bin/bash is not the place where bash should be, unless you have installed any custom repository like MacPorts (unlikely, MacPorts uses /opt/local/bin instead) or HomeBrew (very likely).

 

Thank you very much! :)

 

Removing HomeBrew solved it.

Link to comment
Share on other sites

You don't need to remove it, simply change the default shell for your user with the following command:

chsh -s /bin/bash

This way you may change between the different bash versions as you like. Of course, you'll need to restart your terminal app every time after issuing the above command.

 

This is on my laptop:

post-60007-0-86533300-1497529110_thumb.png

I have MacPorts, installed on it, and my default shell is the latest version from the repo. In any case, I'm testing the script with both the MacPorts version and the stock one.

Link to comment
Share on other sites

×
×
  • Create New...