A rather dull worKLOG. This is just a scratchpad for solutions to IT problems that might be useful to someone else. Expect no opinions, no brilliant insights and definitely no pictures of pets or children. Expect stack traces, code snippets and other hints for the Google Indexer.

Wednesday, November 15, 2006

Weekly update 15/11/06

* Submitted ADASS paper
* Currently moving the fastem algorithm off hempriggs. In the process
I'm upgrading to a new version supplied by CMU that doesn't require user
intervention when things go wrong, thus making the web service more
reliable. Unfortunately, this new version has a slightly different
interface, so it's not a straight drop in replacement.
* Given access to all CMU's algorithms
* Tony has asked me to lead a bid to join the U&I CofP. Email
attached. Deadline is next week, shouldn't take too much work.
Co-conspirators are Elizabeth A and Norman.
* Upgraded the Workbench Plastic library and made some fixes

Thursday, November 09, 2006

Cygwin/X - logging into remote linux machines from Windows

Logging into linux machines from Windows can be done in various ways,
such as using ssh via PuTTY. In alternative is to use Cygwin, which not
only gives you a fairly complete Linux emulation on your windows box,
but also makes it easy to use X-forwarding, and thus use remote
GUI-based applications.

Step 1) Install Cygwin. The installer will give you a choice of
packages to install. Make sure you install the x11 packages
Step 2) Start the x server by running [cygwin
installation]\usr\X11R6\bin\startxwin.bat
Step 3) From the resulting xterm window, log into the remote machine
with ssh -X (remote machine name)
Any remotely started GUI apps should now magically appear on your
Windows box.

If you get an error of the form
warning, error event received:
X Error of failed request: BadAtom (invalid Atom parameter)
Major opcode of failed request: 18 (X_ChangeProperty)
Atom id in failed request: 0x1b3
Serial number of failed request: 944
Current serial number in output stream: 946

when you try to start the GUI app, try using -Y instead of -X.

Wednesday, November 08, 2006

Increasing the memory available to Eclipse.

To increase the memory allocated to the JVM for Eclipse, edit the
eclipse.ini file in your Eclipse directory to be something like:
-vmargs -Xms40m -Xmx512m

Weekly Summary

AG@WFAU Operations
=================
* Helped test ukidss
* Suggested compression as a solution to the large metadoc file problem.
* Moved test-registry
* China-AGVO operational
Datamining
=======
* Swotting up on datamining
* Been in touch with Andrew Moore about fastem - applied for access to
software

Plastic
====
* ADASS followup
* Been in touch with Ruby people
* TKH unavailable
* Contacted Jason about site spruce up but heard nothing yet

Other
=====
* Preparing Eclipse lecture
* Setting up my Eclipse to do C++

AOB
deadline for adass manuscripts is Monday

Tuesday, November 07, 2006

Setting up C++ in Eclipse on Windows

Although Eclipse works most naturally as a Java IDE, it doesn't do too
badly for other languages, and has the advantage that you don't need to
learn multiple IDEs and can keep all your code together in a single
environment.
Steps in setting up C++ in Eclipse, on Windows:
* If it's not already installed, get the CDT plugin - this is available
as part of the standard Callisto bundle from the Eclipse website.
(help/software updates/find and install/add new remote site
http://download.eclipse.org/tools/cdt/releases/callisto)
* The CDT doesn't come with its own compilers etc - you'll need to
download them separately. One option is to install Cygwin, making sure
that you're ticked all the boxes to get make and gcc. Important: don't
forget to add cygwin/bin to your windows path. The problem is, that any
executables you then make will need the cygwin1.dll to be bundled with
them, which is hardly ideal.
* An alternative, mentioned in
http://wiki.fredlackey.com/pmwiki.php?n=HelpfulInfo.DevelopmentEclipseCppCofnig
and others is to install MinGW from
http://prdownloads.sourceforge.net/mingw/MinGW-5.0.3.exe?download which
will produce exes with no dependencies. Again, make sure it's on your path.
* Managed vs Standard projects. If you create a managed project then
Eclipse will generate a simple makefile for you, otherwise you are
expected to create a makefile yourself, and will spend many happy hours
hitting the "build" button and wondering why nothing happens.

Monday, November 06, 2006

xml-rpc from C++ on Windows pt I

As part of the Plastic http://plastic.sourceforge.net project I'm
looking at making xml-rpc calls from different languages. Current focus
is on C/C++ since it opens up the possibility of using SWIG to get
Plastic access from a large range of other languages "for free".

My setup:
OS: Windows XP
IDE: Eclipse, with the CDT plugin
Tools: g++ and make, as part of the MinGW and MSYS systems

The most promising xml-rpc library is this one:
http://xmlrpcpp.sourceforge.net/links.html. Promising because a) I've
got it working before b) It has no dependencies c) It does client and
server (necessary for a fully-fledged plastic application).

Steps
1) Download and install the xml-rpc library files into a suitable folder.
2) Add this folder to the list of source folders in project
properties/c++ build/Tool settings/compiler/directories
3) Add the _WINDOWS flag to the compiler/preprocessor
If you hit build now, you'll get linker errors as listed below. The
problem is that although you get the winsock header files included on
the path automatically, you need to explicitly specify the corresponding
library to the linker. The library in question is probably called
something like: libws2_32.a and can be found in the MinGW/lib folder.
4) project properties/c++ build/Tool settings/linker/libraries/ add
library ..... and here's the real doozy....you add ws2_32 (!!!not!!!
libws2_32.a .... the linker prepends the lib and adds the .a for you).

Hit build, and you're away. All the above assumes that you have already
written your xml-rpc client of course....

=================================================================
The linker errors (for google's benefit):
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:45:
undefined reference to `WSAStartup@8'
./xmlrpc/XmlRpcSocket.o(.text+0x5d): In function
`ZN6XmlRpc12XmlRpcSocket6socketEv':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:80:
undefined reference to `socket@12'
./xmlrpc/XmlRpcSocket.o(.text+0x8e): In function
`ZN6XmlRpc12XmlRpcSocket5closeEi':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:89:
undefined reference to `closesocket@4'
./xmlrpc/XmlRpcSocket.o(.text+0xbc): In function
`ZN6XmlRpc12XmlRpcSocket14setNonBlockingEi':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:103:
undefined reference to `ioctlsocket@12'
./xmlrpc/XmlRpcSocket.o(.text+0x10b): In function
`ZN6XmlRpc12XmlRpcSocket12setReuseAddrEi':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:115:
undefined reference to `setsockopt@20'
./xmlrpc/XmlRpcSocket.o(.text+0x157): In function
`ZN6XmlRpc12XmlRpcSocket4bindEii':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:126:
undefined reference to `htonl@4'
./xmlrpc/XmlRpcSocket.o(.text+0x16b):E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:127:
undefined reference to `htons@4'
./xmlrpc/XmlRpcSocket.o(.text+0x18c):E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:128:
undefined reference to `bind@12'
./xmlrpc/XmlRpcSocket.o(.text+0x1bc): In function
`ZN6XmlRpc12XmlRpcSocket6listenEii':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:136:
undefined reference to `listen@8'
./xmlrpc/XmlRpcSocket.o(.text+0x1fa): In function
`ZN6XmlRpc12XmlRpcSocket6acceptEi':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:151:
undefined reference to `accept@12'
./xmlrpc/XmlRpcSocket.o(.text+0x23a): In function
`ZN6XmlRpc12XmlRpcSocket7connectEiRSsi':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:164:
undefined reference to `gethostbyname@4'
./xmlrpc/XmlRpcSocket.o(.text+0x290):E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:169:
undefined reference to `htons@4'
./xmlrpc/XmlRpcSocket.o(.text+0x2b1):E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:173:
undefined reference to `connect@12'
./xmlrpc/XmlRpcSocket.o(.text+0x383): In function
`ZN6XmlRpc12XmlRpcSocket6nbReadEiRSsPb':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:191:
undefined reference to `recv@16'
./xmlrpc/XmlRpcSocket.o(.text+0x49e): In function
`ZN6XmlRpc12XmlRpcSocket7nbWriteEiRSsPi':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:223:
undefined reference to `send@16'
./xmlrpc/XmlRpcSocket.o(.text+0x517): In function
`ZN6XmlRpc12XmlRpcSocket8getErrorEv':
E:/jdt/data/experiments/PlasticListener2/Debug/../xmlrpc/XmlRpcSocket.cpp:248:
undefined reference to `WSAGetLastError@0'

--
------------------------------------------------------------------------
AstroGrid/VOTech
&
WFAU, Institute for Astronomy, Edinburgh
Skype:johndavidtaylor <skype:johndavidtaylor?chat>

------------------------------------------------------------------------
*Gratuitous advertising:*
Plastic - http://plastic.sourceforge.net | AstroRuntime -
http://www2.astrogrid.org/desktop
AstroGrid - http://www.astrogrid.org | WFAU -
http://www.roe.ac.uk/ifa/wfau/

Wednesday, November 01, 2006

Weekly Summary 1/11/06

  • Debate about coverage in registry and possible solutions
  • Visit to Cambridge to cover Taverna
    • Link to Guy's summary
    • Side debate on merits of SourceForge over managing our own code
  • Discovered that with the exception of 2MASS, our cone searches aren't showing in AstroScope - should do soon following redeploy
  • Discovered many missing services from AstroGrid's registry...Kevin fixing....
  • Swotting up on Data Mining
  • Downloaded VOTechBroker
  • Following up ADASS