• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 58
xbmc minified as a server?
#16
I'm in the middle of moving my Ubuntu file server off of an ancient P4 Dell onto a min-ITX C2D setup. I'll be following this thread to see what progress is made. Sounds like this would be just right for a centralized setup with multiple clients.
Reply
#17
(2012-06-25, 20:38)excyle Wrote: I'm trying to compile the cpp but keep getting stuck.
Code:
git clone git://github.com/xbmc/xbmc.git
cd xbmc
wget http://pastebin.com/download.php?i=WpEvRTws -O xbmcvideolibraryscan.cpp
g++ xbmcvideolibraryscan.cpp -Ixbmc/ -Ilib/ -o xbmcvideolibraryscan
should normally do the trick right ?

I'm getting a lot of this kind of errors
Code:
ISO C++ forbids declaration of âsomethingâ with no type

It also seems to compile the windows version somehow because i see Iphlpapi.h being included from NetworkWin32.h

Can somebody confirm a working version of this for Windows?
Reply
#18
I'm curious on how to compile this as well. I'm getting stuck at Iphlpapi.h missing which is being called from NetworkWin32.h. This is being compiled against head on ubuntu.

Cheers
Reply
#19
The shared library won't work on Windows... Sorry...

To compile the example...

a) Setup your build environment and compile libxbmc.so. ie.
Code:
./bootstrap && ./configure --enable-shared-lib && make

b) Compile xbmcVideoLibraryScan.cpp - This step is a bit of a kludge but it works...
Code:
i) Copy xbmcVideoLibraryScan.cpp to the top level directory of the xbmc code...
ii) Edit xbmc/Makefile and add SRCS+=..\xbmcVideoLibraryScan.cpp at the bottom
ii) Run make
iii) Edit xbmc/Makefile and remove SRCS line from ii) above
iv) Delete libxbmc.so & xbmc.a and run make again

c) Create the binary. ie.
Code:
gcc -o xbmcVideoLibraryScan xbmcVideoLibraryScan.o -lxbmc -lstdc++
Reply
#20
(2012-07-07, 12:53)vicbitter Wrote: The shared library won't work on Windows... Sorry...
Will it eventually work on Windows? Or will it be Linux only?
Reply
#21
(2012-07-07, 15:17)Basje Wrote:
(2012-07-07, 12:53)vicbitter Wrote: The shared library won't work on Windows... Sorry...
Will it eventually work on Windows? Or will it be Linux only?

Not sure... A question for the XBMC devs...
Reply
#22
Thanks for all the help vicbitter. I've followed your instructions but when trying your command
Code:
gcc -o xbmcvideolibraryscan.cpp xbmcvideolibraryscan.o -lxbmc -lstdc++

I get the following:
Code:
/usr/bin/ld: cannot find -lxbmc
collect2: ld returned 1 exit status

I then figured that maybe the -lxbmc should be -Ixbmc but then get the following:
Code:
xbmcvideolibraryscan.cpp:54: undefined reference to `XBMC::Context::Context()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:60: undefined reference to `CLog::SetLogLevel(int)'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:62: undefined reference to `CLog::Log(int, char const*, ...)'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:64: undefined reference to `g_infoManager'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:64: undefined reference to `CGUIInfoManager::GetVersion()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:78: undefined reference to `CAdvancedSettings::Initialize()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:81: undefined reference to `CAdvancedSettings::Initialize()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:83: undefined reference to `g_application'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:83: undefined reference to `CApplication::Create()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:136: undefined reference to `XBMC::Context::~Context()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:88: undefined reference to `CApplication::Initialize()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:95: undefined reference to `CApplication::StartVideoScan(CStdStr<char> const&, bool)'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:98: undefined reference to `CApplication::IsVideoScanning() const'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:131: undefined reference to `CXBApplicationEx::Destroy()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:135: undefined reference to `CLog::Log(int, char const*, ...)'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:129: undefined reference to `CApplication::getApplicationMessenger()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:129: undefined reference to `CApplicationMessenger::Quit()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:105: undefined reference to `CApplication::Process()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:123: undefined reference to `Sleep(unsigned int)'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:136: undefined reference to `XBMC::Context::~Context()'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:112: undefined reference to `CLog::Log(int, char const*, ...)'
/mnt/Misc/Downloads/xbmc-frodo/xbmcvideolibraryscan.cpp:117: undefined reference to `CLog::Log(int, char const*, ...)'
xbmcvideolibraryscan.o: In function `xbmcutil::GlobalsSingleton<CCharsetConverter>::getInstance()':
/mnt/Misc/Downloads/xbmc-frodo/xbmc/utils/GlobalsHandling.h:160: undefined reference to `CCharsetConverter::CCharsetConverter()'
xbmcvideolibraryscan.o: In function `RecursiveMutex':
/mnt/Misc/Downloads/xbmc-frodo/xbmc/threads/platform/pthreads/CriticalSection.h:46: undefined reference to `XbmcThreads::pthreads::RecursiveMutex::getRecursiveAttr()'
xbmcvideolibraryscan.o: In function `xbmcutil::GlobalsSingleton<CAdvancedSettings>::getInstance()':
/mnt/Misc/Downloads/xbmc-frodo/xbmc/utils/GlobalsHandling.h:160: undefined reference to `CAdvancedSettings::CAdvancedSettings()'
collect2: ld returned 1 exit status
Reply
#23
-L<path to libxbmc.so>
Reply
#24
Thanks Davilla but using the -L and setting an absolute path such /mnt/Misc/Downloads/xbmc-frodo I still get the same bunch of errors regarding undefined references. I'm not quite certain where I've gone wrong..

I get the exact same errors if I exclude the -Lxbmc altogether so I assume it somehow can't find or can't read libxbmc.so.

xbmcvideolibraryscan.o is in the root folder along with libxbmc.so however if I use -lxbmc it states:
Code:
/usr/bin/ld: cannot find -lxbmc
collect2: ld returned 1 exit status

Confused
Reply
#25
might want to be using g++ instead of gcc

Reply
#26
You could also try copying libxbmc.so to your /lib or /lib64 directory and run ldconfig to update your shared library cache...
Reply
#27
Hah, wow.. Now we're closer (thanks guys!) but am now met with the following after compile:
Code:
XBMC Media Center 12.0-ALPHA4 Git:20120705-60b0903
Copyright (C) 2005-2011 Team XBMC - http://www.xbmc.org

Starting Video Library Scan

sh: 1: /mnt/Misc/Downloads/xbmc-frodo/xbmc-xrandr: not found
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM
............................

Finished Video Library Scan...
Segmentation fault (core dumped)
Reply
#28
You'll need to configure .xbmc/userdata xml configuration files such as advancedsettings.xml, sources.xml, etc on the machine too

Have you built xbmc.bin? Does it run?
Reply
#29
xbmc was already previously installed as the "hacked" headless eden-server so the .xbmc/*.xml files are already configured. I have built Frodo and installed to be sure and this has corrected the xbmc-xandr error.

I'm still getting a segfault and xmbcvideolibraryscan must be run within the source code root directory which I think is strange? Otherwise it gives me and error about not being able to find the XBMC data files.

Code:
XBMC Media Center 12.0-ALPHA4 Git:20120705-60b0903
Copyright (C) 2005-2011 Team XBMC - http://www.xbmc.org

Starting Video Library Scan

Unable to find path to XBMC data files!

Thanks for all of your help thus far!

** EDIT: Ok, so trying to start xbmc.bin fails with the same segfault which I'd expect due to this being a headless Ubuntu box with no X11. Does xbmcvideolibraryscan require a GUI as well? If so this kind of defeats the purpose of a "minified server".
Reply
#30
You don't need to run the xbmc GUI but you need to setup your xbmc configuration files though...

Have you run sudo make install?

Try running the following (assuming you installed XBMC using defaults):

XBMC_BIN_HOME=/usr/local/lib/xbmc XBMC_HOME=/usr/local/share/xbmc ./xbmcVideoLibraryScan

Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 58

Logout Mark Read Team Forum Stats Members Help
xbmc minified as a server?9