Problem building on Ubuntu 20.04

Hi there,

I’m thought it would be a good idea to rebuild SuperCollider, but, no. I’m on Ubuntu 20.04 and it was working fine before I had this bad idea.

Compiling seems to be ok, but when I start the IDE, I get the following error :

compiling class library...
	Found 867 primitives.
	Compiling directory '/usr/local/share/SuperCollider/SCClassLibrary'
ERROR: duplicate Class found: 'QuartzComposerView' 
/usr/local/share/SuperCollider/SCClassLibrary/deprecated/3.13/GUI/QQuartzComposerView.sc
/usr/local/share/SuperCollider/SCClassLibrary/Common/GUI/Base/QQuartzComposerView.sc

	Compiling directory '/usr/local/share/SuperCollider/Extensions'
	Compiling directory '/home/simon/.local/share/SuperCollider/Extensions'
ERROR: There is a discrepancy.
numClassDeps 1137   gNumClasses 2272
Library has not been compiled successfully.
Library has not been compiled successfully.

ERROR: There is a discrepancy. is quite fuzzy :slight_smile: . I can’t even tell if it’s related to the line above.

I removed every Quark using Edit > Preferences > Interpreter.

sclang_conf.yaml is “empty”.

I think this might be related to the extensions, which I uninstalled, reinstalled, uninstalled, etc, but I can’t figure out if I should build them before or after SC itself, so I tried both (twice) and it didn’t work. I removed every plugin folder but it didn’t change anything.


Here are the steps I’m trying :

After uninstalling it using sudo make uninstall, and sudo rm -r SuperCollider, here are the steps I’m repeating :

git clone --recurse-submodules https://github.com/SuperCollider/SuperCollider.git
cd SuperCollider/
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j9
sudo make install

So if anyone can see what the problem is, help would be appreciated so I can understand what I’m missing :confused: . Thanks a lot !

EDIT : Got it fixed !

My assumption was that the current git version is broken (at least on my machine).

I first tried to install the latest stable release which you can download here : Releases · supercollider/supercollider · GitHub .

But extracting the tarball and trying to “cmake” it tells me that it didn’t find the submodules. Trying to fetch them using git submodule update --init --recursive leads to an error as the extracted folder isn’t considered as a git folder.

So I rolled back to the stable release commit using these commands (the super long string is the commit ID) :
git clone --recurse-submodules https://github.com/SuperCollider/SuperCollider.git
cd SuperCollider/
git reset --hard 7c4c983cbe98cb470928ac7345c4cf257afd2b55

I then resumed the installation and it worked. I will fill an issue on github asap.

I believe the original problem was due to not uninstalling the old class library before installing the new version of SC. QuartzComposer class was moved to the “deprecated” folder; if one doesn’t remove the previous installation of the class library manually, the class will be present in both old and new locations, leading to the duplicate class problem.

I’m pretty sure this is not an issue with the recent develop version of SuperCollider.

If you want to build official SC release from source, be sure to download the “release tarball” (e.g. SuperCollider-3.12.2-Source.tar.bz2), not the “Source code” zip, which is automatically created by GitHub. One of the reasons we are providing the tarball is exactly because of the submodules - these are included in the release tarball, but not in the “source code” zip.

Marcin is correct about that.

(edit) “sudo make uninstall” is supposed to take care of that – but in case of a class that moved, the new version’s make script may not know about the old file (thus not delete it). Sometimes it’s necessary to sudo rm -rf the class library directory and sudo make install again.

hjh

Thank you very much for those answers ! That’s right, I’m still very confused about building stuff and I didn’t uninstall the current version before rebuilding.

I did use SuperCollider-3.12.2-Source.tar.bz2 tho, but this was leading to the mentioned issue when using git submodule update --init --recursive inside the extracted folder :confused: . I maybe missed something after extracting the tarball.

EDIT : to be more precise, building failed and last error was complaining about missing submodule, and git submodule update --init --recursive was not available, but those problems might be unrelated, i.e. problem is not is not really related to missing submodules, but the extracted tarball is definitely not a git folder.

Sorry for the waste of time.

Thanks for clarifying that you downloaded the correct tarball.
Indeed, that is not a git repository, so you can’t run git submodule update etc, but the submodules are already included…
I wonder what the issue was with that build attempt.

I will take the time to perform some checks, i.e. retrying to build using the tarball, and properly uninstalling before building with the current version, but this will probably have to wait until sunday unfortunately.