Running Deluge on Solaris derivatives (OmniOS)

General support for problems installing or using Deluge
telefunken
New User
New User
Posts: 6
Joined: Fri Mar 22, 2013 10:20 am

Running Deluge on Solaris derivatives (OmniOS)

Post by telefunken »

Hi,

I'm in the process of building a storage server based around ZFS and will therefore be "forced" to run a solaris derivative OS. So far I've looked at OpenIndiana which seems to slowly be fading away, and I'm currently trying out OmniOS which actually seems to be actively developed. Target being only server, being a quick and simple OS. On top of this I will run Napp-IT.
Solaris derivatives often come with the bonus of "Zones", and this is where deluge comes in. My best case scenario would be to have a zone on my storagebox, running Flexget and Deluge, taking care of my download needs. So far I've got FlexGet running (installing and using PIP), but deluge was not as simple.
So far I've only tried to install the dependencies using PIP since most of them seems to be python modules(?), and that failed on the first try (twisted) :roll:

The actual question: Have someone successfully been able to run Deluge on any kind of Solaris based OS (I obviously only care about daemon and webui), or is this a hopeless idea?
telefunken
New User
New User
Posts: 6
Joined: Fri Mar 22, 2013 10:20 am

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by telefunken »

Ok, I think I got most of the dependencies installed by either using PIP or pkg.

PIP:
pyopenssl
pyxdg
chardet
setproctitle
mako

PKG:
setuptools-26
openssl
zlib
gnu-gettext

I've previously installed these packages as recommended for building stuff on OmniOS using pkg:
gcc46
gnu-make
cpp
header-math
object-file
header

So I have three things left;
intltool
twisted
twisted-web

Twisted is in PIP, but fails to install with this error message:

Code: Select all

error: command 'gcc' failed with exit status 
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Xbca5m-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/twisted
Storing complete log in /root/.pip/pip.log
The pip.log:

Code: Select all

/usr/bin/pip run on Fri Mar 22 12:29:49 2013
Downloading/unpacking twisted

  Running setup.py egg_info for package twisted

    running egg_info
    writing requirements to pip-egg-info/Twisted.egg-info/requires.txt
    writing pip-egg-info/Twisted.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/Twisted.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/Twisted.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found
    reading manifest file 'pip-egg-info/Twisted.egg-info/SOURCES.txt'
    writing manifest file 'pip-egg-info/Twisted.egg-info/SOURCES.txt'
  Source in /tmp/pip-build-root/twisted has version 12.3.0, which satisfies requirement twisted
Downloading/unpacking zope.interface>=3.6.0 (from twisted)

  Running setup.py egg_info for package zope.interface

    running egg_info
    writing requirements to pip-egg-info/zope.interface.egg-info/requires.txt
    writing pip-egg-info/zope.interface.egg-info/PKG-INFO
    writing namespace_packages to pip-egg-info/zope.interface.egg-info/namespace_packages.txt
    writing top-level names to pip-egg-info/zope.interface.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/zope.interface.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found
    reading manifest file 'pip-egg-info/zope.interface.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.dll' found anywhere in distribution

    warning: no previously-included files matching '*.pyc' found anywhere in distribution

    warning: no previously-included files matching '*.pyo' found anywhere in distribution

    warning: no previously-included files matching '*.so' found anywhere in distribution

    writing manifest file 'pip-egg-info/zope.interface.egg-info/SOURCES.txt'
  Source in /tmp/pip-build-root/zope.interface has version 4.0.5, which satisfies requirement zope.interface>=3.6.0 (from twisted)
  skipping extra test
  skipping extra docs
  skipping extra docs
  skipping extra testing
  skipping extra testing
  skipping extra testing
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.6/vendor-packages/setuptools-0.6c11-py2.6.egg (from zope.interface>=3.6.0->twisted)

