Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#19583 closed defect (fixed)

py26-wxpython wrongfully decides to build himself universal — at Version 4

Reported by: Veence (Vincent) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc:
Port: py26-wxpython

Description (last modified by ryandesign (Ryan Carsten Schmidt))

While wxwidgets is not universal (yet), because of dependencies on Carbon and Quicktime, py26-wxpython, when compiled on a universal python 2.6 environnement, tries to build himself universal, probably because it picks up the flags used for python 2.6 compiling during setup. Consequency: it fails miserably here:

src/mac/_gdi_wrap.cpp: In function 'PyObject* _wrap_Font_MacGetATSUFontID(PyObject*, PyObject*)':
src/mac/_gdi_wrap.cpp:15883: error: 'class wxFont' has no member named 'MacGetATSUFontID'

because in the definition of the wxFont class, we read:

#ifndef __LP64__    
    // 'old' Quickdraw accessors
    short MacGetFontNum() const;
    short MacGetFontSize() const;
    wxByte  MacGetFontStyle() const;

    // 'new' ATSUI accessors
    wxUint32 MacGetATSUFontID() const;
    wxUint32 MacGetATSUAdditionalQDStyles() const;
    wxUint16 MacGetThemeFontID() const ;

    // Returns an ATSUStyle not ATSUStyle*
    void* MacGetATSUStyle() const ;
#else
    const void * MacGetCTFont() const;
    // soon to be removed for 64bit, Returns an ATSUStyle not ATSUStyle*
    void* MacGetATSUStyle() const ;
#endif

the wxFont class not being the same on 32 and 64-bit mode.

Any idea to patch this up?

Change History (4)

comment:1 Changed 15 years ago by Veence (Vincent)

Well, adding CFLAGS="" and CXXFLAGS="" to the build.env line solves build problem, but another then appears :

Python 2.6 (r26:66714, Nov 19 2008, 14:55:25) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from wx import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/pkg/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/usr/pkg/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module>
    import _core_
ImportError: dynamic module does not define init function (init_core_)

whatever python is run in 32 or 64-bit mode...

comment:2 Changed 15 years ago by Veence (Vincent)

Well, after all it is somehow related to architecture. I filtered out all .so modules to leave only i386 files:

file *.so
_animate.so:   Mach-O bundle i386
_aui.so:       Mach-O bundle i386
_calendar.so:  Mach-O bundle i386
_combo.so:     Mach-O bundle i386
_controls_.so: Mach-O bundle i386
_core_.so:     Mach-O bundle i386
_gdi_.so:      Mach-O bundle i386
_gizmos.so:    Mach-O bundle i386
_glcanvas.so:  Mach-O bundle i386
_grid.so:      Mach-O bundle i386
_html.so:      Mach-O bundle i386
_media.so:     Mach-O bundle i386
_misc_.so:     Mach-O bundle i386
_richtext.so:  Mach-O bundle i386
_stc.so:       Mach-O bundle i386
_webkit.so:    Mach-O bundle i386
_windows_.so:  Mach-O bundle i386
_wizard.so:    Mach-O bundle i386
_xrc.so:       Mach-O bundle i386

I run a i386 python

-> file /usr/pkg/bin/python
/usr/pkg/bin/python: Mach-O executable i386
-> python
Python 2.6 (r26:66714, Nov 19 2008, 14:55:25) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from wx import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/pkg/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/usr/pkg/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module>
    import _core_
ImportError: dlopen(/usr/pkg/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core_.so, 2): no suitable image found.  Did find:
	/usr/pkg/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core_.so: mach-o, but wrong architecture

??? How a 32-bit code can possibly require to dynamically link with a 64-bit piece ???

comment:3 Changed 15 years ago by Veence (Vincent)

Description: modified (diff)
Resolution: fixed
Status: newclosed

Ok, gotcha. Sorry for the noise.

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

I'm setting the ticket description back to what it originally was and moving your note into your comment above.

I'm not sure though from the text in this ticket what the resolution to this issue turned out to be.

Note: See TracTickets for help on using tickets.