Hi Tin,

On 07/10/15 03:22, tin h wrote:
Thanks folks for all the help.
--strip-componets=1 helped with the tar, but I think it is done by default.

Well, the strip isn't done by default, but EasyBuild does notice unpacking the sources yielded a (single) new directory, and it is smart enough to know that it should 'cd' in there before starting the configure/build/install cycle.


What turned out to be the root cause of my problem was that the .tgz I created the first time had one extra level of directory, and it was cached by EB in some tmp directory. Even after I placed a new tgz as defined in source_urls, EB did not copy the new file to its build cache. After manually deleting it things worked as expected.

Is there a way to force a copy of the .tgz? would "cleanupoldbuild" remove the cache and thus always get a new .tgz?
Maybe I should file a bug on this issue?

Once EasyBuild has downloaded a source tarball, it doesn't redownload it if it can find the file in the source path that EasyBuild was configured to use (by default $HOME/.local/easybuild/sources).

It's not clear to me what you changed exactly, but maybe adding a checksum for the source tarball is worth while (using "checksums = ['md5checksumhere']" in the easyconfig file). That would at least made it clear that the source tarball was not refreshed.

W.r.t. to the 'cache' you're referring to: EasyBuild will always throw away an existing build directory, and unpack the sources again to create a fresh one (well, expect in the rare case where 'buildininstalldir = True' is used in the easyconfig or easyblock).

Does this answer your question?


regards,

Kenneth

Much thanks again!
Tin




On Wed, Sep 30, 2015 at 11:51 PM, Kenneth Hoste <[email protected] <mailto:[email protected]>> wrote:

    Hi Tin,

    On 01/10/15 02:32, tin h wrote:
    Hello EasyBuild gurus,

    Because of the workflow at my work, I am trying to install a
    program using PackedBinary.

    eb fails, as it complains that the sanity check files i told it
    to look for isn't there.  And it is not there because it created
    an extra "version"directory underneath of where I expected it.

    I was thinking of using install_cmd and running the tar myself,
    since i wanted to preserve owners anyway.   but I am not sure of
    what variables i could use, where can I find such list and their
    description?

    I am open to other suggestions :)

    I think this is what you're looking for:

        $ eb -a | grep unpack_options
        unpack_options          Extra options for unpacking source
    [default: ""]

    That is, use something like:

        unpack_options = '--strip-components=1'

    Alternatively, you can specify the full extract command together
    with the source file:

        sources = [('topspin.%(version)s.tgz', "tar xfzp
    --strip-components=1")]

    To figure out which easyconfig parameters you can set when using a
    particular easyblock, you can use "eb -a -e PackedBinary", for
    example.
    We're working on better documentation for the generic easyblocks
    (generated from the easyblocks themselves, so we can easily keep
    it up-to-date).


    regards,

    Kenneth



    Much thanks in advance!
    Tin



    Here is my script:



    easyblock = 'PackedBinary'

    name = "topspin"
    version = "3.5pl2"
    description = """Topspin NMR software (data processing option
    only)"""

    homepage = 'http://bruker.com/'

    toolchain = {'name': 'dummy', 'version': 'dummy'}

    source_urls = ['file:///usr/prog/drop/topspin']
    sources = ['topspin.%s.tgz' % version]

    # for help, see eb -a -e Binary
    #install_cmd = "tar xfzp"  ??


    postinstallcmds = [ 'touch TesT.txt', 'mkdir prog/curdir/tin']
    sanity_check_paths = {
    'files': ['topspin', 'cmca', 'pathScript'],
    'dirs': [],
    }

    modextrapaths = {
    'LM_LICENSE_FILE': '/prog/topspin/3.5pl2/license.dat',
    'PATH': '/prog/topspin/3.5pl2',
    }

    modextravars = {
    'TOPSPIN_HOME': '/prog/topspin/3.5pl2',
    }




    and here is the error message:

    > eb topspin/topspin-3.5pl2.eb
    == temporary log file in case of crash
    /var/tmp/adm_hoti1/easybuild/tmp/easybuild-5Jm4k0/easybuild-dgyzcE.log
    == resolving dependencies ...
    == processing EasyBuild easyconfig
    
/admhome/adm_hoti1/svn/easybuild2015a/scicomp_blocks/easybuild/easyconfigs/topspin/topspin-3.5pl2.eb
    == building and installing topspin/3.5pl2...
    == fetching files...
    == creating build dir, resetting environment...
    == unpacking...
    == patching...
    == preparing...
    == configuring...
    == building...
    == testing...
    == installing...
    == taking care of extensions...
    == packaging...
    == postprocessing...
    == sanity checking...
    == FAILED: Installation ended unsuccessfully (build directory:
    /var/tmp/adm_hoti1/easybuild/build/topspin/3.5pl2/dummy-dummy):
    build failed (first 300 chars): EasyBuild crashed with an error
    (at easybuild/framework/easyblock.py:1612 in sanity_check_step):
    Sanity check failed: no file of ('topspin',) in
    /clscratch/adm_hoti1/easybuild/usrProg/topspin/3.5pl2, no file of
    ('cmca',) in
    /clscratch/adm_hoti1/easybuild/usrProg/topspin/3.5pl2, no file of
    ('pathScri
    == Results of the build can be found in the log file
    
/clscratch/adm_hoti1/easybuild/tmp/easybuild-topspin-3.5pl2-20151001.013727.KKUTJ.log
    ERROR: EasyBuild crashed with an error (at easybuild/main.py:112
    in build_and_install_software): Build of
    
/admhome/adm_hoti1/svn/easybuild2015a/scicomp_blocks/easybuild/easyconfigs/topspin/topspin-3.5pl2.eb
    failed (err: "build failed (first 300 chars): EasyBuild crashed
    with an error (at easybuild/framework/easyblock.py:1612 in
    sanity_check_step): Sanity check failed: no file of ('topspin',)
    in /clscratch/adm_hoti1/easybuild/usrProg/topspin/3.5pl2, no file
    of ('cmca',) in
    /clscratch/adm_hoti1/easybuild/usrProg/topspin/3.5pl2, no file of
    ('pathScri")



    EasyBuild placed the files one level too deep:
    > ls -l
    /clscratch/adm_hoti1/easybuild/usrProg/topspin/3.5pl2/3.5pl2/topspin*
    -rwxr-xr-x 1 adm_hoti1 adm_hoti1 10602 Apr 24 01:56
    /clscratch/adm_hoti1/easybuild/usrProg/topspin/3.5pl2/*3.5pl2*/topspin







Reply via email to