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

2541 nightly build artifact doesnt start on mac #2544

Merged
merged 12 commits into from
Jul 6, 2023

Conversation

wpotrzebowski
Copy link
Contributor

@wpotrzebowski wpotrzebowski commented Jul 5, 2023

Description

Fixing OSX build from the main branch. It is pyside2 that is problematic and therefore it was removed from requirements (keeping only PySide6).
It also updates the version of Python and the installer. These were probably not required, but it will be a useful update if it works on all platforms.

Fixes # (issue/issues)
#2541

How Has This Been Tested?

Installer downloaded and tested.

Review Checklist (please remove items if they don't apply):

  • Code has been reviewed
  • Functionality has been tested
  • Windows installer (GH artifact) has been tested (installed and worked)
  • MacOSX installer (GH artifact) has been tested (installed and worked)
  • The introduced changes comply with SasView license (BSD 3-Clause)

Wojciech Potrzebowski added 8 commits July 5, 2023 07:44
Naively checking if installer works with 3.9
PySide2 is no longer required. PySide6 should be enough
@wpotrzebowski wpotrzebowski linked an issue Jul 5, 2023 that may be closed by this pull request
@wpotrzebowski wpotrzebowski requested a review from rozyczko July 5, 2023 10:39
@wpotrzebowski
Copy link
Contributor Author

@rozyczko if you can please check if Windows installer works that would be great.

Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

This build seems to run OK on Windows (quick, cursory test).
However, I would be careful with piling in two unrelated changes into this bugfix.
The bugfix itself consists of removal of pyside2 from requirements.txt and replacing pyside2 with pyside6 in pytest.ini. Also, adding the missing GL linux library.

But, unlocking the pyinstaller version and especially bumping Python from 3.8 to 3.9 should be probably done in separate, appropriately named branches and tested well first, I think.

Wojciech Potrzebowski added 4 commits July 5, 2023 21:07
@wpotrzebowski
Copy link
Contributor Author

@rozyczko good suggestion! I've modified this PR, so it only addresses the original issue. Can you take a quick look at the installer again (after the latest changes)?

It would be also good if someone also tests ubuntu installer. @ehewins will you be able to do it?

@rozyczko
Copy link
Member

rozyczko commented Jul 6, 2023

Yes, this works on Windows.

@ehewins
Copy link
Contributor

ehewins commented Jul 6, 2023

I can confirm that building and running SasView from this PR works perfectly on Linux/Ubuntu, but there is a problem with the .tar.gz archive packaged in the nightly-build release.
It's conventional to include an "INSTALL" or a "README" file with instructions on how to install the package (or a script to automate the process), but the archive only contains the sasview binary itself and all the dependencies. The sasview binary won't run unless the dependencies are installed properly somewhere, and at the moment the user has to work out for themselves how to do this in a way which doesn't cause any conflicts with their other programs.

@llimeht
Copy link
Contributor

llimeht commented Jul 6, 2023

It's conventional to include an "INSTALL" or a "README" file with instructions on how to install the package (or a script to automate the process), but the archive only contains the sasview binary itself and all the dependencies. The sasview binary won't run unless the dependencies are installed properly somewhere, and at the moment the user has to work out for themselves how to do this in a way which doesn't cause any conflicts with their other programs.

Some sort of README would be good to explain what happens next in all of the downloads. For the Ubuntu tarball, there's not actually anything that is required — in particular, the user does not have to figure out how to install it or deal with conflicts between these packages and system packages. There's a chance some extra X-related system packages need to be installed, as is done in the rather cursory CI test of the installer.

As a starting point, this is what is needed:

$ tar xf sasview5.tar.gz
$ ./sasview/sasview

Running it with an absolute path from any location also works:

$ mkdir ~/software
$ tar x -C ~/software -f sasview5.tar.gz 
$ /home/stuart/software/sasview/sasview

@wpotrzebowski
Copy link
Contributor Author

@ehewins thanks for testing. I will merge it now as it is critical for Mac users. It would be good to get documentation for ubuntu in place.

@wpotrzebowski wpotrzebowski merged commit 9f5eab2 into main Jul 6, 2023
@wpotrzebowski wpotrzebowski deleted the 2541-nightly-build-artifact-doesnt-start-on-mac branch July 6, 2023 20:05
@ehewins
Copy link
Contributor

ehewins commented Jul 7, 2023

Some sort of README would be good to explain what happens next in all of the downloads. For the Ubuntu tarball, there's not actually anything that is required — in particular, the user does not have to figure out how to install it or deal with conflicts between these packages and system packages. There's a chance some extra X-related system packages need to be installed, as is done in the rather cursory CI test of the installer.

As a starting point, this is what is needed:

$ tar xf sasview5.tar.gz
$ ./sasview/sasview

Running it with an absolute path from any location also works:

$ mkdir ~/software
$ tar x -C ~/software -f sasview5.tar.gz 
$ /home/stuart/software/sasview/sasview

Thanks for clarifying @llimeht . The sasview binary returns several "Failed to load module" errors when I run it in an Ubuntu VM, but the process goes off without a hitch when I try running it on my main Arch system. Perhaps it's an issue specific to my VM setup.

@llimeht
Copy link
Contributor

llimeht commented Jul 14, 2023

Thanks for clarifying @llimeht . The sasview binary returns several "Failed to load module" errors when I run it in an Ubuntu VM, but the process goes off without a hitch when I try running it on my main Arch system. Perhaps it's an issue specific to my VM setup.

It might be that some additional X-related libraries need to be installed for Qt to work, given recent Ubuntu defaults to Wayland (I think).

CI does the following to run the package:

 sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils xvfb

xvfb would not be necessary; there's also a chance that some of the others aren't needed either, but won't do any harm.

Steps like that aren't needed on older Debian/Ubuntu machines as those were packages that would already be installed… but if these are now required, then we should definitely document this in a README as you suggest!

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

Successfully merging this pull request may close these issues.

Nightly Build artifact doesn't start on Mac
4 participants