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

Fixed python prebuild script getting stuck trying to lock a file without permission. #1602

Merged
merged 2 commits into from Feb 24, 2022

Conversation

namark
Copy link
Contributor

@namark namark commented Feb 16, 2022

The build was getting stuck for me with the following output

$ cmake ..                                                                                                                    
-- GLES_OPTION:                                                                                                                                                                       
Using the Python interpreter located at: /usr/bin/python3.8                                                                                                                           
-- The CXX compiler identification is GNU 9.3.0                                            
GCC compiler detected, adding -O3 -fPIC -ggdb flags                                        
-- VIRCADIA_OPTIMIZE: true                                                                                                                                                            
Adding CPU architecture flags: -march=native -mtune=native                                 
-- VIRCADIA_CPU_ARCHITECTURE: -march=native -mtune=native                                  
 -O3 -fPIC -ggdb -march=native -mtune=native                                               
['/home/namark/dev/vircadia/prebuild.py', '--release-type', 'DEV', '--build-root', '/home/namark/dev/vircadia/build']
Using Qt from /opt/qt515                                                                                                                                                              
Qt5 check passed, found /opt/qt515/lib/cmake/Qt5                                           
Found pre-built Qt5                                                                        
cmake path: /opt/qt515/lib/cmake                                                                                                                                                      
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds                                                                                                                                          
Couldn't aquire lock, retrying in 10 seconds                                                                                                                                          
Couldn't aquire lock, retrying in 10 seconds                                                                                                                                          
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds                                                                                                                                          
Couldn't aquire lock, retrying in 10 seconds                                                                                                                                          
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds                                               
Couldn't aquire lock, retrying in 10 seconds
.
.
.

since it had no write permissions to the custom Qt directory I specified using VIRCADIA_QT_PATH environment variable. I guess it makes sense to assume write access if the script installed Qt from pre-built package itself, but in case of user specified path it's not a safe assumption. This PR fixes the problem by detecting the permission error and trying to lock a file in the current directory instead. It's unclear what the purpose of these locks is, but in general there is no point in retrying after a permission error, as it's not something that can change without user intervention.

@namark namark changed the title Foxed python prebuild script getting stuck trying to lock a file without permission. Fixed python prebuild script getting stuck trying to lock a file without permission. Feb 17, 2022
@digisomni digisomni added linux This is related to Linux. needs CR (code review) labels Feb 17, 2022
@digisomni digisomni added this to In progress in 2022.1.1 Selene Release via automation Feb 17, 2022
@digisomni digisomni added this to the 2022.1.1 Selene Release milestone Feb 17, 2022
2022.1.1 Selene Release automation moved this from In progress to Reviewer approved Feb 17, 2022
@digisomni digisomni added CR Approved At least one code reviewer has approved the PR. CMake needs testing (QA) The PR is ready for testing and removed linux This is related to Linux. labels Feb 17, 2022
@digisomni
Copy link
Member

Once tested on Windows/Linux in a local environment it should be good to merge.

Copy link
Member

@digisomni digisomni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake works on Windows.

@digisomni digisomni added QA Approved The PR has been tested successfully. and removed needs testing (QA) The PR is ready for testing labels Feb 22, 2022
@daleglass daleglass merged commit 0827de1 into vircadia:master Feb 24, 2022
2022.1.1 Selene Release automation moved this from Reviewer approved to Done Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CR Approved At least one code reviewer has approved the PR. QA Approved The PR has been tested successfully.
Development

Successfully merging this pull request may close these issues.

None yet

4 participants