No harm in reviving old threads! It is still useful to some people (me, for example!)
I used to have an ARM based TS-219P II and have been using unison successfully for a long time. What I noticed when building unison back then was that if I was using the ocaml version provided with Optware, unison would be extremely slow (because of the NATIVE=false flag required with the OOTB ocaml).
The solution for me was to build ocaml as well. Here are the steps I followed at the time:
Compile ocaml:
- get the ocaml 3.12.0 sources from:
http://ipkg.nslu2-linux.org/sources/
- tar xvfz ocaml-3.12.0.tar.gz
- configure -prefix /opt
- make world
- make opt
- make install
=> chech that ocamlc and ocamlopt are working
Then build unison:
- ipkg install emacs
- get Unison latest sources (pick up a version compatible with the one of your other machines) and extract them
- make UISTYLE=text
And I would get much much better performances like this (you can drop the NATIVE=false when compiling).
---
Now, I just upgraded to a TVS-663, 64bits and Intel based. The problems started... and I too just spent 2 days pulling my hair trying to get this working!
Here is what I did, as this is a slightly different solution:
- Install Entware using the 64 bits package
As in the past, first compile ocaml. There are a few differences though:
- first, Unison apparently doesn't compile with the version > 4. So get ocaml-3.12.1.
- ./configure -prefix /opt -no-shared-libs -no-curses (not sure which options are absolutely needed here, that's just what worked for me)
- create links to some Entware librairies (otherwise the build process uses 32bit default libraries from /lib and fails. Of course this may not be needed if you have a 32bit architecture):
ln -s /opt/lib/libm-2.23.so /lib64/libm.so.6
ln -s /opt/lib/libdl-2.23.so /lib64/libdl.so.2
ln -s /opt/lib/libncurses.so /lib64/libncurses.so.6
- ldconfig
- make world, make opt and make install
Then compile ctags/etags
- download the sources from
http://ctags.sourceforge.net/
- ./configure --prefix=/opt --enable-etags
- make
- make install
Finally, build Unison:
- make UISTYLE=text
- ln -s /opt/lib/libutil-2.23.so /lib64/libutil.so.1 (required to run Unison)
- ldconfig
- test that the binary is working
=> done! well... almost
Any link created in /lib64 will be removed after a reboot, which will break Unison (and ocaml). Beside I don't think that it would be a very good idea to make those libs available system wide as they may disrupt other applications...
So here is what I did:
- mkdir /opt/usr/local/libunison
- create all the links in this directory:
ln -s /opt/lib/libm-2.23.so /opt/usr/local/libunison/libm.so.6
ln -s /opt/lib/libdl-2.23.so /opt/usr/local/libunison/libdl.so.2
ln -s /opt/lib/libncurses.so /opt/usr/local/libunison/libncurses.so.6
ln -s /opt/lib/libutil-2.23.so /opt/usr/local/libunison/libutil.so.1
- mv /opt/bin/unison /opt/bin/unison-bin
- vi /opt/bin/unison (to create a new script), with the following content:
Code: Select all
#!/bin/sh
LD_LIBRARY_PATH=/opt/usr/local/libunison
unison-bin $@
- chmod +x unison
=> you can call Unison using the 'unison' command as usual
Hope this helps!