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

Linux general compile issues #29

Closed
d3cod3 opened this issue Apr 8, 2020 · 18 comments
Closed

Linux general compile issues #29

d3cod3 opened this issue Apr 8, 2020 · 18 comments

Comments

@d3cod3
Copy link
Owner

d3cod3 commented Apr 8, 2020

No description provided.

@alcomposer
Copy link

https://github.com/d3cod3/ofxPython uses pkg-config python which does not exist on Arch Linux systems. python2 does.

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 4, 2020

Thanks @alcomposer

i didn't have an install file for Arch Linux, as you can see here: https://gist.github.com/d3cod3

If you can kindly give me some more info about your OF install, we can try to write a specific script for Arch.

Maybe we can start from the debian one as base?

@alcomposer
Copy link

Here is the output of make Release -j10 (I truncated just the python errors- as after that cairo.h gets flagged- which I think is only due to the missing python)

Compiling OF library for Release
make[1]: Entering directory '/opt/openFrameworks/libs/openFrameworksCompiled/project'
Done!
make[1]: Leaving directory '/opt/openFrameworks/libs/openFrameworksCompiled/project'


Compiling Mosaic for Release
make[1]: Entering directory '/opt/openFrameworks/apps/myApps/Mosaic'
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found
Compiling /opt/openFrameworks/apps/myApps/Mosaic/src/SplashScreen.cpp
Package python was not found in the pkg-config search path.
Perhaps you should add the directory containing `python.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python', required by 'virtual:world', not found

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 4, 2020

Ok, that is probably related with this part of the install script:

if [ ! -e /usr/lib/x86_64-linux-gnu/pkgconfig/python.pc ]; then
    ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/python-2.7.pc /usr/lib/x86_64-linux-gnu/pkgconfig/python.pc
fi

That works on some of the other linux i've tested (ubuntu, debian and mint)

While in fedora the path is another one:

if [ ! -e /usr/lib64/pkgconfig/python.pc ]; then
    ln -s /usr/lib64/pkgconfig/python-2.7.pc /usr/lib64/pkgconfig/python.pc
fi

We need to check in Arch which is the correct path and the pre-existing .pc file name, maybe python2.pc?

so the solution could be:

ln -s /ARCH_PKG_CONFIG_PATH/python2.pc /ARCH_PKG_CONFIG_PATH/python.pc

Then restore the pkg-config python in ofxPython addon

@alcomposer
Copy link

Which install script? I'm just manually installing the add-ons & myApp Mosaic.

Then after cd into Mosaic and make Release.

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 4, 2020

Take a look here: https://gist.github.com/d3cod3/fbb76735554c3b38e811414d96fc28d6

before make, there are some things to do!

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 4, 2020

Some info and patches here about compiling of 0.10 on Arch Linux:

https://aur.archlinux.org/packages/openframeworks/

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 4, 2020

Ok, i'm writing a specific install script for Arch Linux, i'm testing it on a virtual machine, specifically on vagrant archlinux/archlinux box: https://app.vagrantup.com/archlinux/boxes/archlinux

I'm having the most strange issue with the ofxImGui addon, that returns an error for using std::stack telling me that stack in namespace std does not name a template type???

I have zero experience with arch linux, did you know something about this error?

@alcomposer
Copy link

alcomposer commented Jun 4, 2020

Hm, yeah- I added in an #include <stack> to quiet the issue, but I think that may not be the right way to go about fixing it.

And, usedNames in ofxImGui errors out after that as well. :-(

Considering that Arch is a rolling release it could be caused by a newer version of Cmake or other build stack software.

I have installed openFrameworks from the AUR, and the examples build correctly.

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 4, 2020

Ok, in order to build Mosaic, first we need to make all the addons dependencies compile first, i have installed openFrameworks from here:

https://openframeworks.cc/versions/v0.11.0/of_v0.11.0_linux64gcc6_release.tar.gz

i had to apply a couple of patches:

https://aur.archlinux.org/cgit/aur.git/tree/make_4.3_error_fix.patch?h=openframeworks

https://aur.archlinux.org/cgit/aur.git/tree/openal_fix.patch?h=openframeworks

and then OF compiled and the examples too

But here we are dealing with a lot of external addons, and it seems that something is going on with ofxImGui, so one step at the time, we need to solve this first.

The #include <stack.h> probably is not the right way, and the errors about usedNames could be the demonstration of it, the var usedNames is right there:

struct WindowOpen
	{
		std::stack<std::vector<std::string>> usedNames;
		std::shared_ptr<ofParameter<bool>> parameter;
		bool value;
	};

is a std::stack var and yet the compiler is not seeing it.

I've made a fast search on the web about arch linux gcc compiler and this issue and i didn't find anything, let me know if you find something.

In my arch virtual machine gcc -- version is returning:

gcc 10.1.0

maybe we need to downgrade gcc to something between 7 and 9?

in ubuntu 18.04 with gcc 7.5.0 and ubuntu 20.04 with gcc 9.3.0 is compiling without problems.

I'll try tomorrow to install a lower gcc on arch and re-compile with it

@alcomposer
Copy link

alcomposer commented Jun 5, 2020

Ok I have it working without installing older libs:

  1. link python-2.7.pc to python.pc
  2. add #include <stack> in Helpers.h
  3. ofxAudioAnalyzer needs https://github.com/d3cod3/fftw3.3.2-source build with:
    make MAKEINFO=true as for some reason the documentation wasn't building.
  4. NDI needs to be linked

arch_mosaic

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 5, 2020

Amazing! thank you for the info, i'll test it on the virtual machine and publish today an install script for Arch Linux!

@d3cod3
Copy link
Owner Author

d3cod3 commented Jun 5, 2020

Arch linux auto install script:

https://gist.github.com/d3cod3/46fb10b028d7210f54a6d408f7d5ad84

@sphaero
Copy link

sphaero commented Nov 12, 2020

On Debian Bullseye using the Mosaic-Installer script:

Compiling Mosaic for Release
make[1]: Entering directory '/opt/openFrameworks/apps/d3cod3/Mosaic'
/opt/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk:210: *** missing separator.  Stop.
make[1]: Leaving directory '/opt/openFrameworks/apps/d3cod3/Mosaic'
make: *** [/opt/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

From what I recall with OF is that this is caused by some addon. Bit tricky to find which one.

@d3cod3
Copy link
Owner Author

d3cod3 commented Nov 12, 2020

HI, that must be related to this:

https://aur.archlinux.org/cgit/aur.git/plain/make_4.3_error_fix.patch?h=openframeworks

it is a patch for arch linux, already included in Mosaic installer, but activating only on arch right now!

I'll check it with debian 11 and will modify the installer script, thanks for the info!

@anpin
Copy link

anpin commented Nov 12, 2020

I was able to install Release version using the script on Ubuntu 20.04, but neither audio, nor video worked reliably. Sound crashes almost instantly after I start connecting some signals if I use default pulsaudio driver and there is no option in UI to select other out. If I set any block with a video it just crashes. I'd like to contribute but it is been quite a while since I've done any c++ and of, so I'm not sure how that will go, but I was thinking to try to revamp the sound settings part and make it work with sound on linux and windows in the near future.

@d3cod3
Copy link
Owner Author

d3cod3 commented Nov 13, 2020

Hi @anpin
thanks for the contribute offer, it will be really appreciated, there's still a lot to work to do with Mosaic, and any help can be useful.

At the stage we are right now, just debugging and find bugs will be super helpful, depending on the OS, different situations happens ( hardware, drivers, codecs, memory management, etc.. ) and what happens on one distro doesn't happen on another one, so yes, just debugging and find specific OS related bugs will be amazing!

@Daandelange is working on integrating Tracy Profiler #33 , but in the meantime it would be just fine to use gdb, just compile Mosaic debug:

cd /opt/openframeworks/apps/d3cod3/Mosaic
make -j4 Debug

and run it with gdb:

cd bin/
gdb Mosaic_debug

And if you feel to contribute to the code, we can open a specific issue related and working together on that, i will explain the current code about the specific issue and we'll start from that!

Thanks again for your interest!

@d3cod3
Copy link
Owner Author

d3cod3 commented Dec 18, 2020

Mosaic is now available in flathub!!! thanks to soma95

https://flathub.org/apps/details/org.d3cod3.Mosaic

So for average linux users without technical background about compiling, code and terminal commands, this install method is highly recommended.

@d3cod3 d3cod3 closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants