xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
542 stars 200 forks source link

Trouble building from master on Linut Mint 17.3 #579

Closed m00dawg closed 8 years ago

m00dawg commented 8 years ago

I'm having trouble building from the master branch on Linux Mint 17.3 due to what appears to be an issue with libav vs ffmpeg. Previous versions built (I think I was in the 4.0 branch at the time). I am trying to switch up libav for a PPA-based ffmpeg but am having a bit of trouble with that. So thought I would check to see if that was just maybe a platform or Makefile issue?

tim@lindawg ~/git/xLights $ make if test "wx-config --release" != "3.1"; \ then if test ! -d wxWidgets-3.1.0; \ then wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2; \ tar xvfj wxWidgets-3.1.0.tar.bz2; \ fi; \ cd wxWidgets-3.1.0;\ CXXFLAGS="-std=gnu++14" ./configure --enable-mediactrl --enable-graphics_ctx --enable-monolithic --disable-shared --disable-gtktest --disable-sdltest; \ make ;\ fi make[1]: Entering directory /nfs/home/tim/git/xLights/xLights' g++ -fno-strict-aliasing -Wno-unused-local-typedefs -DwxUSE_UNICODE -std=gnu++11 -O2 -std=gnu++14 -Wallwx-config --version=3.1 --cflags`pkg-config --cflags gstreamer-1.0 gstreamer-video-1.0 pkg-config --cflags libavformat libavcodec libavutil libswresample libswscale -Winvalid-pch -DWX_PRECOMP -DLINUX -DNDEBUG -D__cdecl='' -Wno-reorder -Wno-sign-compare -Wno-unused-variable -Wno-switch -Wno-unused-but-set-variable -Wno-parentheses -Wno-return-type -Wno-uninitialized -Wno-unused-value -Wno-sequence-point -Wno-comment -Wno-unused-function -Iinclude -Isequencer -I../xLights -Ieffects -Ieffects/ -Imodels -Ieffects/assist -I../include -Imodels/ -c models/SingleLineModel.cpp -o .objs_lr/models/SingleLineModel.o Package libswresample was not found in the pkg-config search path. Perhaps you should add the directory containing libswresample.pc' to the PKG_CONFIG_PATH environment variable No package 'libswresample' found g++: error: unrecognized command line option ‘-std=gnu++14’ make[1]: *** [.objs_lr/models/SingleLineModel.o] Error 1 make[1]: Leaving directory/nfs/home/tim/git/xLights/xLights' make: *\ [xLights] Error 2

dkulp commented 8 years ago

Your version of GCC is too old and doesn't support the gnu++14 (or stdc++14) standard. You likely need to upgrade the gcc version (or possibly select the newer version if you can have multiple versions installed)

AzGilrock commented 8 years ago

In addition to that I noticed the build command has "-std=gnu++11 -O2 -std=gnu++14". I didn't think both should be there I thought the 11 should just have been changed to a 14.

dkulp commented 8 years ago

I'm not sure we can do anything about that... that's coming from the wxWidgets build system.

m00dawg commented 8 years ago

Hmm I'm using GCC 4.8 it would appear:

tim@lindawg ~/git/xLights $ gcc --version | head -n1 gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

Do I need to be newer than that? Also, I noticed that the makefile in the main xLights directory tried to build wxWidgets but failed. I was able to just cd into the wxWidgets directory and do a ./configure && make without any issue (using a config.cache so I assume it was the same settings)?

That said, it looked to me like libswresample was coming from an xLights build error? From what I understand, libav is mostly (but not fully) compatible with ffmpeg so that's my best guess as to what may be going on here but it's been a long time since I looked at Makefiles and C++ code :)

cjd commented 8 years ago

There are two failures here The first is saying that libwsresample is not installed. On some distros that is brought in automatically with the other libac* stuff I'm guessing that linux mint is based off Ubuntu 14.04 - which has a much older version of the libav* stuff than newer ones - but xlights now uses some of the newer features so won't compile with the stuff from ubuntu 14.04 You would need to backport the current libav stuff to get past that.

The second failure is that your version of gcc is too old to support the c++14 features (which are used in a few of the files so can not be skipped) The only way to fix that is to update your gcc version. Check out http://nutcracker123.com/forum/index.php?topic=2706.msg16750#msg16750 for how one person got things running a while ago - not sure it that will still work though. The best way is to update to 15.04 or later (or the mint equivalent) - that way you get the newer gcc and libav stuff built in

m00dawg commented 8 years ago

Ah yeah thanks for that! Looks like I was getting down the right path as I ended up doing something very similar and after pulling again from master was able to get things compiled in (and fortunately it already fixed some bugs I was running into). So yay!

Considering this not a bug and just me not being smart. Sorry for the false bug report but thanks very much for the help!