Friday, July 4, 2008

[PORTS] contrib - fuzzystrmatch installation issue

Hi everyone,

I am running Postgres 8.3.3 on a CentOS box and I had a few issues when trying to install the fuzzystrmatch library. The library seemed to compile and make install correctly, but when I ran the sql scripts to add the functions to a database, I came up with this issue:

# psql -d template1 -U postgres -f fuzzystrmatch.sql
SET
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:fuzzystrmatch.sql:24: ERROR:  could not find function "difference" in file "/usr/lib/pgsql/fuzzystrmatch.so"
psql:fuzzystrmatch.sql:28: ERROR:  could not find function "dmetaphone" in file "/usr/lib/pgsql/fuzzystrmatch.so"
psql:fuzzystrmatch.sql:32: ERROR:  could not find function "dmetaphone_alt" in file "/usr/lib/pgsql/fuzzystrmatch.so"

Apparently, these three functions did not compile into the module. I'm not much of a C/C++ programmer, but according to the Makefile, both object files were included in the resulting fuzzystrmatch shared object, and the three functions in question where definitely present in fuzzystrmatch.c to begin with.

The following is a list of symbols inside the shared object:

# nm libfuzzystrmatch.so
00002ee4 A __bss_start
00000938 t call_gmon_start
00002ec4 D _codes
00002ee4 b completed.1
00002d7c d __CTOR_END__
00002d78 d __CTOR_LIST__
         U __ctype_b_loc@@GLIBC_2.3
         U __ctype_toupper_loc@@GLIBC_2.3
         U CurrentMemoryContext
         w __cxa_finalize@@GLIBC_2.1.3
00001a64 T difference
         U DirectFunctionCall1
00001ae8 t __do_global_ctors_aux
0000095c t __do_global_dtors_aux
00002ebc d __dso_handle
00002d84 d __DTOR_END__
00002d80 d __DTOR_LIST__
00002d8c A _DYNAMIC
00002ee4 A _edata
         U elog_finish
         U elog_start
00002ee8 A _end
         U errcode
         U errfinish
         U errmsg
         U errstart
00001b18 T _fini
000009b8 t frame_dummy
00001d74 r __FRAME_END__
00001bd4 r __func__.2
00001ca4 r __func__.3
00001bc4 r __func__.5
00002e78 A _GLOBAL_OFFSET_TABLE_
         w __gmon_start__
00000830 T _init
00002d88 d __JCR_END__
00002d88 d __JCR_LIST__
         w _Jv_RegisterClasses
00000f7e t .L1027
000011d7 t .L1034
00001340 t .L110
000012f5 t .L180
000013a8 t .L185
00000d8f t .L208
00000eac t .L253
00001132 t .L254
00001096 t .L266
0000102d t .L392
00000e27 t .L487
00000f90 t .L667
00000f1d t .L760
0000105e t .L774
00000f40 t .L785
0000117f t .L789
00000d55 t .L83
000012a4 t .L874
0000116a t .L930
000011fe t .L932
00000f5c t .L977
000013c7 t .L98
00001251 t .L982
00000a24 T levenshtein
00000bf4 T Lookahead
         U MemoryContextAlloc
000016ac T metaphone
00000c24 T _metaphone
00001cb4 r my_finfo.0
00001cb0 r my_finfo.1
00001bd0 r my_finfo.4
00001bc0 r my_finfo.6
00002ec0 d p.0
         U pg_detoast_datum
00001a4c T pg_finfo_difference
00000a0c T pg_finfo_levenshtein
00000bdc T pg_finfo_metaphone
000018f8 T pg_finfo_soundex
00001bac r Pg_magic_data.7
000009f4 T Pg_magic_func
00001a00 T soundex
00001910 t _soundex
00002ee0 d soundex_table
         U textin
         U textout

The compiler didn't return any errors during the build process, leaving me clueless as to why it's not working correctly. Any help would be greatly appreciated.

Thanks,
Kenaniah Cerny

No comments: