1

I'm trying to set up a database and have to create a function:

create or replace function uuid() returns uuid as 'moss_uuidgen', 'moss_uuidgen' language 'C' strict;

Every time I execute that postgre tells me that in the .so file there is an undefined symbol called palloc I know this version of Postgresql is outdated but it seems to be the only version working with my project. Does anyone know why postgre doesn't seem to know palloc?

moss=# create or replace function uuid() returns uuid as 'moss_uuidgen',
moss-# 'moss_uuidgen' language 'C' strict;
FEHLER:  konnte Bibliothek »/usr/lib/postgresql/8.4/lib/moss_uuidgen.so« nicht laden: /usr/lib/postgresql/8.4/lib/moss_uuidgen.so: undefined symbol: palloc
moss=# \q
moss@McWiki:/usr/local$

the source file is avialble here: https://foundry.openuru.org/hg/MOSS/file/3e78d60a5282/postgresql I build the files using make and make install. OS: Ubuntu Server 20.04 LTS with Postgre 8.4

McLayan
  • 21
  • 6
  • 3
    You should show the **full, exact error message text**. Always. Not a vague description of it. Details like the operating system and version, how you compiled your custom extension (?), etc would be rather useful too... – Craig Ringer Dec 19 '15 at 10:18
  • Sorry, my os is Ubuntu Server 12.04 LTS. The errormessage is in german, so I guess it is not very useful. I build the files using make and make install. – McLayan Dec 19 '15 at 11:26
  • Thanks for the error detail. I see you are using PGXS in your build as well. It should ensure that the library is correctly linked to the `postgres` executable and has symbols for `palloc` etc. I find this exceedingly odd. Have you customised/recompiled PostgreSQL its self at all? Or are you using stock Ubuntu packages? What is the output of `nm /usr/lib/postgresql/8.4/lib/moss_uuidgen.so`? (add as edit, or pastebin if it's too long) and `nm /usr/lib/postgresql/8.4/bin/postgres | grep palloc` – Craig Ringer Dec 19 '15 at 11:49
  • I'd also want to see the output of `make all` after running `make clean` – Craig Ringer Dec 19 '15 at 11:54

1 Answers1

1

Thanks for the help, I realised that I build the files for psql 9.4 and tried to use it with psql 8.4, what was really dumb. Now afte rebuilding with 8.4 it works fine (at least to create the function, db is still not working with my gameserver)

McLayan
  • 21
  • 6