pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Cannot build Python 3.4 on Mac OS X (pkgsrc HEAD)



On 1/2/15 7:54 AM, Benny Siegert wrote:
> Hi!
> 
> I am trying to build python34-3.4.2 (from HEAD) on my Mac OS 10.10.1
> box. I get this at the end of the compilation:
> 
> Python build finished successfully!
> The necessary bits to build these optional modules were not found:
> _dbm                  _gdbm                 _sqlite3
> nis                   ossaudiodev           spwd
> zlib

Hello.

I just tried now from pkgsrc-current on OS X Yosemite (10.10.1) with
Xcode 6.1.1 and got a similar failure, but mine did *not* have a problem
building the zlib module.

Below is a patch against pkgsrc-current that fixes the problem for me.
Would a developer be willing to commit it?  The same fix will apply to
pkgsrc-2014Q4, so would a developer be willing to also submit a pull-up
request for that?  Thank you!

My failure looked like this:

=== console ===
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_dbm                  _gdbm                 _sqlite3
nis                   ossaudiodev           spwd
===============

And later like this (because the expected modules were not being built):

=== console ===
=> Automatic manual page handling
pkg_create: can't stat `/pkgsrc-current/lang/python34/work/.destdir/pkg-current$
lib/python3.4/lib-dynload/_dbm.so'
pkg_create: can't stat `/pkgsrc-current/lang/python34/work/.destdir/pkg-current$
lib/python3.4/lib-dynload/nis.so'
=> Creating binary package /pkgsrc-current/lang/python34/work/.packages/python3$
-3.4.2.tgz
pkg_create: can't stat `/pkgsrc-current/lang/python34/work/.destdir/pkg-current$
lib/python3.4/lib-dynload/_dbm.so'
pkg_create: can't stat `/pkgsrc-current/lang/python34/work/.destdir/pkg-current$
lib/python3.4/lib-dynload/nis.so'
pkg_create: lstat failed for file lib/python3.4/lib-dynload/_dbm.so: No such fi$
e or directory
*** Error code 2

Stop.
bmake: stopped in /pkgsrc-current/lang/python34
*** Error code 1

Stop.
bmake: stopped in /pkgsrc-current/lang/python34
===============

I noticed that lang/python27/Makefile had the following:

=== lang/python27/Makefile snippet ===
# For Xcode 5 we need to search the SDK path for headers, otherwise certain
# modules will not be built.
.if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include)
CFLAGS+=		-I${OSX_SDK_PATH}/usr/include
.endif
======================================

I tried it, and it worked.  The patch slightly modifies the comment to
add " and up" after "Xcode 5".

Regards,

Lewis

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python34/Makefile,v
retrieving revision 1.7
diff -b -u -r1.7 Makefile
--- Makefile	9 Oct 2014 09:15:38 -0000	1.7
+++ Makefile	7 Jan 2015 23:14:04 -0000
@@ -76,6 +76,12 @@
 INSTALL_UNSTRIPPED=	yes
 .endif
 
+# For Xcode 5 and up we need to search the SDK path for headers, otherwise
+# certain modules will not be built.
+.if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include)
+CFLAGS+=		-I${OSX_SDK_PATH}/usr/include
+.endif
+
 PLIST_VARS+=	bsddb dll nis no-nis
 .if ${OPSYS} == "IRIX"
 .  if ${ABI} == "64"


Home | Main Index | Thread Index | Old Index