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

make install doesn't install sglib in /usr/lib*/python*/site-package #13

Closed
ycollet opened this issue Nov 2, 2021 · 6 comments
Closed

Comments

@ycollet
Copy link

ycollet commented Nov 2, 2021

I build stargate on Fedora 33 64 bits from the release downloaded on github.
make build works fine
make PREFIX=/opt/stargate install doesn't install sglib (and maybe other python libs) into /opt/stargate/lib* (lib64 on 64 bits linux).

@ghost
Copy link

ghost commented Nov 2, 2021

Is /opt/stargate/bin/stargate failing to run because it cannot find Python libraries? BTW, in the source code there is scripts/fedora_deps.sh and scripts/rpm.py to help with building on Fedora.

We don't install to site-packages because Stargate DAW is meant to have an unlimited number of completely self-contained installs on one system, would not want a global copy of the libs getting picked up by the wrong installation. Everything is based on the relative path to $(PREFIX)/bin/stargate

@ycollet
Copy link
Author

ycollet commented Nov 2, 2021

When I do the "make install", I don't see a copy of sglib occuring. So, when I start stargate, I've got:

$ stargate
Adding PYTHONPATH /usr
Did not detect local development environment, trying system installation
Adding PYTHONPATH /usr/lib/stargate/stargate
Traceback (most recent call last):
  File "/usr/bin/stargate", line 122, in main
    start_stargate(args.project_file)
  File "/usr/bin/stargate", line 78, in start_stargate
    app, scaler = _setup()
  File "/usr/bin/stargate", line 57, in _setup
    from sglib.log import LOG, setup_logging
ModuleNotFoundError: No module named 'sglib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/stargate", line 141, in <module>
    main()
  File "/usr/bin/stargate", line 138, in main
    start_stargate(args.project_file)
  File "/usr/bin/stargate", line 78, in start_stargate
    app, scaler = _setup()
  File "/usr/bin/stargate", line 57, in _setup
    from sglib.log import LOG, setup_logging
ModuleNotFoundError: No module named 'sglib'

I put the ""fine tune" spec here:
https://raw.githubusercontent.com/audinux/fedora-spec/master/stargate/stargate.spec

I disabled the automatic install of pymarshal and wavefile because these libraries are now in the audinux repository:
https://copr.fedorainfracloud.org/coprs/ycollet/audinux/

@ghost
Copy link

ghost commented Nov 2, 2021

It looks like I may need to fix something, I will look at this tonight after work.

Did PREFIX=/opt/stargate make install install the copy of /usr/bin/stargate you are running? That command should have installed it to /opt/stargate/bin/stargate. If you symlinked /usr/bin/stargate to /opt/stargate/bin/stargate, that may account for this behavior. It should be possible for me to fix that if so.

@ghost
Copy link

ghost commented Nov 2, 2021

Nice project, BTW. I am a Fedora user myself.

I think this line might be part of the problem:

sed -i -e "s/'lib'/'%{_lib}'/g" sglib/lib/path/linux.py

I think there are probably more places in the code and build scripts that you would need to replace lib with lib64.

Not sure if you already saw this, but you might find this useful for creating a rpmspec:
https://github.com/stargateaudio/stargate/blob/main/scripts/rpm.py#L93

@ycollet
Copy link
Author

ycollet commented Nov 2, 2021

Thanks a lot for this answer.
I found the problem. It was on my side:
sed -i -e "s/cp -r sg_py_vendor/cp -r /g" Makefile
Removed the line managing the installation of the sglib and sgui.
I will close the ticket and open a new one to manage the lib / lib64 library directory.
Sorry for the noise :)

@ycollet
Copy link
Author

ycollet commented Nov 2, 2021

THanks for the link to the rpm.py file :)

@ycollet ycollet closed this as completed Nov 2, 2021
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

No branches or pull requests

1 participant