Jump to content

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


Micky1979
2,126 posts in this topic

Recommended Posts

This one remove all occurences of "-fr", "--force-rebuild", "--skip-autogen" from  what will go in Version.h. Need -fr the first time to permit Version.h to be rewritten, later never you will see again these flags on the "build" string.

OK, committed.

I will test new script until I'll get new inconvenience.

 

There was a version that checked that revision remains the same and then cancel Version.h recreation. It was good for me.

  • Like 1
Link to comment
Share on other sites

There was a version that checked that revision remains the same and then cancel Version.h recreation. It was good for me.

Yes, already present in ebuild.sh:

if [ "${repoRev}" = "${builtedRev}" ]; then SkipAutoGen=1; fi 

and prevent its recreation until you give -fr or you have a new revision after a commit (more commits/day more you have to wait because autogen makefiles again)

 

​EDIT

read here:https://www.gnu.org/software/automake/manual/html_node/CVS.html.

 

timestamp should be the same to deceive make?

 

look also here:

http://stackoverflow.com/questions/2171939/how-can-i-keep-the-original-file-commit-timestamp-on-subversion

..the timestamp can be read from an old Version.h and set again back..

  • Like 1
Link to comment
Share on other sites

@Micky1979

 

I use GCC53 on Yosemite 10.10.5. (Xcode 7.2.1)

 

With v3.5:I get errors with LTO, others. But the compilation goes to the end.

 

The report is attached.

 

Sorry, but my English is still poor

Should be automatically disabled. I can compile Clover in Yosemite + Xcode 6.4 with no issue .. but I don't have Xcode 7.2.x to test with. 

Also I think is not safe, better to use gnu gcc in these/those old OSes.

EDIT

 

ok, I misunderstood that you were using clang. Use GCC49 instead in OSX if Xcode is older than 7.3:

 

info: option 8)

This script was originally created to be run in newer OSes like El Capitan
+ using Xcode 7.3 +, but should works fine using gcc 4,9 (GCC49)
in older ones. Also gcc 5,3 can be used but not actually advised.
Link to comment
Share on other sites

ok, I misunderstood that you were using clang. Use GCC49 instead in OSX if Xcode is older than 7.3:

 

info: option 8)

This script was originally created to be run in newer OSes like El Capitan
+ using Xcode 7.3 +, but should works fine using gcc 4,9 (GCC49)
in older ones. Also gcc 5,3 can be used but not actually advised.

 

Not clang, I use GCC53. With v3.4 without any problems, disable LTO is detected automatically.

Link to comment
Share on other sites

Should be the same... sure your compilation was not by default?
Anyway build with Xcode 7.2.1 or older or gcc that is not 4.9 in OSX is like hope and obtains a non working code....

 

EDIT

or I did not understand all said things and problems encountered  :P

Link to comment
Share on other sites

Should be the same... sure your compilation was not by default?

Anyway build with Xcode 7.2.1 or older or gcc that is not 4.9 in OSX is like hope and obtains a non working code....

I try a fresh src with GCC49. Thanks

  • Like 1
Link to comment
Share on other sites

delete gcc and change like that: 

 

XCODE="XCODE5"     # XCODE32

GNU="GCC49"        # GCC49 GCC53

BUILDTOOL="$GNU"   # XCODE or GNU?      (use $GNU to use GNU gcc, $XCODE to use the choosen Xcode version)

 

maybe I have to made this OS version dependant??

Link to comment
Share on other sites

delete gcc and change like that: 

 

XCODE="XCODE5"     # XCODE32

GNU="GCC49"        # GCC49 GCC53

BUILDTOOL="$GNU"   # XCODE or GNU?      (use $GNU to use GNU gcc, $XCODE to use the choosen Xcode version)

 

maybe I have to made this OS version dependant??

I do that. 

 

The compilation goes to the end.

 

Some messages are strange for me. See on report attached.

 

Thanks a lot.

Résultat de Terminal.zip

Link to comment
Share on other sites

The only error in your log is that you have deleted the src folder with the script already loaded in Terminal. But after that, what did you see as strange??

Bro, care to try on Kubuntu 16.04?? :wink_anim:

 

Thanks.

 

On another test (Yosemite), I see :

 

"gettext check:

                          <----------------------------------------------------
gettext not found.."       
But Gettext is installed.
 
For Cubuntu 16.04, I try now. But there is problem:  "unable to get latest Clover's revision, check your internet connection or try later."
  • Like 1
Link to comment
Share on other sites

Don't know if anyone else is having problems with 

svnversion: E155036: The working copy at '/Volumes/Development/Clover-Development/Clover/src/edk2/BaseTools'
is too old (format 29) to work with client version '1.9.4 (r1740329)' (expects format 31). You need to upgrade the working copy first.
===============================================================================
Updating Clover
                          <----------------------------------------------------

an error was encountered syncing the repository:
------------------------------
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at '/Volumes/Development/Clover-Development/Clover/src/edk2/Clover'
is too old (format 29) to work with client version '1.9.4 (r1740329)' (expects format 31). You need to upgrade the working copy first.

------------------------------
Can be temporarily, retry later or seek for help.

This is after updating El Crappo to Sierra, Xcode7.? to Xcode8.

Svn has been updated.

I added an svn upgrade in the script to fix the error, maybe worth checking the svn version in case it gets updated.

Of course this does not happen with svn checkout, only svn update

Intresting. Maybe I can add this here:

 

local errors=(  'svn: E'

                'Unable to connect'

                'Unknown hostname'

                'timeout'

                'time out'

                'You need to upgrade the working copy first')

 

and if the errors array contains 'You need to upgrade the working copy first' we can upgrade (is possible the opposite??) and then re-call the same function to finish the job.

 

Thanks.

 

On another test (Yosemite), I see :

 

"gettext check:

                          <----------------------------------------------------
gettext not found.."       
But Gettext is installed.
 
For Cubuntu 16.04, I try now. But there is problem:  "unable to get latest Clover's revision, check your internet connection or try later."

 

gettext is unneeded in Linux, but in Ubuntu 16.04 is installed by default so I'll made the check conditional (i.e. only for OSX).

 

About "unable to get latest Clover's revision, check your internet connection or try later.", above this line you should have read an error, but without it I cannot say nothing because I can't image what can be.

Thanks, later I'll modify the script, but if you can show me the entire error I can understand what to do. gettext instead is easy to solve since is not needed.

Link to comment
Share on other sites

gettext is unneeded in Linux, but in Ubuntu 16.04 is installed by default so I'll made the check conditional (i.e. only for OSX).

 

About "unable to get latest Clover's revision, check your internet connection or try later.", above this line you should have read an error, but without it I cannot say nothing because I can't image what can be.

Thanks, later I'll modify the script, but if you can show me the entire error I can understand what to do. gettext instead is easy to solve since is not needed.

Gettext is about Yosemite as I write:

"gettext check:

                          <----------------------------------------------------
gettext not found.."       
But Gettext is installed.
 
For Ubuntu, I post a report
 
Thanks Micky

rapport terminal.zip

Link to comment
Share on other sites

 

Gettext is about Yosemite as I write:

"gettext check:

                          <----------------------------------------------------
gettext not found.."       
But Gettext is installed.
 
For Ubuntu, I post a report
 
Thanks Micky

 

Ok now I'm at Home.

 

to see if a command line is reachable from the Terminal (or bash in this case) should be installed in a place defined in your enviroment. To test this please open a terminal and copy/paste:

echo $(which -a gettext)

post the result.

 

About the "unable to get latest Clover's revision, check your internet connection or try later." error the script try to get the revision available online and works this way:

  1. check if the repository is online (IsLinkOnline svn://svn.code.sf.net/p/cloverefiboot/code) passed by you
  2. aquire the revision from the output of "svn info --trust-server-cert --non-interactive svn://svn.code.sf.net/p/cloverefiboot/code | grep 'Revision:' | awk '{print $NF}'"
  3. The result should be the Clover revision and to ensure this it check if is composed by numers only, i.e. no letteres/spaces like can be an error or an empty string
  4. If the aquired string is not a number it show you "unable to get latest Clover's revision, check your internet connection or try later." and fail.

So please test this in Terminal:

echo "*$( svn info --trust-server-cert --non-interactive svn://svn.code.sf.net/p/cloverefiboot/code | grep 'Revision:' | awk '{print $NF}')*"

post the result, off course from Yosemite. For me at this moment is *3738*

Link to comment
Share on other sites

Your result was:

iMac-de-Mathieu:~ mathieu-gentile$ echo "*$( svn info --trust-server-cert --non-interactive svn://svn.code.sf.net/p/cloverefiboot/code | grep 'Revision:' | awk '{print $NF}')*"
*3738*
iMac-de-Mathieu:~ mathieu-gentile$ 

Is ok. The script is failing also now? If yes what rest to check is the function "IsNumericOnly":

IsNumericOnly() {
    if [[ "${1}" =~ ^-?[0-9]+$ ]]; then
        return 0 # no, contains other or is empty
    else
        return 1 # yes is an integer (no matter for bash if there are zeroes at the beginning comparing it as integer)
    fi
}

Otherwise was sourceforge really not reachable (why I made all this because alredy happen), and this is fine.

Or maybe is that function that fail on your Linux (but not form me :P ...I'm creating a simple script for you to try only that function)


Ok, try this script on ubuntu, it print something using the above function..

 

PS (just copy/paste here the result is enough ).. and thanks

MatgenUbuntu.sh.zip

Link to comment
Share on other sites

Result:

 

/home/mathieu>'/home/mathieu/Téléchargements/MatgenUbuntu.sh' 
3738 is a number
 is not a number
   is not a number
cat is not a number
24369855 is a number
dog is not a number
Matgen84 is not a number
1979 is a number
 
Thanks Micky
Link to comment
Share on other sites

I make another try  :) 

 

Edit:

 

Same result:

 

A    UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni

Révision 22435 extraite.
checking..available, continuing..
unable to get latest Clover's revision, check your internet connection or try later.
 
 
Sorry.
 
Link to comment
Share on other sites

New src 

 

and:

A    UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h
A    UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.uni
A    UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
A    UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni
Révision 22435 extraite.
unable to get latest Clover's revision, check your internet connection or try later.
 
Sorry.
Link to comment
Share on other sites

×
×
  • Create New...