Author Topic: Compiling xLights on linux  (Read 2553 times)

Offline Materdaddy

  • Jr. Member
  • **
  • Posts: 6
Compiling xLights on linux
« on: December 15, 2012, »
I'm trying to get xLights up and running and cannot compile it.

I have the source code and in the top level directory there's a file "ToolConfig.txt" that says the install should be as easy as installing libwxgtk2.8-dev and running the "makeall.sh" script.

I have libwxgtk2.8-dev, yet this is what I get when attempting to run the makeall.sh script:

Code: You are not allowed to view links. Register or Login
test -d ../bin || mkdir -p ../bin
test -d .objs || mkdir -p .objs
g++  .objs/E131Dialog.o .objs/LorMapDialog.o .objs/MainMenuApp.o .objs/MainMenuMain.o .objs/NetworkDialog.o .objs/SerialPortWithRate.o  -s `wx-config --libs std`  -o ../bin/xMenu
test -d ../bin || mkdir -p ../bin
test -d .objs || mkdir -p .objs
g++ -DwxUSE_UNICODE -O2 -Wall `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DWX_PRECOMP  -c xScheduleMain.cpp -o .objs/xScheduleMain.o
In file included from xScheduleMain.h:62,
                 from xScheduleMain.cpp:24:
PlayerFrame.h:16: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
PlayerFrame.h:16: error: expected ‘;’ before ‘*’ token
In file included from xScheduleMain.cpp:44:
../include/minibasic.cpp: In member function ‘int MiniBasicClass::exitfor(char*)’:
../include/minibasic.cpp:2346: warning: suggest parentheses around assignment used as truth value
xScheduleMain.cpp: In member function ‘int xlbasic::do_serialwrite()’:
xScheduleMain.cpp:168: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp: In member function ‘char* xlbasic::do_serialread()’:
xScheduleMain.cpp:192: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp: In member function ‘void xScheduleFrame::EndScript(const char*)’:
xScheduleMain.cpp:786: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp: In member function ‘void xScheduleFrame::OnTimer(wxTimerEvent&)’:
xScheduleMain.cpp:1244: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1244: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1247: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1251: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1251: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1262: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp:1344: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1344: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1348: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1352: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1352: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1353: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp:1357: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1361: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1361: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1369: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1415: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1415: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1416: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1424: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1424: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1432: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1447: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:1447: error: ‘wxMEDIASTATE_PLAYING’ was not declared in this scope
xScheduleMain.cpp:1448: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp: In member function ‘void xScheduleFrame::ShowPlayerSingle()’:
xScheduleMain.cpp:2024: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:2024: error: ‘wxMEDIACTRLPLAYERCONTROLS_DEFAULT’ was not declared in this scope
xScheduleMain.cpp: In member function ‘void xScheduleFrame::Play(wxString&, long int)’:
xScheduleMain.cpp:2043: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp: In member function ‘void xScheduleFrame::PlayLorFile(wxString&)’:
xScheduleMain.cpp:2080: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp: In member function ‘void xScheduleFrame::LoadLorChannels(wxXmlNode*)’:
xScheduleMain.cpp:2143: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp:2149: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp: In member function ‘void xScheduleFrame::PlayXlightsFile(wxString&)’:
xScheduleMain.cpp:2224: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp: In member function ‘void xScheduleFrame::PlayVixenFile(wxString&)’:
xScheduleMain.cpp:2290: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp: In member function ‘wxString xScheduleFrame::VixenInfo()’:
xScheduleMain.cpp:2569: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp: In member function ‘void xScheduleFrame::OnButtonInfoClick()’:
xScheduleMain.cpp:2616: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp:2624: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp:2632: warning: comparison between signed and unsigned integer expressions
xScheduleMain.cpp: In member function ‘void xScheduleFrame::build_decoding_table()’:
xScheduleMain.cpp:2947: warning: array subscript has type ‘char’
xScheduleMain.cpp: In member function ‘void xScheduleFrame::RunPlaylist(int, wxString&)’:
xScheduleMain.cpp:2985: error: ‘class PlayerFrame’ has no member named ‘MediaCtrl’
xScheduleMain.cpp:2985: error: ‘wxMEDIACTRLPLAYERCONTROLS_NONE’ was not declared in this scope
make: *** [.objs/xScheduleMain.o] Error 1
(build output clipped due to too many characters for a post)

I remember getting these errors eons ago when I first heard of xLights.  At that time I even took time to start looking at this "Code::Blocks" ide, but I remember having issues with it and not wanting all the package bloat associated with it.

It looks to me as if wxMediaCtrl isn't a proper type.  I would guess that it is supposed to be defined in "wx/mediactrl.h" which is included and I see no "failed to find header file" errors.  Unfortunately since I've never done any wxWidgets programming, I can only make a few guesses based on the gcc error message and the PlayerFrame.h header file.

Any ideas?

Also, what is the "version2" directory?  I found the "makeall.sh" script under "trunk/version1", which there is no mention of in the text file.  There doesn't appear to be a makefile or script in the version2 directory, so is that only available if using the IDE?

Offline frankr

  • Sr. Member
  • ****
  • Posts: 347
    • Rocklin Lights
Compiling xLights on linux
« Reply #1 on: December 15, 2012, »
I have not compiled on linuxbut I know that with the most recent versions Matt switched to wxWidgets2.9.3. You may want to try installing that and trying again.

Frank

Offline dowdybrown

  • Moderator
  • Sr. Member
  • *****
  • Posts: 358
    • Gleannloch Christmas
Re: Compiling xLights on linux
« Reply #2 on: December 17, 2012, »
version 2 is the latest version. I have not tested it on Linux yet. Also have not created the makefile and shell script for version 2 yet. I will get to it soon.

Matt
Matt Brown
You are not allowed to view links. Register or Login

Offline Materdaddy

  • Jr. Member
  • **
  • Posts: 6
Re: Compiling xLights on linux
« Reply #3 on: December 17, 2012, »
So would it help if I tried getting the version2 directory to build?  Can you give a brief overview of the files/use/etc.  The big thing I'm wondering is if the trunk/version1 directory is used at all with the move to trunk/version2, or is everything contained in the files within trunk/version2.

As I said before, I have never run xLights or done any wx programming, but I am somewhat familiar with GNU Make and familiar with linux development in general.  If I get it working I could create a patch you can commit to the repo if you think it would help.

Offline Materdaddy

  • Jr. Member
  • **
  • Posts: 6
Re: Compiling xLights on linux
« Reply #4 on: December 19, 2012, »
You are not allowed to view links. Register or Login
I have not compiled on linuxbut I know that with the most recent versions Matt switched to wxWidgets2.9.3. You may want to try installing that and trying again.

Frank

Thanks for the tip Frank.

After updating wxgtk/wxbase to 2.9 versions I found in some repositories as well as installing Code::Blocks I was able to get the build working.  I had to do a few things making sure I had the 2.9 version not 2.8 as well as change a couple minor things in the project like "wx-config" options for the linker and extra build options.

I'm hoping to learn more about wx and how it should be configured and whip up some form of build environment for linux systems.

The other thing I noticed is that wx_pch.h isn't in the version2 directory, but the one from version1/xMenu copied over worked.  It might be the same wx_pch.h as the other ones in version1 and also appears to be the same as the one in the template directories that is installed with wxwidgets.

Offline dowdybrown

  • Moderator
  • Sr. Member
  • *****
  • Posts: 358
    • Gleannloch Christmas
Re: Compiling xLights on linux
« Reply #5 on: December 22, 2012, »
Quote
The other thing I noticed is that wx_pch.h isn't in the version2 directory, but the one from version1/xMenu copied over worked.  It might be the same wx_pch.h as the other ones in version1 and also appears to be the same as the one in the template directories that is installed with wxwidgets.

I found this too. It will be fixed in my next commit to svn.

Matt
Matt Brown
You are not allowed to view links. Register or Login

Offline Materdaddy

  • Jr. Member
  • **
  • Posts: 6
Re: Compiling xLights on linux
« Reply #6 on: February 08, 2013, »
After I spent about an hour getting a Makefile built that successfully built the project, I noticed that in your most recent commits you tested/built on Ubuntu.  Your auto-generated makefile works fine for me in Debian as well.

It does appear the text effect is broken.  I'm not sure if this is a linux build compatibility thing or known bug, but thought I'd mention it since I was posting.

Offline digdeepfundraising

  • Jr. Member
  • **
  • Posts: 3
    • https://www.youtube.com/user/dan75buck?feature=mhee
Re: Compiling xLights on linux
« Reply #7 on: March 05, 2013, »
hi all

im using xlights-nutcracker 3.0 for the first time and all is running sweet im using a e682 and got it doing everything i ask it too ....apart from text ??? the text comes out back to front is this something im doing wrong

well done matt and sean for making my first pixel experiences easier 

also sometimes all my strings flicker but i shut down and re start my e682 and all is fine

thanks

Dan
You are not allowed to view links. Register or Login