Installing collected packages: twisted, zope.interface

  Running setup.py install for twisted

    Running command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ivxVJz-record/install-record.txt --single-version-externally-managed
    running install
    running build
    running build_py
    running egg_info
    writing requirements to Twisted.egg-info/requires.txt
    writing Twisted.egg-info/PKG-INFO
    writing top-level names to Twisted.egg-info/top_level.txt
    writing dependency_links to Twisted.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found
    reading manifest file 'Twisted.egg-info/SOURCES.txt'
    writing manifest file 'Twisted.egg-info/SOURCES.txt'
    running build_ext
    gcc -m64 -fno-strict-aliasing -std=c99 -m64 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c conftest.c -o conftest.o

    gcc -m64 -fno-strict-aliasing -std=c99 -m64 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c conftest.c -o conftest.o

    conftest.c:1:23: fatal error: sys/epoll.h: No such file or directory

    compilation terminated.

    building 'twisted.python.sendmsg' extension

    gcc -m64 -fno-strict-aliasing -std=c99 -m64 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c twisted/python/sendmsg.c -o build/temp.solaris-2.11-i86pc-2.6/twisted/python/sendmsg.o

    twisted/python/sendmsg.c: In function 'sendmsg_sendmsg':

    twisted/python/sendmsg.c:206:19: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:207:19: error: 'struct msghdr' has no member named 'msg_controllen'

    twisted/python/sendmsg.c:209:19: error: 'struct msghdr' has no member named 'msg_flags'

    twisted/python/sendmsg.c:251:13: warning: implicit declaration of function 'CMSG_SPACE' [-Wimplicit-function-declaration]

    twisted/python/sendmsg.c:276:27: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:277:32: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:282:27: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:284:23: error: 'struct msghdr' has no member named 'msg_controllen'

    twisted/python/sendmsg.c:293:16: warning: implicit declaration of function 'CMSG_FIRSTHDR' [-Wimplicit-function-declaration]

    twisted/python/sendmsg.c:293:43: warning: initialization makes pointer from integer without a cast [enabled by default]

    twisted/python/sendmsg.c:315:13: warning: implicit declaration of function 'CMSG_LEN' [-Wimplicit-function-declaration]

    twisted/python/sendmsg.c:325:13: warning: implicit declaration of function 'CMSG_DATA' [-Wimplicit-function-declaration]

    twisted/python/sendmsg.c:325:23: warning: assignment makes pointer from integer without a cast [enabled by default]

    twisted/python/sendmsg.c:331:13: warning: implicit declaration of function 'CMSG_NXTHDR' [-Wimplicit-function-declaration]

    twisted/python/sendmsg.c:331:29: warning: assignment makes pointer from integer without a cast [enabled by default]

    twisted/python/sendmsg.c:360:23: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:361:34: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:362:23: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c: In function 'sendmsg_recvmsg':

    twisted/python/sendmsg.c:423:19: error: 'struct msghdr' has no member named 'msg_control'

    twisted/python/sendmsg.c:425:19: error: 'struct msghdr' has no member named 'msg_controllen'

    twisted/python/sendmsg.c:438:26: warning: assignment makes pointer from integer without a cast [enabled by default]

    twisted/python/sendmsg.c:440:26: warning: assignment makes pointer from integer without a cast [enabled by default]

    twisted/python/sendmsg.c:459:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

    twisted/python/sendmsg.c:486:23: error: 'struct msghdr' has no member named 'msg_flags'

    error: command 'gcc' failed with exit status 1

    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ivxVJz-record/install-record.txt --single-version-externally-managed:
    running install

running build

running build_py

running egg_info

writing requirements to Twisted.egg-info/requires.txt

writing Twisted.egg-info/PKG-INFO

writing top-level names to Twisted.egg-info/top_level.txt

writing dependency_links to Twisted.egg-info/dependency_links.txt

warning: manifest_maker: standard file '-c' not found

reading manifest file 'Twisted.egg-info/SOURCES.txt'

writing manifest file 'Twisted.egg-info/SOURCES.txt'

running build_ext

gcc -m64 -fno-strict-aliasing -std=c99 -m64 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c conftest.c -o conftest.o

gcc -m64 -fno-strict-aliasing -std=c99 -m64 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c conftest.c -o conftest.o

conftest.c:1:23: fatal error: sys/epoll.h: No such file or directory

compilation terminated.

building 'twisted.python.sendmsg' extension

gcc -m64 -fno-strict-aliasing -std=c99 -m64 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c twisted/python/sendmsg.c -o build/temp.solaris-2.11-i86pc-2.6/twisted/python/sendmsg.o

twisted/python/sendmsg.c: In function 'sendmsg_sendmsg':

twisted/python/sendmsg.c:206:19: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:207:19: error: 'struct msghdr' has no member named 'msg_controllen'

twisted/python/sendmsg.c:209:19: error: 'struct msghdr' has no member named 'msg_flags'

twisted/python/sendmsg.c:251:13: warning: implicit declaration of function 'CMSG_SPACE' [-Wimplicit-function-declaration]

twisted/python/sendmsg.c:276:27: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:277:32: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:282:27: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:284:23: error: 'struct msghdr' has no member named 'msg_controllen'

twisted/python/sendmsg.c:293:16: warning: implicit declaration of function 'CMSG_FIRSTHDR' [-Wimplicit-function-declaration]

twisted/python/sendmsg.c:293:43: warning: initialization makes pointer from integer without a cast [enabled by default]

twisted/python/sendmsg.c:315:13: warning: implicit declaration of function 'CMSG_LEN' [-Wimplicit-function-declaration]

twisted/python/sendmsg.c:325:13: warning: implicit declaration of function 'CMSG_DATA' [-Wimplicit-function-declaration]

twisted/python/sendmsg.c:325:23: warning: assignment makes pointer from integer without a cast [enabled by default]

twisted/python/sendmsg.c:331:13: warning: implicit declaration of function 'CMSG_NXTHDR' [-Wimplicit-function-declaration]

twisted/python/sendmsg.c:331:29: warning: assignment makes pointer from integer without a cast [enabled by default]

twisted/python/sendmsg.c:360:23: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:361:34: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:362:23: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c: In function 'sendmsg_recvmsg':

twisted/python/sendmsg.c:423:19: error: 'struct msghdr' has no member named 'msg_control'

twisted/python/sendmsg.c:425:19: error: 'struct msghdr' has no member named 'msg_controllen'

twisted/python/sendmsg.c:438:26: warning: assignment makes pointer from integer without a cast [enabled by default]

twisted/python/sendmsg.c:440:26: warning: assignment makes pointer from integer without a cast [enabled by default]

twisted/python/sendmsg.c:459:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

twisted/python/sendmsg.c:486:23: error: 'struct msghdr' has no member named 'msg_flags'

error: command 'gcc' failed with exit status 1

----------------------------------------

Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ivxVJz-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/twisted

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/usr/lib/python2.6/site-packages/pip/commands/install.py", line 271, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.6/site-packages/pip/req.py", line 1185, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pip/req.py", line 592, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/usr/lib/python2.6/site-packages/pip/util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ivxVJz-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/twisted
Any ideas on how to proceed?

Btw, OmniOS comes with Python 2.6.7 and I've downloaded PIP 1.3.1
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by Cas »

Try settings CFLAGS to the following before running pip twisted:

Code: Select all

CFLAGS = -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1
Note that twisted-web is included in twisted pip package and intltool only applies to installing full gtk desktop application.
telefunken
New User
New User
Posts: 6
Joined: Fri Mar 22, 2013 10:20 am

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by telefunken »

That seems to work, I can now compile without obvious errors. However I also need libtorrent for which I haven't found a package either.
Been trying to build it (libtorrent-rasterbar-0.16.9) for hours now without succeeding .

To build libtorrent I needed boost, which I was able to compile by downloading source and then build with:

Code: Select all

./bootstrap.sh
./b2 install --prefix=/usr
I've been trying to build libtorrent with these options and flags:

Code: Select all

export CXXFLAGS=-I/usr/include
export LDFLAGS="-L/usr/lib -lpthread"

Code: Select all

./configure --enable-python-binding --prefix=/usr --with-boost-thread=/usr/lib/libboost_thread.so
Result of configure:

Code: Select all

Build options:
  deprecated functions: yes
  debug build:          no
  invariant checks:     no
  logging support:      no
  statistics:           no
  disk statistics:      no

Features:
  encryption support:   yes
  geoip support:        yes
  dht support:          yes
  pool allocators:      yes

Extra builds:
  examples:             no
  tests:                no
  python bindings:      yes

Pthread library:
  CFlags:               -D_REENTRANT -pthreads
  Libs:                 -lpthread

Boost libraries:
  version:              #define BOOST.LIB_VERSION "1_53"
  CPPFlags:             -I/usr/include
  LDFlags:              -L/usr/lib
  boost.system:         -lboost_system
  boost.python:         -lboost_python

Python environment:
  -automake-
  binary:               /usr/bin/python
  version:              2.6
  platform:             sunos5
  prefix:               ${prefix}
  exec_prefix:          ${exec_prefix}
  pythondir:            ${prefix}/lib/python2.6/site-packages
  pkgpythondir:         ${pythondir}/libtorrent-rasterbar
  pyexecdir:            ${exec_prefix}/lib/python2.6/site-packages
  pkgpyexecdir:         ${pyexecdir}/libtorrent-rasterbar

  -m4-
  cppflags:             -I/usr/include/python2.6
  ldflags:              -L/usr/lib/amd64 -lpython2.6
  extra libs:            -lsocket -lnsl
  extra ldflags:


External libraries:
  system libgeoip:      no
  system libiconv:      no

OpenSSL library:
  OpenSSL Libs:         -lssl -lcrypto
  OpenSSL LDFlags:      -L/usr/lib
  OpenSSL Includes:     -I/usr/include

Type 'make' to compile libtorrent-rasterbar 0.16.9
or type 'make V=1' for verbose compiling
and then 'make install' to install it into /usr
Seems fine to me, but when I try "make", this is what I get:

Code: Select all

Making all in include/libtorrent
make[1]: Entering directory `/root/libtorrent-rasterbar-0.16.9/include/libtorrent'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/libtorrent-rasterbar-0.16.9/include/libtorrent'
Making all in src
make[1]: Entering directory `/root/libtorrent-rasterbar-0.16.9/src'
  CXX      web_connection_base.lo
In file included from ../include/libtorrent/alert.hpp:64:0,
                 from ../include/libtorrent/peer_connection.hpp:66,
                 from ../include/libtorrent/web_connection_base.hpp:60,
                 from web_connection_base.cpp:40:
../include/libtorrent/thread.hpp:79:2: error: #error not implemented
make[1]: *** [web_connection_base.lo] Error 1
make[1]: Leaving directory `/root/libtorrent-rasterbar-0.16.9/src'
make: *** [all-recursive] Error 1
So now I'm stuck again, any more helpful ideas?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by Cas »

I don't think you need to specify --with-boost-thread and I wonder if that is causing the error.
telefunken
New User
New User
Posts: 6
Joined: Fri Mar 22, 2013 10:20 am

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by telefunken »

Tried without aswell, and I get the exact same error...
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by Cas »

The error is a result of BOOST_HAS_PTHREADS not being defined so I think you might need to look at the boost config/build.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by Cas »

With solaris platform BOOST_HAS_PTHREADS will be undefined with the following test:

Code: Select all

#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS)
# undef BOOST_HAS_PTHREADS
#endif
As far I can see in gcc.jam _PTHREADS will be defined.

Edit: Did you configure boost with 'threading=multi' set?
telefunken
New User
New User
Posts: 6
Joined: Fri Mar 22, 2013 10:20 am

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by telefunken »

Ok, rebuilt it like this:

Code: Select all

~/boost_1_53_0# ./bootstrap.sh
~/boost_1_53_0# ./b2 install --prefix=/usr --threading=multi

Performing configuration checks

    - 32-bit                   : yes
    - x86                      : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - icu                      : no
    - icu (lib64)              : no
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
    - gcc visibility           : yes
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.
- Boost.Locale needs either iconv or ICU library to be built.

Component configuration:

    - atomic                   : building
    - chrono                   : building
    - context                  : building
    - date_time                : building
    - exception                : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - signals                  : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...found 27991 targets...
However same results when trying to compile libtorrent:

Code: Select all

~/libtorrent-rasterbar-0.16.9# make
Making all in include/libtorrent
make[1]: Entering directory `/root/libtorrent-rasterbar-0.16.9/include/libtorrent'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/libtorrent-rasterbar-0.16.9/include/libtorrent'
Making all in src
make[1]: Entering directory `/root/libtorrent-rasterbar-0.16.9/src'
  CXX      web_connection_base.lo
In file included from ../include/libtorrent/alert.hpp:64:0,
                 from ../include/libtorrent/peer_connection.hpp:66,
                 from ../include/libtorrent/web_connection_base.hpp:60,
                 from web_connection_base.cpp:40:
../include/libtorrent/thread.hpp:79:2: error: #error not implemented
make[1]: *** [web_connection_base.lo] Error 1
make[1]: Leaving directory `/root/libtorrent-rasterbar-0.16.9/src'
make: *** [all-recursive] Error 1
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Running Deluge on Solaris derivatives (OmniOS)

Post by Cas »

I think this is a better boost build line as it's quicker and fixes the threading property which might solve the error.

Code: Select all

./b2 --prefix=/usr variant=release threading=multi link=shared --with-libraries=system,python install
Post Reply