News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Building New Media Player Device - Bizarre Compile Snafu

Started by tschak909, November 25, 2007, 05:52:19 AM

Previous topic - Next topic

tschak909

After filling in the appropriate data in the web admin area, and running DCEGen to generate an appropriate set of files, I did a dependency make, and did a make bin, and got back the following spewage from GCC, I haven't injected any code into it yet... it should compile as is, right?

-Thom



dcerouter_41349:/home/src/lmce/src/MAME_Player# make bin
g++ -c -I.. -I../DCE -I/usr/include/mysql   -Wall -fPIC -ggdb3  Main.cpp -o Main.o
../Gen_Devices/MAME_PlayerBase.h: In constructor 'DCE::MAME_Player_Event::MAME_Player_Event(int, std::string, bool)':
../Gen_Devices/MAME_PlayerBase.h:35: error: 'DEVICETEMPLATE_MAME_Player_CONST' was not declared in this scope
../Gen_Devices/MAME_PlayerBase.h: In member function 'virtual int DCE::MAME_Player_Data::GetPK_DeviceList()':
../Gen_Devices/MAME_PlayerBase.h:72: error: 'DEVICETEMPLATE_MAME_Player_CONST' was not declared in this scope
../Gen_Devices/MAME_PlayerBase.h: In member function 'virtual bool DCE::MAME_Player_Command::GetConfig()':
../Gen_Devices/MAME_PlayerBase.h:167: error: 'DEVICETEMPLATE_MAME_Player_CONST' was not declared in this scope
../Gen_Devices/MAME_PlayerBase.h: In member function 'virtual int DCE::MAME_Player_Command::PK_DeviceTemplate_get()':
../Gen_Devices/MAME_PlayerBase.h:181: error: 'DEVICETEMPLATE_MAME_Player_CONST' was not declared in this scope
../Gen_Devices/MAME_PlayerBase.h: In static member function 'static int DCE::MAME_Player_Command::PK_DeviceTemplate_get_static()':
../Gen_Devices/MAME_PlayerBase.h:182: error: 'DEVICETEMPLATE_MAME_Player_CONST' was not declared in this scope
make: *** [Main.o] Error 1


Zaerc

"Change is inevitable. Progress is optional."
-- Anonymous

[url=http://petition.stopsoftwarepatents.eu/181001941347/][/url]

tschak909

nope, it looks like a constant isn't being defined somewhere.. :-/

-Thom

Zaerc

If you could describe your steps so far (as in what to specify in the web-admin) then I can see if I get the same thing and maybe snoop around a bit.
"Change is inevitable. Progress is optional."
-- Anonymous

[url=http://petition.stopsoftwarepatents.eu/181001941347/][/url]

bulek

Hi,

maybe won't help much and do unrelated discussion, but some time ago when I compiled and contributed few things to Pluto ...

if you for instance try to add support for new event, someone from main developers has to add your new event to codebase and your event needed to be present in source code headers file in form of constant definition (quite similar to the constant definition you're missing). So under older system, you couldn't contribute if someone didn't help you in main source codebase (or you could do it if you had local copy of whole build system and did all your changes by yourself)...

Your problem seems quite similar to me. You probably added new template, but that template is not present in main database, so headers are still not properly generated...

Maybe you can try to search source code base for DEVICETEMPLATE_ keywords and you'll better see which do exists and where your should appear....

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

PeteK

Have you run sql2cpp?  It looks like you created a new template.  sql2cpp re-generates the header files to include any new declarations required based on your changes to templates, commands, etc.

You can also modify the header files manually in /src/pluto_main.  I would grep for DEVICETEMPLATE_ in that directory.

tschak909


tschak909

n/m i got it...

however, i seem to be noticing a pattern here,

anything i am building with this checkout from svn is resulting in segfaults.... I built DCEGen from this checkout, and I get a segfault after the copyright/help messages

and when I run the ./MAME_Player device, I get...



dcerouter_41349:/home/src/lmce/src/MAME_Player# ./MAME_Player
MAME_Player, v.<=version=>
Visit www.plutohome.com for source code and license information

Segmentation fault (core dumped)
dcerouter_41349:/home/src/lmce/src/MAME_Player#



tschak909

and now... i added my device to the orbiter as child, and i get this from the log.. it looks like it's segfaulting out of the gate....


========== NEW LOG SECTION ==========
1       11/25/07 13:46:03       81 (spawning-device)    Starting... 7
1       11/25/07 13:46:03       81 (spawning-device)    Found ./MAME_Player
Return code: 139
3       11/25/07 13:46:03       81 (spawning-device)    Device died... count=7/50 dev=81
Sun Nov 25 13:46:03 EST 2007 died



??? ??? ??? :'(

-Thom

PeteK

I'm actually trying to track down a similar problem right now.

When I execute my Insteon executable myself and pass it the -d [devicenumber] parameter, everything is hunky dory.  However, when I reload the router, it does not run the device correctly, and I'm not sure what the problem is.  Here is my log entry:


========== NEW LOG SECTION ==========
1 11/25/07 12:41:47 63 (spawning-device) Starting... 2
1 11/25/07 12:41:47 63 (spawning-device) Found ./Insteon
Return code: 126
3 11/25/07 12:41:47 63 (spawning-device) Device died... count=2/50 dev=63
Sun Nov 25 12:41:47 PST 2007 died
========== NEW LOG SECTION ==========



I realize that it's a different code than yours, but I wanted to let you know I'm seeing something similar, though I don't think it's Segfaulting, at least it seems to work fine when I run it by hand.

tschak909

an exit code of 126 indicates that the program can't be executed. It probably means it needs to be copied to /usr/pluto/bin and its permissions checked.

My exit code of 139, however...indicates segfault... AIIIIGGGHHHHHHHH!!!!!!

-Thom

PeteK


hari

Quote from: tschak909 on November 25, 2007, 08:01:09 PM
anything i am building with this checkout from svn is resulting in segfaults....
had the same thing with sqlCVS..

hari
rock your home - [url="http://www.agocontrol.com"]http://www.agocontrol.com[/url] home automation

tschak909


hari

don't mix libraries and you should get no segfaults. Tested with sqlCVS.

regards,
Hari
rock your home - [url="http://www.agocontrol.com"]http://www.agocontrol.com[/url] home automation