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

Ubuntu 20.04 LTS installation #3

Closed
diiigle opened this issue Nov 6, 2020 · 7 comments
Closed

Ubuntu 20.04 LTS installation #3

diiigle opened this issue Nov 6, 2020 · 7 comments

Comments

@diiigle
Copy link

diiigle commented Nov 6, 2020

Pardon my french, but I spend 9+ hours trying to get this running/building.

Windows problems

After trying to run prebuild binaries for windows on two machines without success I reverted back to building Mosaic myself.

Failure on machine 1 Windows 8.1 It starts and runs until I load any of the example patches/networks.
Failure on machine 2 Windows 10 It starts and I can see the main screen for half a second and then it crashes. WinDbg didn't provide any useful failure information. Last loaded dll was libcms.

Cloning problems

I tried installing in a fresh Ubuntu Desktop 20.04 (minimal installation) VM and needed the following additional packages to install:

  • build-essential
  • make
  • libcairo2-dev
  • MOSAICVERSION="$( curl https://raw.githubusercontent.com/d3cod3/Mosaic/master/bin/data/release.txt )" requires curl, which is only installed later

and it still kept failing.

I manually triggered /opt/openFrameworks/scripts/linux/ubuntu/install_dependencies.sh and that did the trick for the dependencies.

Building problems

ofxPdExternals made some issues with

/opt/openFrameworks/addons/ofxPdExternals/libs/cyclone/cyclone_lib.c:525:17: error: conflicting types for ‘obj_findsignalscalar’
  525 | EXTERN t_float *obj_findsignalscalar(t_object *x, int m);
      |                 ^~~~~~~~~~~~~~~~~~~~
In file included from /opt/openFrameworks/addons/ofxPdExternals/libs/cyclone/cyclone_lib.c:23:
/opt/openFrameworks/addons/ofxPd/libs/libpd/pure-data/src/m_imp.h:88:17: note: previous declaration of ‘obj_findsignalscalar’ was here
   88 | EXTERN t_float *obj_findsignalscalar(const t_object *x, int m);
      |                 ^~~~~~~~~~~~~~~~~~~~

mkdir $INSTALLFOLDER/$OFFOLDERNAME/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64
Should be mkdir -p

Feedback

Overall my feedback is: The installation process is far from developer friendly. Please consider providing Docker images, using git submodules for all dependencies (references exact commits) and potentially a more flexible build system like CMake+ninja (Make -j always messes stuff up and you end up building single-core for ages). Also running your installer script as sudo / root will create all the files as root user. 🤦

Somebody started this already:
https://github.com/ofnode/of

I know you inherited all of that from openFrameworks, but that is just not up to date. Feels like developing software 10 years ago. I can also recommend setting up a build/CI system which (as a side-effect) serves as a secondary resource for people that want to reproduce a building environment.

@CobbieCobbie
Copy link

Definitely feel your pain, pretty much the same issue here (Debian). dont see any reason for sudo / root privileges

@d3cod3
Copy link
Owner

d3cod3 commented Nov 7, 2020

Hi, first of all, thanks @diiigle for all your time and all the info & suggestions, it's really appreciated!

Now, about the supposedly problematic sudo / root privileges, if you check the installer script code, at the end it will restore all the privileges to the current user on all the installed files:

# 10 - Change the ownership of the entire openFrameworks folder to local user
cd $INSTALLFOLDER
chown $LOCALUSERNAME:$LOCALUSERNAME -R $OFFOLDERNAME/

As you commented, this is all inherited from openFrameworks, so the sudo / root it's needed for running OF scripts, this is what it is right now.

And before changing subject, to answer at @CobbieCobbie , this is not twitter, this is an open source project on github, people write here to collaborate in some way, as @diiigle did, with his constructive critique and important information, so please avoid useless commentaries, if you don't see any reason for the issue is because you didn't look properly.

Coming back to the important stuff, i agree with all the @diiigle feedback, we are working on gettin Mosaic running with flatpak, and Docker images will come soon too. I'll take a look at the CMake+ninja option too, thanks for the link.

I completely agree with the feeling of developing software 10 years ago, we are considering options to remove openFrameworks from the equation, to drastically simplify all compile related stuff.

About the compiler script errors, the curl error is easy to solve, but can you post some more info about the other errors? Anyway, i'll add in the readme a list of linux system tested, because, for example, i didn't test specifically ubuntu 20.04 LTS.

Thanks again for your feedback!

@diiigle
Copy link
Author

diiigle commented Nov 7, 2020

Unfortunately I don't have any recollection about the specifics any more. There was just too many. Probably also some of them were followup problems from the building not finishing properly in the first place.

And thats the reason that chmod does not help. If the installer crashes somewhere along the way, there is no proper 'cleanup'.

I might wait another six months then, till things stabilize a bit. That experience was not very motivating.

@d3cod3
Copy link
Owner

d3cod3 commented Nov 7, 2020

Ok, no problem.

and yes, maybe it's better for you to wait some more time, as all this is still in beta, developed/maintained by one person plus some help and worked at on free time, so it's not strange to have a lot of issues at this stage.

@d3cod3 d3cod3 closed this as completed Nov 7, 2020
@Daandelange
Copy link
Collaborator

Daandelange commented Nov 9, 2020

Hello, sorry to re-open+close this. Indeed, heritages from OF give Mosaic an old-school feeling.
Like d3cod3 says, I hope this will get easier with time.

I've just verified a fresh install on Mint 20, which is based on Ubuntu 20.
I didn't run the Mosaic Installer, but reproduced it. Here's steps for a manual install, for the reference. (not developer friendly).

  • I installed of11 release, followed OF install guide running install_dependencies.sh and the codecs.
  • I cloned Mosaic with submodules: cd OF/apps/ && mkdir mosaicApps && cd mosaicApps && git clone https://github.com/d3cod3/Mosaic.git && git submodule init && git submodule update
  • Update ofxAddonTool : cd Mosaic/scripts/ofxAddonTool && git checkout master && git pull
  • Ran ofxAddonTool : ./ofxAddonTool.sh --install
  • Install hooks from Mosaic Installer:
    • apt install git curl ffmpeg wget libpython3.8-dev libsnappy-dev libswresample-dev libavcodec-dev libavformat-dev libdispatch-dev
    • Python : ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/python-3.8.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python3.pc
    • NDI : sudo cp OF/addons/ofxNDI/libs/libndi/lib/x86_64-linux-gnu/libndi.so.3.7.1 /usr/lib && ln -s /usr/lib/libndi.so.3.7.1 /usr/lib/libndi.so.3
    • Fftw : git clone --branch=master https://github.com/d3cod3/fftw3.3.2-source && cd fftw3.3.2-source && ./configure --prefix=pwd --enable-float --enable-sse2 --with-incoming-stack-boundary=2 --with-our-malloc16 --disable-shared --enable-static && make MAKEINFO=true -j3 && mkdir OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64 && cd .libs && cp libfftw3f.a OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/ && cd ../../ && rm -rf fftw3.3.2-source
  • make -j3 Release fails because the generated linker command is too huge. This is probably because of long directory paths on my setup.
  • Compile Mosaic.qbs with qt-creator works fine.

@d3cod3
Copy link
Owner

d3cod3 commented Nov 13, 2020

Thanks @Daandelange for the clarification and the detailed manual compile instructions, i'll add it to the README!

@Daandelange
Copy link
Collaborator

Beware that I did not install in /opt as the installer script does.
I didn't even think about putting it in the readme! :) Indeed a manual+auto install option semi-fixes the root problem by giving a less "blind sudo" installation choice. Also, I'll try the makefile patch your posted and report back.

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

4 participants