Author Topic: Working Build Process?  (Read 3486 times)

MediaEngineer

  • Douchebag
  • Newbie
  • *
  • Posts: 14
    • View Profile
Working Build Process?
« on: September 03, 2008, 03:32:55 am »
Hi, I've played around with installs of LinuxMCE since 0704, and I'm trying to get a development environment set up to debug and develop starting with the latest, stablest LinuxMCE source base. I read the Developer FAQ, which wound up basically pointing at the wiki article Building From Source. I tried using those instructions, but it doesn't seem to fully work, as building some modules fails to compile without aborting errors.

I tried adding to the instructions in "Building From Source" a couple extra details from the related wiki article Setting Up A Development Environment that seemed to be necessary. And a couple details in "Building From Source" seemed wrong (like copying existing libs to trunk/src/ , when there is no "trunk" directory in lmce/, just charon-merge (which seemed to make sense from the Developer FAQ discussion, as it evolved).

So what I eventually tried was;

1. Install a 0710-rc2 from the DVD-DL as Hybrid on a P4/2.5GHz with 512MB/250GB. Seems to work well, though VoIP doesn't work with "Dial Direct" on the embedded app to my existing (tested OK) BroadVoice account. And of course there are bugs, but the system seemed to install completely. I left it running, turned off the firewall, used ssh to connect as user linuxmce .

2.
Code: [Select]
cd /usr/src
sudo mkdir lmce
sudo chown linuxmce lmce
cd lmce

3.
Code: [Select]
sudo apt-get install subversion ccache
4.
Code: [Select]
svn co http://svn.linuxmce.org/pluto/branches/charon-merge
5. The wiki said:
Code: [Select]
cp /usr/pluto/lib/* trunk/src/lib    but there was no trunk/ in /usr/src/lmce/ . There was of course the /usr/src/charon-merge/ that I'd just checked out into that directory, so instead I did:
Code: [Select]
cp /usr/pluto/lib/* charon-merge/src/lib
6. The wiki said:
Code: [Select]
cd trunk
./configure
    but of course instead I did:
Code: [Select]
cd charon-merge
./configure

7. The wiki said:
Quote
For the svn.linuxmce.com source there is no configure script yet. Run these to prepare bootstrapping (ONLY FOR THE SVN.LINUXMCE.COM source, NOT the charonmedia):
    But of course I'd just run ./configure , so there is of course a configure script. I tried this whole process (deleting the /usr/src/* tree before repeating) both with and without this step:
Code: [Select]
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_defines->/-DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I\/opt\/libxine1-pluto\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include\/SD/' -i '{}' \;
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_libs->/-L\/opt\/libxine1-pluto\/lib -L\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/lib/' -i '{}' \;

8. I then ran make from the /usr/src/lmce/ CWD.

OK, after a while the build completed, with a lot of warnings but no errors. So it looked good.

But I tried to rebuild a single module to test the development environment, and that failed. It computed a bunch of dependencies for a lot of .cpp files in that dir, executed a g++ line with some warnings, but then on the next g++ invocation it reported an error along with a lot of warnings, then failed and quit, without generating any object files except Main.o (and no .so):
Code: [Select]
cd /usr/src/lmce/src/Media_Plugin/
touch Media_Plugin.cpp
make so

Quote
linuxmce@dcerouter:/usr/src/lmce/charon-merge/src/Media_Plugin$ make so
Computing dependencies for MediaHandlerBase.cpp done
Computing dependencies for Generic_NonPluto_Media.cpp done
Computing dependencies for BoundRemote.cpp done
Computing dependencies for MediaStream.cpp done
Computing dependencies for MediaAttributes_LowLevel.cpp done
Computing dependencies for MediaAttributes.cpp done
Computing dependencies for MediaHandlerInfo.cpp done
Computing dependencies for MediaListGrid.cpp done
Computing dependencies for Media_Plugin_Grids.cpp done
Computing dependencies for ../Gen_Devices/Media_PluginBase.cpp done
Computing dependencies for Media_Plugin.cpp done
Computing dependencies for Main.cpp done
g++ -c -I.. -I../DCE -DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I/opt/libxine1-pluto/include -I/opt/linphone-1.3.5/include -I/usr/include/mysql  -Wall -fPIC -ggdb3 -fmessage-length=0 Main.cpp -o Main.o
../DCE/DeviceData_Base.h: In member function ‘bool DCE::DeviceData_Base::WithinCategory(long int, DCE::DeviceCategory*)’:
../DCE/DeviceData_Base.h:397: warning: comparison between signed and unsigned integer expressions
MediaListGrid.h: At global scope:
MediaListGrid.h:143: warning: ‘bool FileBrowserInfoComparerLastViewed(FileBrowserInfo*, FileBrowserInfo*)’ defined but not used
MediaListGrid.h:148: warning: ‘bool FileBrowserInfoComparerTrack(FileBrowserInfo*, FileBrowserInfo*)’ defined but not used
g++ -c -I.. -I../DCE -DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I/opt/libxine1-pluto/include -I/opt/linphone-1.3.5/include -I/usr/include/mysql  -Wall -fPIC -ggdb3 -fmessage-length=0 Media_Plugin.cpp -o Media_Plugin.o
../DCE/DeviceData_Base.h: In member function ‘bool DCE::DeviceData_Base::WithinCategory(long int, DCE::DeviceCategory*)’:
../DCE/DeviceData_Base.h:397: warning: comparison between signed and unsigned integer expressions
Media_Plugin.cpp: In member function ‘virtual bool DCE::Media_Plugin::Register()’:
Media_Plugin.cpp:713: error: ‘DATAGRID_Tracks_on_Disc_CONST’ was not declared in this scope
Media_Plugin.cpp: In member function ‘bool DCE::Media_Plugin::MediaInserted(DCE::Socket*, DCE::Message*, DCE::DeviceData_Base*, DCE::DeviceData_Base*)’:
Media_Plugin.cpp:841: warning: comparison between signed and unsigned integer expressions

(about a dozen more different warnings, ending with:)

MediaListGrid.h:148: warning: ‘bool FileBrowserInfoComparerTrack(FileBrowserInfo*, FileBrowserInfo*)’ defined but not used
make: *** [Media_Plugin.o] Error 1

I tried checking out the charon-merge tree yesterday, 20080901, and again today, 20080902, and the build failed the same way with both snapshots. I tried skipping step #7, the "extra" configuration commands via "find/exec", and I tried skipping running /usr/src/lmce/charon-merge/configure but running the "find/exec" commands instead, and I tried skipping both ./configure and the find/exec commands. Instead of running "make so", I tried "make bin", "make all" and just "make" (running "make clean" between each attempted make). Each variation on each of the two days' snapshots failed in the same way trying to build that directory.

It looks like the build procedure has evolved during the posting of the Developer FAQ and the wiki articles. Is there a variation on those instructions that works, or is there a totally different procedure now? Thanks for the help getting started.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Working Build Process?
« Reply #1 on: September 13, 2008, 09:33:32 pm »
sorry for the confusion, things have been moving around a lot in the past.
The wiki pages will be updated today or tomorrow.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Working Build Process?
« Reply #2 on: September 13, 2008, 09:36:51 pm »
btw, you can also join #linuxmce on freenet (or use the chat button). I'm sure one of the devs will help you with the compile.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation