DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-10-27 20:50:54

plord
Member
Registered: 2010-02-02
Posts: 17

Calibre packages

FYI I've finally built calibre dependencies and calibre itself for the DNS-323.

Calibre is a rather nice ebook management system - as far as the DNS-323 is concerned the interesting part are some command-line tools which can fetch news sources from the internet and deliver to your ebook reader.  So when you wakeup in the morning you can read your daily dilbert, Guardian or whatever.

Personally I have a kindle 3 and so the books are delivered over wifi via Amazons wispernet.

See http://calibre-ebook.com/ and http://plord.co.uk/funplug/0.5/ for my packages

Offline

 

#2 2010-12-30 08:14:44

shawn_ly
New member
Registered: 2010-12-30
Posts: 1

Re: Calibre packages

I would love to have this working... Anyone else tried this?

Offline

 

#3 2011-03-22 04:45:12

pinion
Member
Registered: 2010-10-26
Posts: 15

Re: Calibre packages

plord: any chance of getting some instructions on how to get this set up. I think I've got the dependencies I need. Now I'm just trying to figure out how to add books to the db and get the server started. Googling got me to the cli options: http://calibre-ebook.com/user_manual/cli/cli-index.html but I'm still sort of stuck.

Code:

/mnt/HD_a2/books# calibredb add Wright,\ Steven\ -\ Steven\ Wright\ Humor.mobi 
File not found
File not found
Traceback (most recent call last):
  File "/ffp/bin/calibredb", line 18, in <module>
    from calibre.library.cli import main
  File "/ffp/lib/calibre/calibre/library/cli.py", line 16, in <module>
    from calibre.ebooks.metadata.meta import get_metadata
  File "/ffp/lib/calibre/calibre/ebooks/metadata/meta.py", line 9, in <module>
    from calibre.ebooks.metadata.opf2 import OPF
  File "/ffp/lib/calibre/calibre/ebooks/metadata/opf2.py", line 14, in <module>
    from lxml import etree
ImportError: File not found

Last edited by pinion (2011-03-22 04:45:33)

Offline

 

#4 2011-06-25 00:02:20

tanstaafl1963
Member
Registered: 2009-08-22
Posts: 58

Re: Calibre packages

plord, pinion,
  I'm looking to use calibre on my DNS 323 and would love to see what groundwork you've done.


DNS-323 FW 1.09
2 2-TB Drives
Automatic  0.7.0 |  Transmission 2.42

Offline

 

#5 2011-08-14 15:45:15

faethon
Member
Registered: 2009-04-20
Posts: 11

Re: Calibre packages

I have been struggling with setting up Calibre on my DNS323 as well. My goal is to host the Calibre Content Server on the NAS, so it is available for all devices within my home (WIFI) network. After some package hell, I have been able to get Calibre running. It is still work in progress, but I currently have the Calibre and dependencies packages from plord that are needed for Calibre. These are the steps I undertook:

1) Created package folder for Calibre on my NAS in /ffp/pkg/calibre

Code:

mkdir /ffp/pkg/calibre

2) wget the following packages from plord's repository:

Code:

cd /ffp/pkg

wget -nc http://www.plord.co.uk/funplug/0.5/calibre-0.8.12-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/python-2.7.1-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/python-dateutil-1.5-2.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/lxml-2.3-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libxslt-1.1.26-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/imagemagick-6.6.9-2-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libwmf-0.2.8.4-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libXau-1.0.5-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libXext-1.1.1-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libexif-0.6.19-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libiconv-1.13.1-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/libX11-1.3.2-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/fontconfig-2.8.0-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/freetype-2.4.2-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/pil-1.1.7-2.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/PyQT-4.8.3-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/qt-4.6.3-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/beautifulsoup-3.2.0-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/chmlib-0.40-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/cssutils-0.9.7b3-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/dnspython-1.9.4-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/mechanize-0.2.4-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/podofo-0.8.2-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/poppler-0.14.3-1.tgz -P calibre/
wget -nc http://www.plord.co.uk/funplug/0.5/sip-4.12.1-1.tgz -P calibre/

