Archive

Archive for February, 2008

Compiling Firebird 2.1.0 for OSX using Mono 1.2.6

February 22nd, 2008 No comments

I’m thinking of doing a project with C#, and I’d like to use an embeddable database, so I browsed the interweb and found this interesting project: http://www.firebirdsql.org/. I think this project is one reason Firefox had to change it’s name a second time.

The source distribution for Firebird 2.1.0 has a solution file for building on Windows, and a couple makefiles to build at the command line. The only makefile that might have worked, NETProvider/build/linux/makefile contains odd errors that do not allow me to compile the sources successfully. This is the first error:

make
makefile:40: *** multiple target patterns. Stop.

First, I’m not sure why it’s in there, but it contains a start and end div tag. I’m pretty sure that’s not allowed in a makefile, so you can just remove the start and end tag. Inside the makefile, there are several make rules that span multiple lines, and they are not “continued” properly. The simplest fix is to remove the newlines for each of the rules that span more than one line. For example:

COMMON_RESOURCES =
-resource:${RESOURCES}/isc_error_msg.resources...

Needs to be changed to:

COMMON_RESOURCES = -resource:${RESOURCES}/isc_error_msg.resources...

This has to be repeated for SCHEMA_RESOURCES, and the newlines need to be removed from PROVIDER_FLAGS, PROVIDER_TESTS_FLAGS, the compile line of the UnitTests.dll rule, and the copy command that spans two lines.

Next, move the all: rule down to the targets section. I’m not sure why it’s so high in the makefile.

If you run make at this point, you’ll receive an error:

error CS1566: Error reading resource file `../../source/FirebirdSql/FirebirdSql/Data/Schema/FbMetaData.xml'

The SCHEMA_RESOURCES variable has an extra FirebirdSql in the path to FbMetaData.xml. You need to remove it.


error CS2001: Source file `../../source/FirebirdSql/Data/UnitTest/*.cs' could not be found

This error exists because that path should point to UnitTests. Change the PROVIDER_TESTS_SOURCES variable.

Since i don’t have nunit.framework.dll, I had to compile it and install it. I’m sure you can figure it out with google. I loaded the nunit_VS2005.sln file into Monodevelop and only compiled the nunit.framework.dll assembly, and installed it using gacutil -i nunit.framework.dll.

Next, -reference:System.Transactions.dll needs to be added to the PROVIDER_TESTS_FLAGS variable. Also, -reference:System.Configuration.dll needs to be added to the same variable to fix the error CS0103: The name `ConfigurationManager' does not exist in the current context messages.

After running make again, I got error CS3002: Return type of `FirebirdSql....BuildConnectionStringBuilder()' is not CLS-compliant and two other similar messages. Because I’m not a C# expert, I just googled it, and placed [CLSCompliantAttribute(false)] above all the offending methods in the BaseTests.cs file. You’ll also have to do the same for the offending method in FbConnectionTest.cs. I’m not worried if it’s compliant or not, since I just want to use it with C#.

After all this, it finally complies! Unfortunately, when I try to install it using the gacutil, it refuses:
Failure adding assembly to the cache: Attempt to install an assembly without a strong name.

I added -keyfile:FirebirdSql.Data.FirebirdClient.snk to the end of the FirebirdClient.dll compile command, and everything compiled and installed fine. I haven’t tested the library to tell if it works, but that’ll be another post.

Modified makefile

Categories: Programming Tags: , , ,

Water Fountain

February 12th, 2008 1 comment

For a year or two, I’ve kept a water filter pitcher on my desk to filter the water from the water fountain.  At first, I did it because I didn’t like the way the water tasted.  I’m not sure when they put the signs up, but within the last year or so they put this sign above the water fountains:

Water fountain at work

I’m not sure what’s in the water, or whether the sign was put there because someone complained, but I don’t think I’m going to be drinking any unfiltered water at work.

Categories: Miscellaneous Tags: , ,

Broken shaft…

February 11th, 2008 No comments

Thursday I was trying to remove the volume and tone knobs on my electric guitar so I could adjust the height of the knobs (two were touching the finish) and one of the potentiometer shafts broke.

IMGP3170

IMGP3171

Replacing the potentiometer shouldn’t be too hard, since I’m pretty good at soldiering and they are relatively cheap. I just have to worry about getting an appropriate sized pot for the Epiphone, since most of the parts on it are metric rather than the US sizes that Gibson uses.

New website layout

February 10th, 2008 No comments

I graduated with a Masters in Computer Science from UMBC in December, so now is a good time to update this site and start doing something with it. I mainly used it as an email address, and occasionally posted pictures in the gallery but I rarely use it for those purposes anymore (because of gmail and flickr).

I found a theme I maybe sorta liked and modified it slightly. It was originally too colorful for me so I dumbed it down a little! My goal now is just to write about anything. My life, my cooking adventures, my awesome guitar skills. Maybe I’ll try to create some useful web applications, but I’d have to think of an idea first. Sooooon, I’ll make some more additions to this site.

SSL plugin for WordPress

February 10th, 2008 No comments

Tonight, I searched for a method of forcing the WordPress installation to switch to a SSL connection for the login (at the very least).  I was pleasantly surprised that someone created a plugin to do exactly what I wanted!

Admin-SSL plugin

Categories: Miscellaneous Tags: