Bootstrap how to

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Bootstrap how to

HilaireFernandes
I give again a try to bootstrap (after my last summer fail). Here how
far I went:

1. Fetched the repo https://github.com/pharo-project/pharo. I have to
fetch a fresh one as updating my repo failed with the git command
pull/fetch/merge/reset hard does not work. Incredible how simple thinks
does not work simply with git. Do people really like git or pretend to
because everyone is using it.

2. Followed instructions to build a bootstrap.

BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 sh ./bootstrap/scripts/bootstrap.sh

The resulting image bootstrap-cache/bootstrap.image is built after 1 or
2 hours. Its size is 3,4MB, when started there is only blank screen, I
guess it is the expected outcome.

3. Followed instructions to load pharo environment:

  BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 ./bootstrap/scripts/build.sh

Several attempts were needed and the build.sh script is fragile and fail
when at the repeated attempts, some cleaning were needed.

I suggest two things :

 1. you add -p to your mkdir commands (in build.sh and get-vm.sh
    scripts) as it make your script less fragile !
 2. Also checking for the existence of the Pharo.source will avoid to
    have duplicted uncessary downloaded source file version.
    (Pharo.source1, Pharo.source2):

        if test ! -e PharoV60.sources
            then
                wget http://files.pharo.org/sources/PharoV60.sources
        fi

Now the image is building, will see next.

Hilaire

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Bootstrap how to

Stephane Ducasse-3
Thanks for sharing that with us.
Can you do a pull resquest for the changes you suggest?

I think that for the bootstrap we have to recreate the source each
time so we should recreate because it is depend on what
is in the boostrap.
Now this bootstrap is slow and you can reuse the result of our builds.

Stef


On Thu, Mar 8, 2018 at 11:34 AM, Hilaire <[hidden email]> wrote:

> I give again a try to bootstrap (after my last summer fail). Here how far I
> went:
>
> 1. Fetched the repo https://github.com/pharo-project/pharo. I have to fetch
> a fresh one as updating my repo failed with the git command
> pull/fetch/merge/reset hard does not work. Incredible how simple thinks does
> not work simply with git. Do people really like git or pretend to because
> everyone is using it.
>
> 2. Followed instructions to build a bootstrap.
>
> BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 sh ./bootstrap/scripts/bootstrap.sh
>
> The resulting image bootstrap-cache/bootstrap.image is built after 1 or 2
> hours. Its size is 3,4MB, when started there is only blank screen, I guess
> it is the expected outcome.
>
> 3. Followed instructions to load pharo environment:
>
>  BUILD_NUMBER=42 BOOTSTRAP_ARCH=32 ./bootstrap/scripts/build.sh
>
> Several attempts were needed and the build.sh script is fragile and fail
> when at the repeated attempts, some cleaning were needed.
>
> I suggest two things :
>
> 1. you add -p to your mkdir commands (in build.sh and get-vm.sh
>    scripts) as it make your script less fragile !
> 2. Also checking for the existence of the Pharo.source will avoid to
>    have duplicted uncessary downloaded source file version.
>    (Pharo.source1, Pharo.source2):
>
>        if test ! -e PharoV60.sources
>            then
>                wget http://files.pharo.org/sources/PharoV60.sources
>        fi
>
> Now the image is building, will see next.
>
> Hilaire
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Bootstrap how to

HilaireFernandes
In reply to this post by HilaireFernandes
Le 08/03/2018 à 11:34, Hilaire a écrit :
> Now the image is building, will see next.

The build process ended with this output, don't know if it is right:


PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
[ self
     handleArgument:
         (self arguments
             ifEmpty: [ '' ]
             ifNotEmpty: [ :arguments | arguments first ]) ] in [ [ self
     handleArgument:
         (self arguments
             ifEmpty: [ '' ]
             ifNotEmpty: [ :arguments | arguments first ]) ]
     on: Exit
     do: [ :exit |
         "If the command line is protected by password, we just exit the
image because in non-headless mode the handleExit will let the image
open. If the password protection is enabled, it is to avoid to let the
access to the image."
         self class commandLinePasswordManager hasPasswordSet
             ifTrue: [ Smalltalk snapshot: false andQuit: true ].
         ^ self handleExit: exit ] ] in
PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [
self...
BlockClosure>>on:do:
[ [ self
     handleArgument:
         (self arguments
             ifEmpty: [ '' ]
             ifNotEmpty: [ :arguments | arguments first ]) ]
     on: Exit
     do: [ :exit |
         "If the command line is protected by password, we just exit the
image because in non-headless mode the handleExit will let the image
open. If the password protection is enabled, it is to avoid to let the
access to the image."
         self class commandLinePasswordManager hasPasswordSet
             ifTrue: [ Smalltalk snapshot: false andQuit: true ].
         ^ self handleExit: exit ] ] in
PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ [
self...
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self
value....



--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Bootstrap how to

HilaireFernandes
In reply to this post by Stephane Ducasse-3
Le 08/03/2018 à 12:25, Stephane Ducasse a écrit :
> Thanks for sharing that with us.
> Can you do a pull resquest for the changes you suggest?
No I prefer to just paste it here, it is easier for me. Moreover those
suggestions may need to be adjusted by whoever knows better. For
example, "mkdir -p .." may be better replaced by something like "rm -rf
toto; mkdir toto". I don't know
>
> I think that for the bootstrap we have to recreate the source each
> time so we should recreate because it is depend on what
> is in the boostrap.
> Now this bootstrap is slow and you can reuse the result of our builds.

It is ok, I just try to see at large how it is going on.

Hilaire

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Bootstrap how to

HilaireFernandes
In reply to this post by HilaireFernandes
Le 08/03/2018 à 12:27, Hilaire a écrit :
> The build process ended with this output, don't know if it is right:

To clarify, several images were produced, don't know if the job was
completed as expected:

-rw-rw-r-- 1 hilaire hilaire  70M mars   8 12:01
Pharo7.0-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire  11M mars   8 11:43
Pharo7.0-metacello-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 8,8M mars   8 11:42
Pharo7.0-monticello-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 8,0M mars   8 11:42
Pharo7.0-monticello_bootstrap-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 5,9M mars   8 11:40
Pharo7.0-core-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 5,8M mars   8 11:40
Pharo7.0-traits-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 5,5M mars   8 11:40
Pharo7.0-compiler-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 3,4M mars   8 11:40
Pharo7.0-bootstrap-32bit-dcd5b5611.image
-rw-rw-r-- 1 hilaire hilaire 3,4M mars   8 11:02 bootstrap.image
-rw-rw-r-- 1 hilaire hilaire  38M mars   8 10:50 Pharo.image

--
Dr. Geo
http://drgeo.eu