| Issue 1: | uuid.sql script fails with error: undefined symbol: uuid_generate_random | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Follow the steps in the readme.
2. Run the included uuid.sql file
Output:
> psql -f uuid.sql
~/develop/api/ssbe-alarm-trunk/web/vendor/polarrose-postgresql-uuid
psql:uuid.sql:4: ERROR: type "uuid" does not exist
CREATE TYPE
psql:uuid.sql:11: NOTICE: return type uuid is only a shell
psql:uuid.sql:11: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:14: NOTICE: argument type uuid is only a shell
psql:uuid.sql:14: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:20: ERROR: function uuid_in(cstring) does not exist
psql:uuid.sql:23: NOTICE: return type uuid is only a shell
psql:uuid.sql:23: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:28: NOTICE: argument type uuid is only a shell
psql:uuid.sql:28: NOTICE: argument type uuid is only a shell
psql:uuid.sql:28: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:31: NOTICE: argument type uuid is only a shell
psql:uuid.sql:31: NOTICE: argument type uuid is only a shell
psql:uuid.sql:31: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:34: NOTICE: argument type uuid is only a shell
psql:uuid.sql:34: NOTICE: argument type uuid is only a shell
psql:uuid.sql:34: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:37: NOTICE: argument type uuid is only a shell
psql:uuid.sql:37: NOTICE: argument type uuid is only a shell
psql:uuid.sql:37: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:40: NOTICE: argument type uuid is only a shell
psql:uuid.sql:40: NOTICE: argument type uuid is only a shell
psql:uuid.sql:40: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:43: NOTICE: argument type uuid is only a shell
psql:uuid.sql:43: NOTICE: argument type uuid is only a shell
psql:uuid.sql:43: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:50: ERROR: type "uuid" is only a shell
psql:uuid.sql:56: ERROR: type "uuid" is only a shell
psql:uuid.sql:64: ERROR: type "uuid" is only a shell
psql:uuid.sql:70: ERROR: type "uuid" is only a shell
psql:uuid.sql:76: ERROR: type "uuid" is only a shell
psql:uuid.sql:85: ERROR: type "uuid" is only a shell
psql:uuid.sql:90: NOTICE: argument type uuid is only a shell
psql:uuid.sql:90: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:92: ERROR: type "uuid" is only a shell
psql:uuid.sql:95: NOTICE: return type uuid is only a shell
psql:uuid.sql:95: ERROR: could not load library
"/usr/lib64/postgresql/uuid.so": /usr/lib64/postgresql/uuid.so: undefined
symbol: uuid_generate_random
psql:uuid.sql:97: ERROR: type "uuid" is only a shell
What version of the product are you using? On what operating system?
Latest from TRUNK. Gentoo, kernel 2.6.20, postgres 8.2.4
Please provide any additional information below.
It looks like uuid.c references uuid_generate_random() on line 40, but
nowhere do I see that function defined.
Sep 6, 2007
Had a similar problem: 'psql:uuid.sql:14: ERROR: could not load library "/usr/lib/postgresql/8.2/lib/uuid.so": /usr/lib/postgresql/8.2/lib/uuid.so: undefined symbol: uuid_parse' This is what I did to install it on Ubuntu 7.04, PostgreSQL 8.2.4, 32 bits: - First, apt-get install uuid-dev postgresql-server-dev-8.2 - Then, follow instructions from README.uuid. This will result in the error described above. - Look at the output of make, and rerun the commands manually: rerun the first command verbatim; rerun the second but add /lib/libuuid.so.1.2 at the end (or whatever version that uuid-dev installed). So I changed "cc -shared -o uuid.so uuid.o" to "cc -shared -o uuid.so uuid.o /lib/libuuid.so.1.2". - sudo make install - psql -f uuid.sql I don't think statically compiling libuuid.so into uuid.so like this is the best way. Anyone know a better way to let postgres know about the libuuid.so library?
Sep 6, 2007
Thats pretty much what I ended up doing, too. I edited the makefile to make it like what I found on a "writing postgres extensions" tutorial. They had the simple case as exactly the same as the included makefile, but then had another section on "what to do if you need to include external libraries" and had something like this makefile that I have attached.
Nov 24, 2007
I got a slightly different error message when running uuid.sql (sorry, don't have the exact text available any more), but it complained about 'uuid_parse'. The cause seemed to be the same, that libuuid.so was not linked to uuid.so. I used the same basic fix, but let most of the PGXS stuff in place. It would be great if something like this could be committed to subversion. |
It looks like the uuid_generate_random comes from e2fsprogs. Just wanted to add that my version of that is: e2fsck 1.39 (29-May-2006) Using EXT2FS Library version 1.39, 29-May-2006 changing the function from from uuid_generate_random to uuid_generate seemed to work better, however, it results in: undefined symbol: uuid_unparse_lower. Changing it to uuid_unparse hasn't helped.