Date: Sat, 18 May 2013 12:35:31 -0500 (CDT) From: Lawrence Chen <beastie@tardisi.com> To: FreeBSD-gnats-submit@freebsd.org Cc: beastie_t@lhaven.homeip.net Subject: ports/178748: [patch] lang/python27: dbm module fails to build Message-ID: <201305181735.r4IHZVqQ094212@zen.lhaven.homeip.net> Resent-Message-ID: <201305181740.r4IHe0Wi059271@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178748 >Category: ports >Synopsis: [patch] lang/python27: dbm module fails to build >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 18 17:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Lawrence Chen >Release: FreeBSD 9.1-RELEASE-p3 amd64 >Organization: >Environment: System: FreeBSD zen.lhaven.homeip.net 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: During upgrade from 2.7.3 to 2.7.5, noticed it complaining that .../lib-dynload/dbm.so was missing. pkg_delete: file '/usr/local/lib/python2.7/lib-dynload/dbm.so' doesn't exist Also see that it is missing in the new version, instead there's a dbm_failed.so. >How-To-Repeat: Do the build, see in make output: Failed to build these modules: dbm >Fix: Looking more closely, it appears to be complaining about a missing symbol 'gdbm_errno', which is found in -lgdbm. So, it appears the build should be linking with both -lgdbm_compat and -lgdbm. Which is confirmed by the LINKING section of gdbm(3). --- python27.patch begins here --- --- files/patch-setup.py.orig 2013-05-16 23:17:22.000000000 -0500 +++ files/patch-setup.py 2013-05-18 12:12:25.565720393 -0500 @@ -1,5 +1,5 @@ ---- setup.py.orig 2013-04-06 18:02:41.000000000 +0400 -+++ setup.py 2013-04-07 10:52:47.000000000 +0400 +--- setup.py.orig 2013-05-11 22:32:54.000000000 -0500 ++++ setup.py 2013-05-18 12:12:10.844719548 -0500 @@ -33,7 +33,7 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) @@ -9,7 +9,7 @@ def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -720,7 +720,7 @@ +@@ -721,7 +721,7 @@ # use the same library for the readline and curses modules. if 'curses' in readline_termcap_library: curses_library = readline_termcap_library @@ -18,7 +18,7 @@ curses_library = 'ncursesw' elif self.compiler.find_library_file(lib_dirs, 'ncurses'): curses_library = 'ncurses' -@@ -755,7 +755,7 @@ +@@ -756,7 +756,7 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + @@ -27,7 +27,7 @@ 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], -@@ -862,6 +862,8 @@ +@@ -863,6 +863,8 @@ # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash exts.append( Extension('_sha256', ['sha256module.c']) ) exts.append( Extension('_sha512', ['sha512module.c']) ) @@ -36,7 +36,7 @@ # Modules that provide persistent dictionary-like semantics. You will # probably want to arrange for at least one of them to be available on -@@ -1208,7 +1210,7 @@ +@@ -1209,7 +1211,7 @@ sysroot = macosx_sdk_root() f = os.path.join(sysroot, f[1:]) @@ -45,7 +45,23 @@ data = open(f).read() m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) if m is not None: -@@ -1338,12 +1340,13 @@ +@@ -1249,8 +1251,13 @@ + 'ndbm'): + ndbm_libs = ['ndbm'] + elif self.compiler.find_library_file(lib_dirs, +- 'gdbm_compat'): +- ndbm_libs = ['gdbm_compat'] ++ 'gdbm'): ++ ndbm_libs = ['gdbm'] ++ if self.compiler.find_library_file(lib_dirs, ++ 'gdbm_compat'): ++ ndbm_libs.append('gdbm_compat') ++ else: ++ ndbm_libs = [] + else: + ndbm_libs = [] + print "building dbm using ndbm" +@@ -1339,12 +1346,13 @@ # provided by the ncurses library. panel_library = 'panel' if curses_library.startswith('ncurses'): @@ -60,7 +76,7 @@ libraries = curses_libs) ) elif curses_library == 'curses' and host_platform != 'darwin': # OSX has an old Berkeley curses, not good enough for -@@ -1356,6 +1359,7 @@ +@@ -1357,6 +1365,7 @@ curses_libs = ['curses'] exts.append( Extension('_curses', ['_cursesmodule.c'], @@ -68,7 +84,7 @@ libraries = curses_libs) ) else: missing.append('_curses') -@@ -1540,7 +1544,7 @@ +@@ -1541,7 +1550,7 @@ macros = dict() libraries = [] @@ -77,7 +93,7 @@ # FreeBSD's P1003.1b semaphore support is very experimental # and has many known problems. (as of June 2008) macros = dict() -@@ -1592,7 +1596,7 @@ +@@ -1593,7 +1602,7 @@ missing.append('linuxaudiodev') if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', @@ -86,7 +102,7 @@ or host_platform.startswith("gnukfreebsd")): exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) else: -@@ -2176,9 +2180,7 @@ +@@ -2177,9 +2186,7 @@ ext_modules=[Extension('_struct', ['_struct.c'])], # Scripts to install --- python27.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305181735.r4IHZVqQ094212>