Re: static or dynamic libpgport
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Bruce Momjian <bruce@momjian.us>
Cc: Steve Singer <ssinger@ca.afilias.info>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-12-10T17:28:38Z
Lists: pgsql-hackers
On 12/09/2011 06:27 PM, Bruce Momjian wrote:
>> In the Fedora world, a static lib would go in postgresql-devel, but a
>> dynamic lib would go in postgresql-libs, which is also where libpq is
>> shipped.
> I am not against shipping a dynamic libpgport, but I will just point out
> that this was never intended or anticipated. Are there any symbols in
> there that might conflict with other software?
Possibly. Below is a list of symbols from a recent build. The other
thing is we'd need to turn on flags that make the object suitable for a
dynamic library (e.g. -fpic). I'm not sure if that has any significant
impact - probably not or else people would avoid using them far more.
I think we should deal with this. Just Peter's and Steve's responses
upthread indicate a demand, and I came into this because a customer
encountered enormous difficulty in doing an out of tree build of a well
known piece of support software, so this is clearly a pain point. If
we're not going to do it, we should probably think about adjusting
people's expectations.
[andrew@diego port]$ nm libpgport.a | grep ' T '
00000000 T strlcat
00000000 T strlcpy
00000000 T getpeereid
00000000 T pg_get_encoding_from_locale
00000000 T pgfnames
000001a0 T pgfnames_cleanup
000001e0 T rmtree
00000240 T find_my_exec
000005f0 T find_other_exec
00000500 T pclose_check
00000760 T set_pglocale_pgservice
00000000 T inet_net_ntop
00000030 T pg_set_block
00000000 T pg_set_noblock
00000280 T canonicalize_path
00000110 T first_dir_separator
00000140 T first_path_var_separator
00000800 T get_doc_path
00000720 T get_etc_path
00000860 T get_home_path
00000820 T get_html_path
00000740 T get_include_path
00000780 T get_includeserver_path
000007a0 T get_lib_path
000007e0 T get_locale_path
00000840 T get_man_path
000008e0 T get_parent_directory
00000760 T get_pkginclude_path
000007c0 T get_pkglib_path
00000690 T get_progname
00000700 T get_share_path
000001b0 T join_path_components
00000170 T last_dir_separator
000001a0 T make_native_path
00000560 T path_contains_parent_reference
00000630 T path_is_prefix_of_path
00000610 T path_is_relative_and_below_cwd
00000000 T pg_check_dir
00000000 T pg_mkdir_p
00000000 T pg_usleep
00000330 T pg_ascii_tolower
00000310 T pg_ascii_toupper
00000000 T pg_strcasecmp
00000100 T pg_strncasecmp
00000290 T pg_tolower
00000210 T pg_toupper
000000d0 T pg_qsort
000000f0 T qsort_arg
00000000 T simple_prompt
00000010 T pqGetpwuid
00000000 T pqStrerror
cheers
andrew