Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compiling ohSongcast
16-05-2014, 11:28 AM
Post: #1
Compiling ohSongcast
Hi,

I'm trying to compile ohSongcast, I've tried on both Windows and a raspi.

I want to try using the WavSender to test some issues I have with different file formats in the Songcast Receiver..

When I try to compile I get the same error on both OSs..

Following the instructions in the readme

https://github.com/openhome/ohSongcast

I can compile the ohNet libs, but for the ohNetmon the instructions are to run 'make', but there is no make file so I assume I would need to use waf to build

./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86

But when I run the above command I get the following error.

Quote:root@rpistudy:/home/pi/songcast/ohNetmon# ./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86
Waf: The wscript in '/home/pi/songcast/ohNetmon' is unreadable
Traceback (most recent call last):
File "/home/pi/songcast/ohNetmon/.waf-1.7.0-599981b5a245d5277750be0280e23880/waflib/Scripting.py", line 87, in waf_entry_point
set_main_module(Context.run_dir+os.sep+Context.WSCRIPT_FILE)
File "/home/pi/songcast/ohNetmon/.waf-1.7.0-599981b5a245d5277750be0280e23880/waflib/Scripting.py", line 112, in set_main_module
Context.g_module=Context.load_module(file_path)
File "/home/pi/songcast/ohNetmon/.waf-1.7.0-599981b5a245d5277750be0280e23880/waflib/Context.py", line 273, in load_module
exec(compile(code,path,'exec'),module.__dict__)
File "/home/pi/songcast/ohNetmon/wscript", line 9, in <module>
from filetasks import gather_files, build_tree, find_resource_or_fail
ImportError: No module named filetasks

Which seems to indicate I need filetasks which is part of ohWafHelpers, but where should I place the ohWafHelpers?

Thanks,

Pete.
Find all posts by this user
16-05-2014, 12:46 PM (This post was last modified: 16-05-2014 12:47 PM by simonc.)
Post: #2
RE: Compiling ohSongcast
The build works for me using the following commands:

Code:
git clone https://github.com/openhome/ohNet.git
git clone https://github.com/openhome/ohdevtools.git
git clone https://github.com/openhome/ohNetmon.git
cd ohNet
make all debug=1
cd ../ohNetmon
./go fetch --all --clean --debug
./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86
./waf build

At a guess, are you missing the ./go fetch line? This is responsible for fetching ohWafHelpers. (Our fault for not documenting the build process. I've added a README now.)
Find all posts by this user
16-05-2014, 01:07 PM
Post: #3
RE: Compiling ohSongcast
(16-05-2014 12:46 PM)simonc Wrote:  The build works for me using the following commands:

Code:
git clone https://github.com/openhome/ohNet.git
git clone https://github.com/openhome/ohdevtools.git
git clone https://github.com/openhome/ohNetmon.git
cd ohNet
make all debug=1
cd ../ohNetmon
./go fetch --all --clean --debug
./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86
./waf build

At a guess, are you missing the ./go fetch line? This is responsible for fetching ohWafHelpers. (Our fault for not documenting the build process. I've added a README now.)

Thanks Simon,

I'm like a duck out of water with this...

I was indeed missing the command ./go fetch --all --clean --debug


I have tried the command and found I also need ohdevtools, after downloading ohdevtools I get this error when I run the command:


Code:
root@rpistudy:/home/pi/songcast/ohNetmon# ./go fetch --all --clean --debug
Fetching 'testharness'
  from 'http://core.linn.co.uk/~artifacts/artifacts/testharness/testharness-0.1.23.tar.gz'

**** FAILED reading from http://core.linn.co.uk/~artifacts/artifacts/testharness/testharness-0.1.23.tar.gz ****
Find all posts by this user
16-05-2014, 01:34 PM
Post: #4
RE: Compiling ohSongcast
Sorry Pete, another over-sight on our part. The testharness component is released to a server that isn't publicly available. On the plus side, the component should only be needed to run test code so you could get away without having it.

The easiest thing for you to do for now is to fetch the other dependencies one at a time:
Code:
./go fetch --debug ohNet
./go fetch --debug ohWafHelpers
Find all posts by this user
16-05-2014, 02:42 PM
Post: #5
RE: Compiling ohSongcast
(16-05-2014 01:34 PM)simonc Wrote:  Sorry Pete, another over-sight on our part. The testharness component is released to a server that isn't publicly available. On the plus side, the component should only be needed to run test code so you could get away without having it.

The easiest thing for you to do for now is to fetch the other dependencies one at a time:
Code:
./go fetch --debug ohNet
./go fetch --debug ohWafHelpers

No problem...

I have made further progress, but now when I try the same in ohTopology

After running
./go fetch --debug ohNet
./go fetch --debug ohWafHelpers

using

./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86




I get the following error:


Quote:root@rpistudy:/home/pi/songcast/ohTopology# ./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86
Setting top to : /home/pi/songcast/ohTopology
Setting out to : /home/pi/songcast/ohTopology/build
debugmode: : Debug
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Setting INCLUDES_OHNET to : /home/pi/songcast/ohNet/Build/Include
Specify --ohnet-lib-dir or --ohnet
(complete log in /home/pi/songcast/ohTopology/build/config.log)


Where my ohNet/Build/Include contains a directory cal OpenHome..
Find all posts by this user
16-05-2014, 02:53 PM
Post: #6
RE: Compiling ohSongcast
The same commands work for me. Can you check a couple of things:
  • Does ../ohNet/Build/Include/OpenHome include a number of headers and other directories? If it doesn't, you'll need to build ohNet again.
  • is Linux-x86 the correct --dest-platform? You mentioned earlier that you were working on raspi; this is an ARM device so should either have --dest-platform=Linux-ARM or gcc pointing towards an x86 cross compiler.
Find all posts by this user
16-05-2014, 05:02 PM
Post: #7
RE: Compiling ohSongcast
(16-05-2014 02:53 PM)simonc Wrote:  The same commands work for me. Can you check a couple of things:
  • Does ../ohNet/Build/Include/OpenHome include a number of headers and other directories? If it doesn't, you'll need to build ohNet again.
  • is Linux-x86 the correct --dest-platform? You mentioned earlier that you were working on raspi; this is an ARM device so should either have --dest-platform=Linux-ARM or gcc pointing towards an x86 cross compiler.

Yes the ohNet/Build/Include/OpenHome directory looks normal, it had Buffer.h, Exception.h etc.. and Net and Private directories.

It is the same directory that worked with the ohNetmon build.

Very good point about me using Linux-x86 on a raspi!!

I had to edit the default_platform.py because it always defaulted to Linux-x86

Code:
if platform.system() == 'Linux' and platform.architecture()[0] == '32bit':
        return 'Core-armv6'

But then I got other problems....

So I also tried on windows and Ubuntu 32bit and the ohTopology build always fails with this error:

Quote:root@ubuntu:/home/pete/songcast/ohTopology# ./waf configure --ohnet=../ohNet --debug --dest-platform=Linux-x86
Setting top to : /home/pete/songcast/ohTopology
Setting out to : /home/pete/songcast/ohTopology/build
debugmode: : Debug
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Setting INCLUDES_OHNET to : /home/pete/songcast/ohNet/Build/Include
Specify --ohnet-lib-dir or --ohnet
(complete log in /home/pete/songcast/ohTopology/build/config.log)

Quote:C:\Users\phoyle\Documents\GitHub\ohTopology>waf configure --ohnet=../ohNet --debug --dest-platform=Windows-x86
Setting top to : C:\Users\phoyle\Documents\GitHub\ohTopology
Setting out to : C:\Users\phoyle\Documents\GitHub\ohTopology\build
debugmode: : Debug
Checking for program CL : C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\amd64\CL.exe
Checking for program CL : C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\CL.exe
Checking for program CL : C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\x86_IA64\CL.exe
Checking for program CL : C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\CL.exe
Checking for program CL : c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\x86_amd64\CL.exe
Checking for program CL : c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\CL.exe
Checking for program CL : c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\CL.exe
Checking for program CL : c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\CL.exe
Checking for program LINK : c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\LINK.exe
Checking for program LIB : c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\LIB.exe
Checking for program MT : c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\MT.exe
Checking for program RC : c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\RC.exe
Setting INCLUDES_OHNET to : C:\Users\phoyle\Documents\GitHub\ohNet\Build\Include
Specify --ohnet-lib-dir or --ohnet
(complete log in C:\Users\phoyle\Documents\GitHub\ohTopology\build\config.log)
Find all posts by this user
18-05-2014, 01:36 PM
Post: #8
RE: Compiling ohSongcast
I've just tried building on my home Windows machine. This has no connection to Linn's network. The only tools installed are Python 2.7 and Visual Studio 2010 Express. From a VS command prompt the build completed without error for me using

Code:
git clone https://github.com/openhome/ohNet.git
git clone https://github.com/openhome/ohdevtools.git
git clone https://github.com/openhome/ohNetmon.git
git clone https://github.com/openhome/ohTopologygit
cd ohNet
make all debug=1
cd ..\ohNetmon
go fetch --debug ohNet
go fetch --debug ohWafHelpers
waf configure --ohnet=..\ohNet --debug
waf build
cd ..\ohTopology
go fetch --all --debug
waf configure --ohnet=..\ohNet --debug
waf build

At a guess, could your problem be down to either not having a local debug ohNet or missing dependencies from not trying --all for ohTopology after the problems with ohNetmon.
Find all posts by this user
20-05-2014, 08:58 AM
Post: #9
RE: Compiling ohSongcast
(18-05-2014 01:36 PM)simonc Wrote:  I've just tried building on my home Windows machine. This has no connection to Linn's network. The only tools installed are Python 2.7 and Visual Studio 2010 Express. From a VS command prompt the build completed without error for me using

Code:
git clone https://github.com/openhome/ohNet.git
git clone https://github.com/openhome/ohdevtools.git
git clone https://github.com/openhome/ohNetmon.git
git clone https://github.com/openhome/ohTopologygit
cd ohNet
make all debug=1
cd ..\ohNetmon
go fetch --debug ohNet
go fetch --debug ohWafHelpers
waf configure --ohnet=..\ohNet --debug
waf build
cd ..\ohTopology
go fetch --all --debug
waf configure --ohnet=..\ohNet --debug
waf build

At a guess, could your problem be down to either not having a local debug ohNet or missing dependencies from not trying --all for ohTopology after the problems with ohNetmon.

Hi Simon,

Thanks for taking some time at the weekend to have a look at this..

I have made progress and can compile ohNetMon and ohTopology now, but when I try to compile ohSongcast using 'make' I get the following error:


Code:
Creating library Build\Obj\Windows\Debug\Receiver.lib and object Build\Obj\Windows\Debug\Receiver.exp
        cl /nologo /FoBuild\Obj\Windows\Debug\Songcast.obj -c /MTd /Zi /Od /RTC1 /W4 /WX /EHsc /FRBuild\Obj\Windows\Debug\ -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -D_CRT_SECURE_NO_WARNINGS -I..\ohNet\Bu
ild\Include -I..\ohTopology\build\Include ohSongcast\Songcast.cpp
Songcast.cpp
c:\temp\songcast\ohsongcast\ohsongcast\Songcast.h(8) : fatal error C1083: Cannot open include file: '../../ohNetmon/NetworkMonitor.h': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.

I had a look in '../../ohNetmon/NetworkMonitor.h' and could not find the NetworkMonitor.h, it is in 'ohNetmon\OpenHome', so I edited 'Songcast.h' to be :

#include "../../ohNetmon/OpenHome/NetworkMonitor.h"

But then I got the error:

Code:
cl /nologo /FoBuild\Obj\Windows\Debug\Songcast.obj -c /MTd /Zi /Od /RTC1 /W4 /WX /EHsc /FRBuild\Obj\Windows\Debug\ -DDEFINE_LITTLE_ENDIAN -DDEFINE_TRACE -D_CRT_SECURE_NO_WARNINGS -I..\ohNet\Bu
ild\Include -I..\ohTopology\build\Include ohSongcast\Songcast.cpp
Songcast.cpp
NMAKE : fatal error U1073: don't know how to make '..\ohNetmon\Build\Obj\Windows\Debug\NetworkMonitor.obj'
Stop.

I guess I'm missing something obvious again, but I can't see what it is..

Cheers,

Pete.
Find all posts by this user
20-05-2014, 09:31 AM
Post: #10
RE: Compiling ohSongcast
It looks like the ohSongcast build has rotted. I'll try to have a look at it later today.
Find all posts by this user


Forum Jump: