You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2005/08/19 12:08:55 UTC

[jira] Updated: (MODPYTHON-65) 3.2 working version will not install on Mac OS X (10.3.7)

     [ http://issues.apache.org/jira/browse/MODPYTHON-65?page=all ]

Graham Dumpleton updated MODPYTHON-65:
--------------------------------------

    Attachment: setup.py.in-2.diff

Attached supplementary patch to only do this workaround when required,
ie., when version of Python doesn't have required option already.

Copy and paste from mailing list included below.

On 19/08/2005, at 7:57 AM, Graham Dumpleton wrote:

>
> On 19/08/2005, at 2:59 AM, Jim Gallacher wrote:
>
>
>> Ron Reisor wrote:
>>
>>> Hello,
>>> I ran into a problem with the loader on MacOSX.
>>> MaxOSX 1.4.2
>>> python 2.4.1
>>> apache 2.0.54
>>> The loader seems to not like the "-undefined suppress" arguments  
>>> in the final load.
>>> I modified dist/setup.py by removing the two "-undefined  
>>> suppress" and ran configure and make again and the new mod_python  
>>> does build and seems to work ok.
>>>
>>
>> The bit of code which includes "-undefined suppress" came from the  
>> patch Graham submitted for MODPYTHON-65.  See http:// 
>> issues.apache.org/jira/browse/MODPYTHON-65 for details.
>>
>> Not being a Mac person I can't comment further. Feel free to talk  
>> among yourselves. ;)
>>
>
> Yep, my fault. It will not build on Mac OS X 10.3.9 without that  
> option if
> you are using the standard version of GCC shipped with the operating
> system.
>
> I'll get onto my new Tiger laptop and try it there (haven't yet),  
> but can
> you tell me which GCC you are using? I know the GCC version shipped  
> on the
> box with Tiger, but are you using that, or are you using one  
> supplied with
> Fink? Was worried that the change might not apply to the Fink  
> version of GCC.

The missing bit of information here is that Python on Tiger (10.4) is  
correctly
putting in the config/Makefile used by distutils the required  
options. Ie.,

   LDSHARED=       $(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup
   BLDSHARED=      $(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup

The duplicated definition of the -undefined option causes grief when  
setup.py
adds it as well.

Thus, setup.py will thus need to check first whether the -undefined  
option
already exists. Thus, setup.py should use:

if sys.platform == "darwin":
         if not '-bundle' in sysconfig.get_config_var 
("LDSHARED").split():
             sysconfig._config_vars["LDSHARED"] = \
                     string.replace(sysconfig.get_config_var 
("LDSHARED"), \
                     " -bundle "," -bundle -flat_namespace -undefined  
suppress ")
             sysconfig._config_vars["BLDSHARED"] = \
                     string.replace(sysconfig.get_config_var 
("BLDSHARED"), \
                     " -bundle "," -bundle -flat_namespace -undefined  
suppress ")

In Tiger it actually uses '-undefined dynamic_lookup' instead of what  
I had
used which is '-undefined suppress'. If though you try and use '- 
undefined
dynamic_lookup' on Panther (10.3) or earlier you will run up against a
further problem in that '-undefined dynamic_lookup' conflicts with the
default compilation mode of being compatible with Mac OS X 10.1. Thus,
still probably best to use '-undefined suppress', but the check means  
that
it will only be used on older versions of Mac OS X anyway, or at  
least where
the Python config isn't correct.

I'll attach a patch to the JIRA report on the original problem shortly.

Graham

> 3.2 working version will not install on Mac OS X (10.3.7)
> ---------------------------------------------------------
>
>          Key: MODPYTHON-65
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-65
>      Project: mod_python
>         Type: Bug
>   Components: core
>     Versions: 3.2.0
>  Environment: Mac OS X (10.3.7)
>     Reporter: Graham Dumpleton
>      Fix For: 3.2.0
>  Attachments: setup.py.in-2.diff, setup.py.in.diff
>
> Something is wrong with configure or setup.py file.
> /usr/bin/python setup.py build
> running build
> running build_py
> running build_ext
> building 'mod_python_so' extension
> gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/mod_python.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/_apachemodule.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/connobject.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/filterobject.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/hlist.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/hlistobject.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/requestobject.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/serverobject.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/tableobject.o build/temp.darwin-7.7.0-Power_Macintosh-2.3/Users/grahamd/Workspaces/mod_python/src/util.o -L -lapr-0 -laprutil-0 -o build/lib.darwin-7.7.0-Power_Macintosh-2.3/mod_python_so.so
> ld: -L: directory name missing
> error: command 'gcc' failed with exit status 1
> More later when I have a chance to work out what is wrong.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Updated: (MODPYTHON-65) 3.2 working version will not install on Mac OS X (10.3.7)

Posted by Jim Gallacher <jg...@sympatico.ca>.
Patch has been applied to mod_python/trunk

Graham Dumpleton (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/MODPYTHON-65?page=all ]
> 
> Graham Dumpleton updated MODPYTHON-65:
> --------------------------------------
> 
>     Attachment: setup.py.in-2.diff
> 
> Attached supplementary patch to only do this workaround when required,
> ie., when version of Python doesn't have required option already.
>