about photos bookshelf portfolio blog home
Begin main content

Dealing with random Sybase client on Cygwin problems

For some random reason, all my cygwin software that links with the Sybase client started failing. I determined that when the Sybase dll's were being linked in the SYBASE environment variable is somehow being unset (or ignored) and the default value of c:/sql10 is being used. The tell tale error is:

The context allocation routine failed when it tried to load localization files!! One or more following problems may caused the failure

Your sybase home directory is c:\sql10. Check the environment variable SYBASE if it is not the one you want!
Cannot access file c:\sql10\ini\objectid.dat

I reall have no idea why this is, why it changed or how to fix it. After much searching I decided to use a hacky workaround instead, so here's what I did.

  • I made an empty directory c:\sql10
  • I copied the directories $SYBASE/locales and $SYBASE/charsets into c:\sql10 (these are static lookup data, so they never change unless you upgrade your client software).
  • I created an empty directory c:\sql10\ini
  • I added a line to my .bashrc to copy over the up to date ini data:
    rsync -r /cygdrive/c/SYBASE/ini/ /cygdrive/c/sql10/ini/
Pretty bogus but it works.

02:07 PM, 08 Mar 2006 by Mark Aufflick Permalink | Comments (1)

XML

Blog Categories

software (4)
  ..heads up 'tunes (4)

Notifications

Icon of Envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Mark Aufflick: all good ideas
  2. Unregistered Visitor: Excellent!
  3. Mark Aufflick: Hey thanks
  4. Unregistered Visitor: Fantastic entry
  5. Mark Aufflick: Bah - dashboard widgets
  6. Unregistered Visitor: Nice
  7. Mark Aufflick: elegant maths (as opposed to elegant rabbit)
  8. Unregistered Visitor: Does that really matter?
  9. Mark Aufflick: Inspiration
  10. Unregistered Visitor: Perhaps...