Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#32329 closed defect (fixed)

tk +quartz fails to build on Lion

Reported by: ngativ@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: calsaiwing@…, francis@…, jkeane@…, alun.j.carr@…, tonycpsu@…, nonstop.server@…
Port: tk

Description (last modified by anddam (Andrea D'Amore))

Compilation fails:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.11/unix/../macosx/tkMacOSXDraw.c:2016:19: warning: incompatible integer to pointer conversion assigning to 'const BitMap *' (aka 'const struct BitMap *') from 'int'
:info:build     stippleBitmap = GetPortBitMapForCopyBits(stipplePort);
:info:build                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build 50 warnings and 5 errors generated.
:info:build make: *** [tkMacOSXDraw.o] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.11/unix'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.11/unix" && /usr/bin/make -j3 -w all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for tk): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for tk is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/main.log

Attachments (1)

main.log (60.9 KB) - added by ngativ@… 13 years ago.

Download all attachments as: .zip

Change History (15)

Changed 13 years ago by ngativ@…

Attachment: main.log added

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to mww@…
Port: tk added
Summary: tk +quartz fails to buildtk +quartz fails to build on Lion

Yup, looks like it's using parts of QuickDraw that are gone in Lion. Sorry. Not something we're likely to be able to fix. Report the problem to the developers of tk. See also #20799 for previous problems with this.

comment:2 Changed 13 years ago by calsaiwing@…

Cc: calsaiwing@… added

Cc Me!

comment:3 Changed 13 years ago by francis@…

Cc: francis@… added

Cc Me!

comment:4 Changed 13 years ago by francis@…

Those QuickDraw functions are actually still available in Lion, they're just not included in the headers in the 10.7 SDK. tk +quartz can be built on Lion by using the 10.6 SDK (port install tk +quartz configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk).

The best solution would be for the dependency on QuickDraw to be removed upstream, but in the meantime I think that a good workaround would be to set configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk when building tk +quartz on Lion.

comment:5 Changed 13 years ago by jkeane@…

Cc: jkeane@… added

Cc Me!

comment:6 in reply to:  4 ; Changed 13 years ago by jkeane@…

Replying to francis@…:

Those QuickDraw functions are actually still available in Lion, they're just not included in the headers in the 10.7 SDK. tk +quartz can be built on Lion by using the 10.6 SDK (port install tk +quartz configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk).

The best solution would be for the dependency on QuickDraw to be removed upstream, but in the meantime I think that a good workaround would be to set configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk when building tk +quartz on Lion.

This might be only my ineptitude but in order to help save someone else's time it should be noted that you must clean tk installation files (port clean tk) before this command will have any effect.

comment:7 in reply to:  6 ; Changed 13 years ago by jkeane@…

Replying to jkeane@…:

Replying to francis@…:

Those QuickDraw functions are actually still available in Lion, they're just not included in the headers in the 10.7 SDK. tk +quartz can be built on Lion by using the 10.6 SDK (port install tk +quartz configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk).

The best solution would be for the dependency on QuickDraw to be removed upstream, but in the meantime I think that a good workaround would be to set configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk when building tk +quartz on Lion.

This might be only my ineptitude but in order to help save someone else's time it should be noted that you must clean tk installation files (port clean tk) before this command will have any effect.

Unfortunately I'm having problems when trying to build tkinter subsequent to installing tk +quartz. After specifying the 10.6 SDK tk +quartz installs, but when I try to install tkinter I get the error:

Error: tk cannot be installed for the configured universal_archs 'x86_64 i386' because it only supports the arch(s) 'i386 ppc'.

I've tried commenting out the supported_archs in the tk Portfile, but then I get different errors when building tk +quartz

comment:8 Changed 13 years ago by alun.j.carr@…

Cc: alun.j.carr@… added

Cc Me!

comment:9 in reply to:  7 Changed 13 years ago by dave@…

Unfortunately I'm having problems when trying to build tkinter subsequent to installing tk +quartz. After specifying the 10.6 SDK tk +quartz installs, but when I try to install tkinter I get the error:

Error: tk cannot be installed for the configured universal_archs 'x86_64 i386' because it only supports the arch(s) 'i386 ppc'.

I've tried commenting out the supported_archs in the tk Portfile, but then I get different errors when building tk +quartz

I'm stuck here too.

comment:10 Changed 12 years ago by tonycpsu@…

Cc: tonycpsu@… added

Cc Me!

comment:11 Changed 12 years ago by breiter (Brian Reiter)

The above workaround to use the QuickDraw functions defined in the 10.6 SDK does not work with Xcode 4.3.3 (or, I suspect any version of Xcode distributed by the App store). The App store versions of Xcode put the Snow Leopard platform SKD into /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk, but that path will fail with the installation script which does a test for /Developer

In order to build quartz tk x86_64 on Lion with Xcode 4.3.3 I had to symlink /Developer into the guts of the Xcode app bundle.

$ sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer
$ sudo clean tk
$ sudo port install tk configure.sdkroot=/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/
--->  Computing dependencies for tk
--->  Dependencies to be installed: pkgconfig
--->  Fetching archive for tk
--->  Attempting to fetch tk-8.5.11_0+quartz.darwin_11.i386.tbz2 from http://packages.macports.org/tk
--->  Fetching distfiles for tk
--->  Verifying checksum(s) for tk
--->  Extracting tk
--->  Configuring tk
--->  Building tk
--->  Staging tk into destroot
--->  Installing tk @8.5.11_0+quartz
--->  Activating tk @8.5.11_0+quartz
--->  Cleaning tk
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

comment:12 Changed 12 years ago by nonstop.server@…

Cc: nonstop.server@… added

Cc Me!

comment:13 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

This is as fixed as it's going to get without upstream changes as of r97617. Still won't build with Xcode 4.4+ as it lacks a 10.6 SDK.

comment:14 Changed 11 years ago by anddam (Andrea D'Amore)

Description: modified (diff)
Note: See TracTickets for help on using tickets.