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

#101 2008-04-08 00:01:40

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

Optware when used on nslu2 unslung firmware and few more platforms, it supports both native and cross build.
Right now for dns-323, optware only supports cross compilation with linux PC as host.
But on the other hand, setting up a cross compile environment with optware is very easy to do, very automated, you'll save tons of time compiling.

Offline

 

#102 2008-04-08 08:44:27

pwvandeursen
Member
Registered: 2007-07-04
Posts: 112

Re: [announce] optware/dns323 to build 1000+ ipk's

according to phpinfo, the php.ini file is still loaded from ffp/etc......this means that all modules installed through optware will not be loaded, correct?

in the php.ini file in the ipkg/etc is mentioned:


;;;;
; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.
;;;;

What I just don't understand is why my modules are not loaded?

Offline

 

#103 2008-04-08 09:18:16

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

Which php and web-server are you using?
If you're using ffp web server, it probably won't automagically load optware php.
I suggest you just use optware lighttpd and optware php-fcgi. Test a simple phpinfo page. See http://www.nslu2-linux.org/wiki/HowTo/D … ingFastCGI

You probably should start a separate thread.

Last edited by bzhou (2008-04-08 09:18:56)

Offline

 

#104 2008-04-09 08:41:26

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [announce] optware/dns323 to build 1000+ ipk's

Hi bzhou

You helped me get this running in the other transmission/clutch thread but I now have another question for you.

The ipkg feed successfully installed download version 1.11 along with some libraries it needed. These downloaded to its own file structure under /ipkg/opt/bin and /ipkg/opt/lib.

My old (1.06) version of transmission was running under /fun_plug.d/bin and /fun_plug.d/lib so what do I need to do to get the new version running?

I thought it may be as simple as copying the transmission* files from /ipkg/opt/bin to /fun_plug.d/bin but when I tried this transmission-daemon would not start. (As you can tell I'm still a bit of newbie but I'm guessing that it can not find the right libaries so maybe I need to add /ipkg/opt/lib to my path?)

TIA

RAP

Offline

 

#105 2008-04-09 10:53:39

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

The files available from the optware feed are all designed to work together, and to keep all configuration, libraries and binaries under the /opt directory.

It will be easiest for you if you don't install the same package in to fonz fun_plug AND /opt at the same time. Additionally, it will be harder work mixing packages that depend on each other like lighttpd and php - you will need to change more configuration settings and will probably be the first person to ever test such a set up!

Fonz' fun_plug script obviously sets up the paths needed for the packages that he distributes. The simplest way to use services from optware will be for you to make a change to the fun_plug script that sets up the optware /opt mount, adds the optware directories to PATH and then starts the required daemons. (Or if you want to be neater, don't make the changes directly in fun_plug, but put them in a script in the fun_plug.d/start directory and make that script executable.

If you think that you will mainly be using optware packages, then stick to Fonz' 0.4 fun_plug - 0.5 uses it's own ulibc which will take up a little extra memory compared with the 0.4 version which uses the ulibc that comes built in to the DNS323 (I have no idea how much - maybe it's trivial?!), and of course 0.5 is still experimental.

Last edited by sjmac (2008-04-09 10:54:57)

Offline

 

#106 2008-04-09 12:07:20

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac wrote:

Fonz' fun_plug script obviously sets up the paths needed for the packages that he distributes. The simplest way to use services from optware will be for you to make a change to the fun_plug script that sets up the optware /opt mount, adds the optware directories to PATH and then starts the required daemons. (Or if you want to be neater, don't make the changes directly in fun_plug, but put them in a script in the fun_plug.d/start directory and make that script executable.

If you think that you will mainly be using optware packages, then stick to Fonz' 0.4 fun_plug - 0.5 uses it's own ulibc which will take up a little extra memory compared with the 0.4 version which uses the ulibc that comes built in to the DNS323 (I have no idea how much - maybe it's trivial?!), and of course 0.5 is still experimental.

I sort of half understand what you are saying and like the idea of using a start up script from fun_plug.d/start but not really sure how to go about it.

I can obviously change the path to transmission-daemon to start it from /ipkg/opt/bin but how do I ensure that it uses the libraries from /ipkg/opt/lib not those in fun_plug.d/lib ?

RAP

Last edited by rap (2008-04-09 12:07:55)

Offline

 

#107 2008-04-09 14:16:46

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

The optware binary has been compiled to expect the libraries to be in /opt/lib, so libraries in ffp or fon_plug.d  shouldn't be a problem, but again, see my suggestion to avoid havin the same thing installed in optware and fun_plug, and also my suggestion to favour fonz. 0.4 version.

You should use /opt/bin if you need to specify the full path - that means that you have to have to have used the 'mount --bind' command to create /opt

Last edited by sjmac (2008-04-09 14:21:44)

Offline

 

#108 2008-04-09 15:39:05

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac wrote:

The optware binary has been compiled to expect the libraries to be in /opt/lib, so libraries in ffp or fon_plug.d  shouldn't be a problem, but again, see my suggestion to avoid havin the same thing installed in optware and fun_plug, and also my suggestion to favour fonz. 0.4 version.

You should use /opt/bin if you need to specify the full path - that means that you have to have to have used the 'mount --bind' command to create /opt

Thanks for the advice so far - I'll give it a try to sort out tonight.

I'm running fun_plug 04 at the moment so that's fine.

I assume that you mean I will need to run this command (from the wiwki) each time the machine is restarted before trying to start the daemon

mount -o bind /mnt/HD_a2/ipkg/opt /opt


RAP

Offline

 

#109 2008-04-09 16:27:20

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

rap wrote:

mount -o bind /mnt/HD_a2/ipkg/opt /opt

Yes, that needs to be run once after each reboot if you want any optware installs to work correctly.

Offline

 

#110 2008-04-10 09:17:51

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [announce] optware/dns323 to build 1000+ ipk's

Did some further work on this and managed to tweak fun_plug and the transmission start up script to start up the new ipkg version (1.11 build 5586 after an upgrade) which is some progress.

Latest problem is that as soon as clutch tries to talk to the daemon the daemon crashes with "Segmentation Fault".

I checked out the post re the missing libraries in /opt/lb (lbrt) so have downloaded and untarred them but it still crashes.

Any other ideas as to what may be wrong?

TIA

RAP

Offline

 

#111 2008-04-10 09:56:05

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

rap wrote:

Any other ideas as to what may be wrong?

What do your configurations and startup scripts look like?

How does clutch get started?

I just installed it, but have no idea how to test it ...

Offline

 

#112 2008-04-10 10:58:57

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [announce] optware/dns323 to build 1000+ ipk's

I'll post some specifics tonight when I get access to my machine but breifly:

I was already running 1.06 after setting up as per the transmission/clutch thread in this forum and these links
http://www.shadowandy.net/_html/archive … _106.html.
http://www.shadowandy.net/_html/archive … nsmis.html This includes lightpd with php support.

Once this is done you access clutch in your browser on http://<DNS-323's IP>:8080/clutch/

After getting this ipkg feed working and downloading transmission 1.11 I added lines to fun_plug file to mount the /opt and add /opt/bin to the path then modified my startup script to use the new daemon from /opt/bin rather than the funplug one.

That is where I now get the segmentation fault.

Hope the above is understandable

RAP

PS I also had to add the comand to make the dir /opt to fun_plug as it kept on disappearing when I restarted the DNS-323.

Offline

 

#113 2008-04-10 17:48:30

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: [announce] optware/dns323 to build 1000+ ipk's

A bug has been filed for this here, I suggest you revert to Transmission 1.06 for now.

Offline

 

#114 2008-04-10 22:16:19

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

file.mk is broken - simple fix, update
FILE_VERSION=4.21
to
FILE_VERSION=4.23
(version 4.24 is also available on the FTP site, but then the build fails.)

Last edited by sjmac (2008-04-10 22:51:34)

Offline

 

#115 2008-04-10 23:24:25

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

Problem building mediatomb to test

I've tried to make mediatomb-ipk and hit a few snags.

First was the file.mk change noted in the comment above.

Then I had to upgrade to a more recent automake than I had on my CentOS 4.4 box - I was surprised it was using a native tool - I expected everything to be in the tool-chain. Is it OK/expected to use the local/native configure tools? I grabbed the most recent tar.gzs for m4, autoconf and automake and installed them on my dev machine.

Finally (and now I'm stuck) I get this error at the end of the configure step for mediatomb:

Code:

checking tag.h presence... yes
checking for tag.h... yes
checking audioproperties.h usability... yes
checking audioproperties.h presence... yes
checking for audioproperties.h... yes
checking tstring.h usability... yes
checking tstring.h presence... yes
checking for tstring.h... yes
checking textidentificationframe.h usability... yes
checking textidentificationframe.h presence... yes
checking for textidentificationframe.h... yes
checking attachedpictureframe.h usability... yes
checking attachedpictureframe.h presence... yes
checking for attachedpictureframe.h... yes
checking for main in -ltag... no
configure: error: unable to configure taglib support
make: *** [/home/steven/dns323/optware/dns323/builds/mediatomb/.configured] Error 1

The make taglib-stage step seems to have completed (I did make taglib-ipk just to be sure), so what's going on? Does this build for anyone else?

I don't know how automake/autoconf works, but I looked in the configure script and in configure.ac and I couldn't find the definition of the test that was failing ( ac_cv_lib_tag_main ? )

Any clues?

Offline

 

#116 2008-04-11 10:31:06

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [announce] optware/dns323 to build 1000+ ipk's

Looking at the mediatomb website they seem to already have a optware/ipkg version:

http://ipkgfind.nslu2-linux.org/result. … pe=package

Would that not be suitable for the 323?

RAP

Offline

 

#117 2008-04-11 11:21:29

MeAngry
Member
Registered: 2008-04-07
Posts: 6

Re: [announce] optware/dns323 to build 1000+ ipk's

No, probably it's compiled for the NSLUG2.

@sjmac: Why don't you try compiling with id3lib support instead of taglib? Taglib is relatively slow on our boxes anyway.

Offline

 

#118 2008-04-11 13:51:40

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

rap wrote:

Would that not be suitable for the 323?

I followed the link, and there are a few platforms lissed, but none are the DNS323:
http://ipkgfind.nslu2-linux.org/details … mp;format=

I noticed that it doesn't get compiled by default, so I was just trying to find a fix to make it work as part of our "official"/experimental feed.

I will give the ID3 lib a try - do you know what the difference is?

I'm still confused about whether mediatomb.mk should be using my native 'automake' or if it should be using one built in to the opwtare/dns323 toolchain. I'll have another dig around this evening, unless anyone can tell me before then :-)

Offline

 

#119 2008-04-11 23:27:54

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

sjmac wrote:

I noticed that it doesn't get compiled by default, so I was just trying to find a fix to make it work as part of our "official"/experimental feed.

I will give the ID3 lib a try - do you know what the difference is?

I'm still confused about whether mediatomb.mk should be using my native 'automake' or if it should be using one built in to the opwtare/dns323 toolchain. I'll have another dig around this evening, unless anyone can tell me before then :-)

I just worked on make/id3lib.mk a little and got it build for optware/dns323, it should be in the feed now.

In make/mediatomb.mk, if you force
MEDIATOMB_CONFIG_ARGS=--enable-id3lib --disable-taglib

add DEPENDS and id3lib-stage, mediatomb should build fine.

I got the same error when I --enable-taglib, and I haven't got time to investigate. Looks somewhat related to the id3lib.mk fix. I got the impression that taglib is a bit more actively developed than id3lib, taglib also claims to be faster than id3lib.

Just like make, it's perfectly ok to use automake/autotools on your build machine during cross compilation. Although strictly speaking, to minimize build dependencies, one could/should build these tools under host/ as well. But the version built using optware/dns323/toolchain is only meant to run on dns323.

Offline

 

#120 2008-04-15 01:31:20

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: [announce] optware/dns323 to build 1000+ ipk's

@bzhou - with those suggestions mediatomb compiles and runs OK. (I've only tested it with streaming couple of manually added MP3s in the DB so far, I've not really worked out how to use/configure it to scan for video and audio.)

Actually, it seems to have started scanning all by itself - here are some iconv errors reported in the console:

Code:

2008-04-14 22:09:02    INFO: http://192.168.21.107:49152/
2008-04-14 22:13:54   ERROR: iconv: Invalid or incomplete multibyte or wide char
acter
2008-04-14 22:13:54   ERROR: iconv: Bj├Ârk could not be converted to new encodin
g: invalid character sequence!
2008-04-14 22:13:54   ERROR: iconv: Invalid or incomplete multibyte or wide char
acter
2008-04-14 22:13:54   ERROR: iconv: Ârk could not be converted to new encoding:
invalid character sequence!
2008-04-14 22:13:54   ERROR: iconv: Invalid or incomplete multibyte or wide char
acter
2008-04-14 22:13:54   ERROR: iconv: Jos├® Gonz├ílez could not be converted to ne
w encoding: invalid character sequence!
2008-04-14 22:13:54   ERROR: iconv: Invalid or incomplete multibyte or wide char
acter
2008-04-14 22:13:54   ERROR: iconv: ® Gonz├ílez could not be converted to new en
coding: invalid character sequence!
2008-04-14 22:14:07   ERROR: iconv: Invalid or incomplete multibyte or wide char
acter
2008-04-14 22:14:07   ERROR: iconv: Benny Andersson/Bj÷rn Ulvaeus could not be c
onverted to new encoding: invalid character sequence!

It would be nice to try with taglib to see if the problems go away ;-)

Last edited by sjmac (2008-04-15 01:32:40)

Offline

 

#121 2008-04-15 17:40:53

rejong
Member
Registered: 2008-04-14
Posts: 8

Re: [announce] optware/dns323 to build 1000+ ipk's

Hi, i've installes the optware ipkg tool and installed php-thttpd. This is working, i get a nice "hello world" from my index.php.

Now I also want to install php-mysql.

when using ipkg i get the following error for the mysql package.

Code:

Installing all prepared tables
Illegal instruction
Installation of system tables failed!

Examine the logs in /opt/var/lib/mysql for more information.
You can also try to start the mysqld daemon with:
/opt/libexec/mysqld --skip-grant &
You can use the command line tool
/opt/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /opt/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /opt/var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /opt/bin/mysqlbug script!

I reproduce this by running mysql_install_db

I tried what is suggested:

Code:

# /opt/libexec/mysqld --skip-grant &
# /opt/bin/mysql -u root mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[1] + Illegal instruction        /opt/libexec/mysqld --skip-grant

... and now I'm stuck, can anybody tell me what i'm doing wrong here?

TIA

Offline

 

#122 2008-04-15 19:54:41

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

According to http://mybookworld.wikidot.com/forum/t- … ost-145392
transmission 1.11+r5611-1 seems to work.

Offline

 

#123 2008-04-15 20:25:47

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: [announce] optware/dns323 to build 1000+ ipk's

rejong wrote:

Hi, i've installes the optware ipkg tool and installed php-thttpd. This is working, i get a nice "hello world" from my index.php.
...

Code:

# /opt/bin/mysql -u root mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[1] + Illegal instruction        /opt/libexec/mysqld --skip-grant

... and now I'm stuck, can anybody tell me what i'm doing wrong here?

TIA

It's probably the mysql package and nothing wrong on your side.

A similar problem with openssl was solved by sjmac by lowering optimization level during compilation. I suspect this problem is again related to toolchain, since the same mysql.mk is used to cross build working mysql ipk's for about a dozen optware targets.

What you can help is to provide more information to locate exactly the place "illegal instruction" happens, maybe using strace.

Some one with optware cross build environment setup, who has a dns-323, are in a better position to troubleshoot and fix mysql ipk. I'd think we are pretty close, just need some determined extra push.

Offline

 

#124 2008-04-15 22:25:26

HaydnH
Member
Registered: 2007-09-28
Posts: 187

Re: [announce] optware/dns323 to build 1000+ ipk's

Hi Bzhou,

I was just working on something that requires ffmpeg but I erased my custom compiled version a while ago so thought I'd use the optware version - however, one of the libraries required by it wasn't compiled with -fPIC so it won't work... oh well think I still have my log of the compilation somewhere...

Haydn.

Offline

 

#125 2008-04-15 22:30:09

rejong
Member
Registered: 2008-04-14
Posts: 8

Re: [announce] optware/dns323 to build 1000+ ipk's

bzhou wrote:

What you can help is to provide more information to locate exactly the place "illegal instruction" happens, maybe using strace.

Some one with optware cross build environment setup, who has a dns-323, are in a better position to troubleshoot and fix mysql ipk. I'd think we are pretty close, just need some determined extra push.

I ran the following:

Code:

strace /opt/libexec/mysqld 2>&1

result in attachment


Attachments:
Attachment Icon strace-mysqld.txt, Size: 13,131 bytes, Downloads: 686

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB