Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS]: Build Failure in Buildspec tutorial for zlib #1518

Open
2 tasks done
Mendi03 opened this issue Jul 5, 2023 · 4 comments
Open
2 tasks done

[DOCS]: Build Failure in Buildspec tutorial for zlib #1518

Mendi03 opened this issue Jul 5, 2023 · 4 comments
Labels
documentation documentation fix

Comments

@Mendi03
Copy link
Collaborator

Mendi03 commented Jul 5, 2023

Documentation Link

https://buildtest.readthedocs.io/en/devel/buildspecs/spack.html#install-specs

Issue Description

There is a build failure when using the command buildtest build -b /home/spack/buildtest/examples/spack/install_specs.yml .

The error occurs when writing the errorfile.

Screenshot 2023-07-05 at 11 29 15 AM

The error can be reproduced by doing the Tutorials setup and running the buildtest build -b /home/spack/buildtest/examples/spack/install_specs.yml command found in the Install specs documentation.

Post question in Slack

  • I agree that I posted my question in slack before creating this issue

Is there an existing issue

  • I confirm there is no existing issue for this issue
@Mendi03 Mendi03 added the documentation documentation fix label Jul 5, 2023
@shahzebsiddiqui
Copy link
Member

@Mendi03 i just tried to reproduce this error but i didnt get the issue

setup

I ran the following

(buildtest)  ~/Documents/github/buildtest/ [devel] docker run -it -v $BUILDTEST_ROOT:/home/spack/buildtest ghcr.io/buildtesters/buildtest_spack:latest /bin/bash --login
==> Regenerating tcl module files
==> Regenerating tcl module files
spack@e68dab3cc5b0:~$ source scripts/spack_container/setup.sh^C
spack@e68dab3cc5b0:~$ cd buildtest/
spack@e68dab3cc5b0:~/buildtest$ source scripts/spack_container/setup.sh

Result

This was me running the build it is the first example

(buildtest) spack@e68dab3cc5b0:~/buildtest$ buildtest build -b /home/spack/buildtest/examples/spack/install_specs.yml
╭─────────────────────────────────────────────────── buildtest summary ───────────────────────────────────────────────────╮                                                                                                             
│                                                                                                                         │                                                                                                             
│ User:               spack                                                                                               │                                                                                                             
│ Hostname:           e68dab3cc5b0                                                                                        │                                                                                                             
│ Platform:           Linux                                                                                               │                                                                                                             
│ Current Time:       2023/07/06 21:12:40                                                                                 │                                                                                                             
│ buildtest path:     /home/spack/buildtest/bin/buildtest                                                                 │                                                                                                             
│ buildtest version:  1.4                                                                                                 │                                                                                                             
│ python path:        /home/spack/pyenv/buildtest/bin/python3                                                             │                                                                                                             
│ python version:     3.8.6                                                                                               │                                                                                                             
│ Configuration File: /home/spack/buildtest/buildtest/settings/spack_container.yml                                        │                                                                                                             
│ Test Directory:     /home/spack/runs                                                                                    │                                                                                                             
│ Report File:        /home/spack/buildtest/var/report.json                                                               │                                                                                                             
│ Command:            /home/spack/buildtest/bin/buildtest build -b /home/spack/buildtest/examples/spack/install_specs.yml │                                                                                                             
│                                                                                                                         │                                                                                                             
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                                                                             
───────────────────────────────────────────────────────────────────────────────────────────────────────  Discovering Buildspecs ────────────────────────────────────────────────────────────────────────────────────────────────────────
                  Discovered buildspecs                   
╔════════════════════════════════════════════════════════╗
║ buildspec                                              ║
╟────────────────────────────────────────────────────────╢
║ /home/spack/buildtest/examples/spack/install_specs.yml ║
╚════════════════════════════════════════════════════════╝


Total Discovered Buildspecs:  1
Total Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
────────────────────────────────────────────────────────────────────────────────────────────────────────── Parsing Buildspecs ──────────────────────────────────────────────────────────────────────────────────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/spack/buildtest/examples/spack/install_specs.yml: VALID
Total builder objects created: 2
                                                                                         Builders by type=spack                                                                                          
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ builder                               ┃ type  ┃ executor           ┃ compiler ┃ nodes ┃ procs ┃ description                                  ┃ buildspecs                                             ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ install_specs_example/bc295f80        │ spack │ generic.local.bash │ None     │ None  │ None  │ Install zlib from an existing spack instance │ /home/spack/buildtest/examples/spack/install_specs.yml │
├───────────────────────────────────────┼───────┼────────────────────┼──────────┼───────┼───────┼──────────────────────────────────────────────┼────────────────────────────────────────────────────────┤
│ clone_spack_and_install_zlib/83dafd1b │ spack │ generic.local.bash │ None     │ None  │ None  │ Clone spack and install zlib spec            │ /home/spack/buildtest/examples/spack/install_specs.yml │
└───────────────────────────────────────┴───────┴────────────────────┴──────────┴───────┴───────┴──────────────────────────────────────────────┴────────────────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────────────────────────────────────────────────── Building Test ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
install_specs_example/bc295f80: Creating test directory: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80
install_specs_example/bc295f80: Creating the stage directory: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/stage
install_specs_example/bc295f80: Writing build script: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example_build.sh
clone_spack_and_install_zlib/83dafd1b: Creating test directory: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b
clone_spack_and_install_zlib/83dafd1b: Creating the stage directory: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/stage
clone_spack_and_install_zlib/83dafd1b: Writing build script: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib_build.sh
──────────────────────────────────────────────────────────────────────────────────────────────────────────── Running Tests ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
Spawning 4 processes for processing builders
───────────────────────────────────────────────────────────────────────────────────────────────────────────── Iteration 1 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────
install_specs_example/bc295f80 does not have any dependencies adding test to queue
clone_spack_and_install_zlib/83dafd1b does not have any dependencies adding test to queue
In this iteration we are going to run the following tests: [install_specs_example/bc295f80, clone_spack_and_install_zlib/83dafd1b]
install_specs_example/bc295f80: Current Working Directory : /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/stage
clone_spack_and_install_zlib/83dafd1b: Current Working Directory : /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/stage
install_specs_example/bc295f80: Running Test via command: bash --norc --noprofile -eo pipefail install_specs_example_build.sh
clone_spack_and_install_zlib/83dafd1b: Running Test via command: bash --norc --noprofile -eo pipefail clone_spack_and_install_zlib_build.sh
install_specs_example/bc295f80: Test completed in 1.824464 seconds
install_specs_example/bc295f80: Test completed with returncode: 0
install_specs_example/bc295f80: Writing output file -  /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.out
install_specs_example/bc295f80: Writing error file - /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.err
clone_spack_and_install_zlib/83dafd1b: Test completed in 80.153967 seconds
clone_spack_and_install_zlib/83dafd1b: Test completed with returncode: 0
clone_spack_and_install_zlib/83dafd1b: Writing output file -  /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.out
clone_spack_and_install_zlib/83dafd1b: Writing error file - /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.err
                                                             Test Summary                                                             
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ builder                               ┃ executor           ┃ status ┃ checks (ReturnCode, Regex, Runtime) ┃ returncode ┃ runtime   ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ clone_spack_and_install_zlib/83dafd1b │ generic.local.bash │ PASS   │ None None None                      │ 0          │ 80.153967 │
├───────────────────────────────────────┼────────────────────┼────────┼─────────────────────────────────────┼────────────┼───────────┤
│ install_specs_example/bc295f80        │ generic.local.bash │ PASS   │ None None None                      │ 0          │ 1.824464  │
└───────────────────────────────────────┴────────────────────┴────────┴─────────────────────────────────────┴────────────┴───────────┘



Passed Tests: 2/2 Percentage: 100.000%
Failed Tests: 0/2 Percentage: 0.000%


Adding 2 test results to /home/spack/buildtest/var/report.json
Writing Logfile to: /home/spack/buildtest/var/logs/buildtest_7s1qaf30.log

Now looking at the output i see the following and it looks correct. Can you try again with devel branch

(buildtest) spack@e68dab3cc5b0:~/buildtest$ buildtest inspect query -o --testpath install_specs_example clone_spack_and_install_zlib
────────────────────────────────────────────────────────────────────────────────── clone_spack_and_install_zlib/83dafd1b-d2b9-40b5-b93e-f6475ca409b0 ───────────────────────────────────────────────────────────────────────────────────
Executor: generic.local.bash
Description: Clone spack and install zlib spec
State: PASS
Returncode: 0
Runtime: 80.153967 sec
Starttime: 2023/07/06 21:12:40
Endtime: 2023/07/06 21:14:01
Command: bash --norc --noprofile -eo pipefail clone_spack_and_install_zlib_build.sh
Test Script: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.sh
Build Script: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib_build.sh
Output File: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.out
Error File: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.err
Log File: /home/spack/buildtest/var/logs/buildtest_7s1qaf30.log
──────────────────────────────────────────────── Output File: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.out ─────────────────────────────────────────────────
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.4/build_cache/linux-centos7-x86_64-gcc-10.2.1-patchelf-0.16.1-p72zyan5wrzuabtmzq7isa5mzyh6ahdp.spec.json                                                               
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.4/build_cache/linux-centos7-x86_64/gcc-10.2.1/patchelf-0.16.1/linux-centos7-x86_64-gcc-10.2.1-patchelf-0.16.1-p72zyan5wrzuabtmzq7isa5mzyh6ahdp.spack                   
==> Installing "patchelf@=0.16.1%gcc@=10.2.1 ldflags="-static-libstdc++ -static-libgcc"  build_system=autotools arch=linux-centos7-x86_64" from a buildcache                                                                            
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.4/build_cache/linux-centos7-x86_64-gcc-10.2.1-clingo-bootstrap-spack-ba5ijauisd3uuixtmactc36vps7yfsrl.spec.json                                                        
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.4/build_cache/linux-centos7-x86_64/gcc-10.2.1/clingo-bootstrap-spack/linux-centos7-x86_64-gcc-10.2.1-clingo-bootstrap-spack-ba5ijauisd3uuixtmactc36vps7yfsrl.spack     
==> Installing "clingo-bootstrap@=spack%gcc@=10.2.1~docs~ipo+python+static_libstdcpp build_type=Release arch=linux-centos7-x86_64" from a buildcache                                                                                    
==> Installing zlib-1.2.13-b7berb6pqs4pthvimly3skelvbs54pq4                                                                                                                                                                             
==> No binary for zlib-1.2.13-b7berb6pqs4pthvimly3skelvbs54pq4 found: installing from source                                                                                                                                            
==> Fetching https://mirror.spack.io/_source-cache/archive/b3/b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30.tar.gz                                                                                                   
==> No patches needed for zlib                                                                                                                                                                                                          
==> zlib: Executing phase: 'edit'                                                                                                                                                                                                       
==> zlib: Executing phase: 'build'                                                                                                                                                                                                      
==> zlib: Executing phase: 'install'                                                                                                                                                                                                    
==> zlib: Successfully installed zlib-1.2.13-b7berb6pqs4pthvimly3skelvbs54pq4                                                                                                                                                           
  Stage: 0.27s.  Edit: 0.60s.  Build: 1.49s.  Install: 0.28s.  Post-install: 0.04s.  Total: 2.77s                                                                                                                                       
[+] /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/stage/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.13-b7berb6pqs4pthvimly3skelvbs54pq4                                       
                                                                                                                                                                                                                                        
────────────────────────────────────────────────── Test File: /home/spack/runs/generic.local.bash/install_specs/clone_spack_and_install_zlib/83dafd1b/clone_spack_and_install_zlib.sh ──────────────────────────────────────────────────
#!/bin/bash                                                                                                                                                                                                                             
git clone https://github.com/spack/spack                                                                                                                                                                                                
source ./spack/share/spack/setup-env.sh                                                                                                                                                                                                 
spack install  zlib                                                                                                                                                                                                                     
────────────────────────────────────────────────────────────────────────────────────── install_specs_example/bc295f80-48f0-43fa-b8a9-720cffe18bcc ──────────────────────────────────────────────────────────────────────────────────────
Executor: generic.local.bash
Description: Install zlib from an existing spack instance
State: PASS
Returncode: 0
Runtime: 1.824464 sec
Starttime: 2023/07/06 21:12:40
Endtime: 2023/07/06 21:12:42
Command: bash --norc --noprofile -eo pipefail install_specs_example_build.sh
Test Script: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.sh
Build Script: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example_build.sh
Output File: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.out
Error File: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.err
Log File: /home/spack/buildtest/var/logs/buildtest_7s1qaf30.log
─────────────────────────────────────────────────────── Output File: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.out ────────────────────────────────────────────────────────
[+] /home/spack/spack-workspace/software/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.11-smoyzzo2qhzpn6mg6rd3l2p7b23enshg                                                                                                                
                                                                                                                                                                                                                                        
───────────────────────────────────────────────────────── Test File: /home/spack/runs/generic.local.bash/install_specs/install_specs_example/bc295f80/install_specs_example.sh ─────────────────────────────────────────────────────────
#!/bin/bash                                                                                                                                                                                                                             
source /home/spack/spack/share/spack/setup-env.sh                                                                                                                                                                                       
spack install  zlib                                                    

@shahzebsiddiqui
Copy link
Member

Please let me know if you are able to reproduce the same behavior as i have shown or you still face error. If issue is not present then ill close this issue

@Mendi03
Copy link
Collaborator Author

Mendi03 commented Jul 7, 2023

I reproduced it and still had the same error. Maybe someone else can confirm if there is an issue.

@shahzebsiddiqui
Copy link
Member

yes you are right i believe the error was with this test which you had mentioned in your PR and i think we need to fix this either remove the test all together and put it somewhere else

clone_spack_and_install_zlib:
type: spack
executor: generic.local.bash
description: "Clone spack and install zlib spec"
tags: [spack]
spack:
install:
specs: ['zlib']

The whole point of the second test was to highlight how root is used in spack schema see https://buildtest.readthedocs.io/en/devel/buildspecs/spack.html#install-specs. We would need to rewrite the docs for this.

I think what we can do is use pre_cmds to clone spack into a location with a desired branch to run test see https://buildtest.readthedocs.io/en/devel/buildspecs/spack.html#pre-and-post-commands

Ill take care of this but thanks for bringing this up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation fix
Projects
None yet
Development

No branches or pull requests

2 participants