Thread: Missing plpgsql.o Symbols on OS X

Missing plpgsql.o Symbols on OS X

From
"David E. Wheeler"
Date:
Hackers,

I’m trying to build Pavel’s plpgsql_check against the 9.4 beta on OS X 10.9, but get these errors:

 make
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv
-I/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/pl/plpgsql/src-bundle -multiply_defined suppress -o
plpgsql_check.soplpgsql_check.o -L/usr/local/pgsql/lib -L/usr/local/lib  -L/usr/local/lib -Wl,-dead_strip_dylibs
-bundle_loader/usr/local/pgsql/bin/postgres 
Undefined symbols for architecture x86_64:
  "_exec_get_datum_type", referenced from:
      _check_target in plpgsql_check.o
  "_plpgsql_build_datatype", referenced from:
      _check_stmt in plpgsql_check.o
  "_plpgsql_compile", referenced from:
      _check_plpgsql_function in plpgsql_check.o
  "_plpgsql_parser_setup", referenced from:
      _prepare_expr in plpgsql_check.o
  "_plpgsql_stmt_typename", referenced from:
      _put_error in plpgsql_check.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [plpgsql_check.so] Error 1

Which is odd, because plpgsql_check.c includes plpgsql.h, and those symbols do appear to be in plpgsql.so:

> nm /usr/local/pgsql/lib/plpgsql.so | grep _exec_get_datum_type
000000000000f110 T _exec_get_datum_type
000000000000f380 T _exec_get_datum_type_info

So, uh, what gives? Do I need to something extra to get it to properly find plpgsql.so?

Thanks,

David


Attachment

Re: Missing plpgsql.o Symbols on OS X

From
Guillaume Lelarge
Date:

Hey David,

Are you sure you wanted to send this to the PgAdmin hackers list?

Le 26 août 2014 22:34, "David E. Wheeler" <david@justatheory.com> a écrit :
Hackers,

I’m trying to build Pavel’s plpgsql_check against the 9.4 beta on OS X 10.9, but get these errors:

 make
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv  -I/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/pl/plpgsql/src -bundle -multiply_defined suppress -o plpgsql_check.so plpgsql_check.o -L/usr/local/pgsql/lib -L/usr/local/lib  -L/usr/local/lib -Wl,-dead_strip_dylibs   -bundle_loader /usr/local/pgsql/bin/postgres
Undefined symbols for architecture x86_64:
  "_exec_get_datum_type", referenced from:
      _check_target in plpgsql_check.o
  "_plpgsql_build_datatype", referenced from:
      _check_stmt in plpgsql_check.o
  "_plpgsql_compile", referenced from:
      _check_plpgsql_function in plpgsql_check.o
  "_plpgsql_parser_setup", referenced from:
      _prepare_expr in plpgsql_check.o
  "_plpgsql_stmt_typename", referenced from:
      _put_error in plpgsql_check.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [plpgsql_check.so] Error 1

Which is odd, because plpgsql_check.c includes plpgsql.h, and those symbols do appear to be in plpgsql.so:

> nm /usr/local/pgsql/lib/plpgsql.so | grep _exec_get_datum_type
000000000000f110 T _exec_get_datum_type
000000000000f380 T _exec_get_datum_type_info

So, uh, what gives? Do I need to something extra to get it to properly find plpgsql.so?

Thanks,

David

Re: Missing plpgsql.o Symbols on OS X

From
"David E. Wheeler"
Date:
On Aug 27, 2014, at 12:06 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:

> Are you sure you wanted to send this to the PgAdmin hackers list?

Crap, sorry, I typed “hackers” and let it go when I saw “pg” in autocomplete. Apologies --- and thanks for bringing it
tomy attention! 

David


Attachment