3) Next install the packages that are downloaded by invoking the following funpkg command:

Code:

funpkg -i /ffp/pkg/calibre/*.tgz

That will install all the packages that you previously downloaded. These packages were enough for me, you may need additional packages depending on what already is installed. I had the basic fun_plug packages from Fonz site (inreto.de) already installed.

4) I noticed that calibre is looking for python2 which is not available, so I created the following symlink to python2.7:

Code:

ln /ffp/bin/python /ffp/bin/python2

5) After this you should be able to invoke calibredb or calibre-server commands. These will fail however, because you need a library first. From my desktop installation of Calibre I created a new library on my NAS (via samba share) on location //NAS/eBooks which is mapped to /mnt/HD_a2/eBooks. I added one book for testing purposes. Next, from the commandline on my NAS, I then used the following command:

Code:

calibredb list --library-path /mnt/HD_a2/eBooks

After a while the book I added to the library is listed. It takes some time though. I then tried setting up the content server by calling:

Code:

calibre-server -p 8282 --with-library /mnt/HD_a2/eBooks

Then pointing a webbrowser from my desktop to [IP-of-NAS]:8282 lists the books in the library, which subsequently can be downloaded to iBooks on iPhone of iPad!
This is WIP, because I noticed that the library is a bit slow to reach when it is on a NAS, which needs to be solved to be totally useful. But it is a nice start! I hope you can get a step further with setting it up on your NAS. smile

Offline

 

#6 2011-10-11 06:01:18

Olega
New member
Registered: 2010-02-20
Posts: 2

Re: Calibre packages

Calibre don't work on my DNS-323

Code:

 calibredb list --library-path /mnt/HD_a2/eBooks
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/ffp/bin/calibredb", line 8, in <module>
    import sys, os
ImportError: No module named os

Code:

 calibre-server -p 8282 --with-library /mnt/HD_a2/eBooks
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/ffp/bin/calibre-server", line 8, in <module>
    import sys, os
ImportError: No module named os

sad

Offline

 

#7 2012-02-25 01:44:02

tanstaafl1963
Member
Registered: 2009-08-22
Posts: 58

Re: Calibre packages

I had this problem... any ideas?

Code:

root@dlink-66869E:/mnt/HD_a2/ffp/bin# calibre-server --library-path /mnt/HD_a2/D
ownloads/testlib/
File not found
File not found
Traceback (most recent call last):
  File "/ffp/bin/calibre-server", line 18, in <module>
    from calibre.library.server.main import main
  File "/ffp/lib/calibre/calibre/library/server/main.py", line 12, in <module>
    from calibre.library.server.base import LibraryServer
  File "/ffp/lib/calibre/calibre/library/server/base.py", line 21, in <module>
    from calibre.library.server.content import ContentServer
  File "/ffp/lib/calibre/calibre/library/server/content.py", line 17, in <module>
    from calibre.utils.magick.draw import (save_cover_data_to, Image,
  File "/ffp/lib/calibre/calibre/utils/magick/__init__.py", line 15, in <module>
    raise RuntimeError('Failed to load ImageMagick: '+_merr)
RuntimeError: Failed to load ImageMagick: File not found

DNS-323 FW 1.09
2 2-TB Drives
Automatic  0.7.0 |  Transmission 2.42

Offline

 

#8 2012-03-13 04:04:31

mrkresc
New member
Registered: 2012-03-13
Posts: 1

Re: Calibre packages

I am getting the same error as above.  Does anyone know how to fix this?



File not found
File not found
Traceback (most recent call last):
  File "/ffp/bin/calibre-server", line 18, in <module>
    from calibre.library.server.main import main
  File "/ffp/lib/calibre/calibre/library/server/main.py", line 12, in <module>
    from calibre.library.server.base import LibraryServer
  File "/ffp/lib/calibre/calibre/library/server/base.py", line 21, in <module>
    from calibre.library.server.content import ContentServer
  File "/ffp/lib/calibre/calibre/library/server/content.py", line 17, in <module>
    from calibre.utils.magick.draw import (save_cover_data_to, Image,
  File "/ffp/lib/calibre/calibre/utils/magick/__init__.py", line 15, in <module>
    raise RuntimeError('Failed to load ImageMagick: '+_merr)
RuntimeError: Failed to load ImageMagick: File not found

Offline

 

#9 2013-01-17 07:28:56

RupertAvery
New member
Registered: 2013-01-17
Posts: 2

Re: Calibre packages

I would really like to compile my own version, but I am stuck on compiling Qt 4.8.0, I get an error "undefined reference to `pipe2'".  I think this has something to do with uClibc or glibc, but I am very noobish at this and would like to get some help from anyone who has had experience with this. Also what is the best way to compile Qt so that I don't compile everything and only get the essentials?

Offline

 

#10 2013-01-24 05:29:51

RupertAvery
New member
Registered: 2013-01-17
Posts: 2

Re: Calibre packages

After giving up (for now) on compiling all the dependencies I realized that DNS-323 binaries were compatible with DNS-320/funplug 0.7 and I manually extracted and copied the pre-compiled binaries fo /ffp

After having some problems with python (I was getting a consistent "Assertion failed in dictobject.c" which I thought had something to do with my compilation of python) I found that the python2 binary was different from my python2.7, so I did a quick

Code:

# mv /ffp/bin/python2 /ffp/bin/python2.old
# ln /ffp/bin/python2.7 /ffp/bin/python2

That fixed the assertion error, but then I got the exact same error as @tanstaafl1963 and @mrkresc:

Code:

File not found
File not found
...
RuntimeError: Failed to load ImageMagick: File not found

I executed the following:

Code:

# strace -e trace:open calibre-server

and found that the file open was failing on /ffp/lib/libjpeg.so.62

I got the latest libjpeg (which happens to be 62) source and compiled it. Unfortunately it did not generate a .so file. In the end I had to modify the Makefile so do this for me:

Code:

so: $(LIBOBJECTS)
    $(CC) -shared -Wl,-soname,libjpeg.so -o libjpeg.so.$(JPEG_LIB_VERSION) $(LIBOBJECTS)

so-install: libjpeg.so.$(JPEG_LIB_VERSION)    
    $(INSTALL_LIB) libjpeg.so.$(JPEG_LIB_VERSION) $(libdir)/$(binprefix)libjpeg.so.$(JPEG_LIB_VERSION)

Which I then specifically called (assuming all the .o files had already been built with the initial make, I didn't really make this properly, just wanted to get it to work):
   

Code:

# make so && make so-install

After this I still got the File not found error, so I did another strace which gave me libpng12.so.0.  I already had a newer version libpng15 installed but this wasn't the version that ImageMagick recognized, so I went back and got the latest 1.2 version and compiled.
This time the .so file was built.

Now I am stuck at another error.  sad I still get two File not found messages that seems to go well, but now I get a very cryptic Segmentation fault...

It may be a problem with my own compilation of python or something... I'm trying a hand at gdb, but when I try to gdb calibre-server I get

Code:

Traceback (most recent call last):
  File "/mnt/HD/HD_a2/ffp/lib/python2.7/site.py", line 62, in <module>
    import os
  File "/mnt/HD/HD_a2/ffp/lib/python2.7/os.py", line 398, in <module>
    import UserDict
  File "/mnt/HD/HD_a2/ffp/lib/python2.7/UserDict.py", line 83, in <module>
    import _abcoll
  File "/mnt/HD/HD_a2/ffp/lib/python2.7/_abcoll.py", line 11, in <module>
    from abc import ABCMeta, abstractmethod
  File "/mnt/HD/HD_a2/ffp/lib/python2.7/abc.py", line 8, in <module>
    from _weakrefset import WeakSet
  File "/mnt/HD/HD_a2/ffp/lib/python2.7/_weakrefset.py", line 5, in <module>
    from _weakref import ref
ImportError: No module named _weakref

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB