aMSN Forums
October 22, 2018, 01:13:40 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Building aMSN svn for N900  (Read 17547 times)
MastaG
Power user
*
Offline Offline

Posts: 65


View Profile
« on: January 14, 2010, 03:09:40 pm »

I am looking into building the aMSN svn for the n900.
What would be the best way to start this?
Either ssh into my phone and compile everything from there (which would probably be slow).
Or build a toolchain with kegel's crosstool and build everything on my host computer.
The thing with crosscompiling is that it usually fucks up at some point and tries to link some library to wrong causing it to fail when I load in on my phone once i'm done.
Any hints?

EDIT: The reason I want to rebuild it is because aMSN stopped working of todays big update for maemo.

EDIT2: I installed the Maemo5 SDK on my F12 x64 machine using the instructions provided here: http://wiki.maemo.org/User:Jebba/SDK
I've got the emulator up and running Smiley
So in order to build aMSN I should be building tcl, tk and tcl-tls but if I would like to try the video-conference stuff I also need all of the gstreamer stuff, libnice and farsight2 right? Are any of those already available as debs for the n900 or do I need to build them aswell?
« Last Edit: January 14, 2010, 09:43:48 pm by MastaG » Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: January 17, 2010, 09:46:29 pm »

Hi MastaG,
Why don't you get the 0.98.1 version from amsn's website? I don't see any reason for it to stop working after the PR1.1 update (I had tested amsn on PR1.1 from the start since I had access to it since a long time ago, so it should work).
Anyways, the proper way is to just install the maemo sdk, like you seem to have found... then getting tcl/tk is quite simple, but they should be available in maemo-extras repository soon (I'm working with a maemo packager in order to get them as well as amsn into maemo-extras). repository.maemo.org is down for the moment, but we should have them working/available when the repository is back online.
For amsn, it's simple, you use http://amsn-project.net/wiki/SVN to get the SVN version, then you do './configure && make deb' that should create a deb file for you...
However that deb won't be optified and would kill your device since it would use up all the / partition's space.. so you need to optify it..
copy over the files from here : http://amsn-project.net/~kakaroto/maemo/
into your amsn's source dir.. then do './configure --datadir=/opt && make deb', you'll then get a nice deb package in ./distrib/DEB that you can install with 'dpkg -i amsn.deb' over ssh...

Logged

KaKaRoTo
MastaG
Power user
*
Offline Offline

Posts: 65


View Profile
« Reply #2 on: January 19, 2010, 06:10:18 pm »

Ah thanks for that.
I've got everything up and running and found a nice tool for optifying packages.
http://maemo.gitorious.org/maemo-af/maemo-optify/blobs/master/README
It changes some settings in the "debian" subdir so the files will be installed in /opt instead.
I already patched the amsn svn with the files from your tree http://amsn-project.net/~kakaroto/maemo/.
So it's ready to be built.
However the tcl and tk source packages from their homepage aren't debian friendly, there isn't a "debian" subdir under /unix.
Since I'm not really familiar with debian-based distro's I'm going to read up on that.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #3 on: January 20, 2010, 05:23:55 am »

yeah, i know of maemo-optify! but i left the task of optifying it properly to a real packager (heard some issues happen with maemo-optify).
and of course there wouldn't be a debian dir in any source package, but amsn is different since we have 'make deb'. to get the debian dir, I usually do 'apt-get source <package name>' but since you're on FC or whatever, you should just head over to packages.debian.org and get the packages from there.. there should be a diff.gz file for every package, and that diff.gz will contain the debian directory, you just need to use 'gzcat file.diff.gz | patch -p1 '  or something similar..
Logged

KaKaRoTo
MastaG
Power user
*
Offline Offline

Posts: 65


View Profile
« Reply #4 on: January 20, 2010, 11:38:02 pm »

Ok I got around building everything.
debian is really amazing btw, you can configure everything from the debian dir:)
I've built:
tcl8.5_8.5.8-2_armel.deb <- lenny
tk8.5_8.5.8-1_armel.deb <--lenny
tcltls_1.5.0-4_armel.deb <-- etchy (since the one from lenny required debhelper v6 or higher)
libv4l-0_0.5.0-3~intrepid1_armel.deb (some ubuntu repo)
amsn_0.99b-svn11899M.deb <-- from svn, replaced Makefile.in and maemo.diff (applied it also) with the ones from your homefolder, and overwrote everything in the debian subdir with the ones from your homefolder.

Since the configure script in debian/rules had the --with-threads switch for tcl tk by default, I also add it to the tcltls package.
I don't know if threading makes it faster or slower, so it was just a guess:P

You were right about maemo-optify it messes some stuff up with linking, for example tclConfig.sh isn't installed correctly, so I did everything by hand.
In all packages I configured the debian/rules, debian/name-dirs, debian/name-files, debian/name-doc, debian/name-postinst, debian/name-postrm, debian/name-preinst, debian/name-prerm and all other files to install into /opt/maemo/usr.
Some packages took extra work because they're really hardcoded into installing in /usr, but they're all fine now I guess.

Now a few things are annoying.
It doesn't create a starter in the mainmenu like the other applications.
I have to set "PATH=/opt/maemo/usr/bin:$PATH" and "LD_LIBRARY_PATH=/opt/maemo/usr/lib:$LD_LIBRARY_PATH" each time, or else wish will complain about not finding the libraries.
Busybox isn't capable of running the /opt/maemo/usr/bin/amsn script, it probably needs bash.
When I run /opt/maemo/usr/bin/wish /opt/maemo/usr/share/amsn/amsn it will error out with: Error in startup script: can't find package SASL::NTLM (Proxy.tcl)

I think most of it can be fixed by telling the amsn/debian/rules file to create a symlink into /usr/bin and modify the bin/amsn script to set PATH and LD_LIBRARY_PATH before it runs wish.


EDIT: I uploaded the packages into http://tabon.ath.cx/~mastag/n900/ in case someone would like to have a look
« Last Edit: January 20, 2010, 11:42:01 pm by MastaG » Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #5 on: January 21, 2010, 11:59:28 pm »

oh wow, now that's some awesome work you've done! I asked the packager who accepted to help us and he said he used maemo-optify, and yes he had issues with the tclConfig.sh (it worked on his local scratchbox but not when he submitted the packages to maemo-extras repository : https://garage.maemo.org/pipermail/extras-cauldron-builds/2010-January/014390.html
If you want to share the work you've done, it would be very helpful!
The important thing is to be able to build amsn with 'dpkg-buildpackage' instead of our 'make deb' method.
About your problems, I'm not sure, the tcl/tk deb I built for the amsn installation installs tcl/tk to /usr but as far as I know, it should find its libraries in the directory it was compiled with.. so if you edit the debian/rules to make it do a ./configure --prefix=/opt/ then it would probably work. Also, instead of doing /opt/maemo/usr/lib/* it should just be /opt/tcl/bin and /opt/tcl/lib, and /opt/tk/* and /opt/amsn/* that's what --prefix is used for, and I think if you use --prefix, then tcl/tk will look for binaries in $prefix/lib by default..
Then all you'd need to do is edit the maemo.diff and change the patch for the 'amsn' file from #!/bin/bash into #!/opt/tk/bin/wish8.5
For amsn it should be compiled with ./configure --prefix=/usr --datadir=/opt/amsn, then it should get installed to /opt, but leave the amsn.desktop file in /usr/share/etc.. the postinst script in the debian dir of amsn (from my link) should make sure the desktop file is correctly setup, and have it refresh the icons for the menu...
About the NTLM error, I'm not sure about that, it's something vivia added recently in SVN, I think it comes with tcllib, but I'm not sure, I'll ask her... (it should definitely not cause an error if not available, or amsn SVN should have that package bundled in utils/)
Logged

KaKaRoTo
MastaG
Power user
*
Offline Offline

Posts: 65


View Profile
« Reply #6 on: January 22, 2010, 12:35:54 am »

Yes of course I will:)
I already thought about it since I also needed tcllib on my own computer (F12) for aMSN to work.
Since I still have the sources it will be easy to modify to use prefix=/opt, however I think tcl/tk will then be installed into /opt/lib/tcltk/tcl8.5 and /opt/lib/tcltk/tcl8.5.
I can change the aMSN file indeed to set the LD_LIBRARY_PATH variable and to point to #!/opt/tk/bin/wish8.5 instead of bash and put the maemo.diff patch inside debian/ to make sure it's only applied when packaging.
I'll see if I can also pass prefix=/usr and datadir=/opt to the other packages like I can with aMSN, if it's not possible then I'll add some stuff to package-postinst to create symlinks from /opt/bin/wish8.5 to /usr/bin, because I think it should be possible for other apps to use tcl/tk too (from anywhere without having to set LD_LIBRARY_PATH and calling it from /opt/bin manually).
When I'm done I'll post full a patch for each package.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #7 on: January 22, 2010, 01:11:34 am »

hey, I asked vivia, she said it's in utils already, and it's installed by default.. the thing is that the addition of utils/md4 and utils/sasl to the FILES_TO_INSTALL in the makefile was done in r11805, and the custom maemo-specific Makefile.in I gave you was done on a previous svn revision, that's why that makefile doesn't install the necessary files!
So you apply this patch to your Makefile.in : http://amsn.svn.sourceforge.net/viewvc/amsn/trunk/amsn/Makefile.in?r1=11805&r2=11804&pathrev=11805
it should work fine then!

about your answer :
you don't need LD_LIBRARY_PATH afaik, but I'm not sure... in theory if you compile tcl/tk with --prefix=/opt/tcl8.5 and --prefix=/opt/tk8.5 (yeah, and not /opt, sorry), then it will automatically search for stuff in /opt/tcl8.5/lib and /opt/tk8.5/lib.. but a symlink wouldn't be such a bad idea in my opinion.. I thought of symlinks with a postinst, but it looks like you can have a debian/tcl.links file where you put the symlinks you want, and the deb stuff will do it all for you automagically.. I've seen them use that for amsn on debian, but not sure which compatibility (debhelper version) it needs for that to work... about --prefix=/usr and --datadir=/opt, that's only specific to amsn, so you don't have to try it on other stuff...

btw, like I said, for having amsn in maemo-extras repository, you need to have a .dsc (deb source package) for amsn, so having a 'make deb' wouldn't work, that's why porting the debian directory from the debian repositories would be better..

ps: how do you like your N900? having fun ? Smiley
Logged

KaKaRoTo
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #8 on: February 22, 2010, 05:35:24 pm »

hey, MastaG, I've been emailing you.. unless your email in your profile is wrong, could you answer please? thanks!
Logged

KaKaRoTo
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!