Building under 1.9.2

Issue #20 resolved
cehoffman created an issue

I got the repository today and tried building the gem under 1.9.2 since there isn't an official release out yet that includes the encoding fixes for Postgres.

I found that I wasn't able to load rake at all because of a problem finding the rake files under the rake directory. I solved the problem by adding the following to the BEGIN section of the main Rakefile:

{{{
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
}}}

I think this came up because 1.9.2 removed '.' from the $LOAD_PATH. The same problem also occurred when running the specs and fixed by adding the same to the BEGIN section of spec/m17n_spec.rb. There may be other places it is needed that I don't know of.

Exact version I was using:
{{{
ruby 1.9.2dev (2010-01-28 trunk 26458) [x86_64-darwin10.2.0]
}}}

Also, just wondering if the spec '- should not read past the end of a large object' is supposed to be failing right now in lo_create. I tried it under 1.8.7-p248 and 1.9.2.

Comments (7)

  1. Michael Granger repo owner
    • changed status to open

    Thanks for the report and the patch! I'll apply it soon.

    None of the specs should be failing -- what version of PostgreSQL are you testing on/against?

  2. cehoffman reporter

    I'm using 8.4.2. Installed from the homebrew package manager for OS X found here http://github.com/mxcl/homebrew.

    Since it isn't supposed to be failing, I tried messing with the formula and set the CFLAGS to use -O3 instead of -O4 and the spec now passes. Is the spec being too critical or do you think a bug is being introduced by the -O4 flag?

  3. Michael Granger repo owner

    I don't really know what the differences between -O3 and -O4 are, so I don't know that it's a bug with -O4, but then I don't know how the spec was failing, either. I don't think the spec isn't being too critical, however. The memory past the large object was uninitialized before the fix this spec tests was introduced; the spec is just testing that if you ask for 10 bytes and the lobj only has 6, it doesn't give you back 4 garbage bytes at the end of your file content.

  4. cehoffman reporter

    I've talked with the distribution maintainers and it was agreed to switch the default flag to -O3 since postgresql seems to be sensitive to -O4.

  5. Log in to comment