[Pythonmac-SIG] Re: Python on Mac OS X w/shared modules

Tony Lownds tony@metanet.com
Wed, 04 Oct 2000 14:35:55 -0700


>
> > b) made it so that just specifying --with-dyld= will make working shared
> > modules (basically, adds "-undefined suppress" to ld step)
>
>In bug report 115641
>(http://sourceforge.net/bugs/?func=detailbug&bug_id=115641&group_id=5470)
>the reporter claims that this will result in undefined symbols
>__eprintf and _environ when libtools is invoked. Can you see what his
>error was? How did you address this problem?

His error is caused by the fact that the system is recognized by configure 
as "next/" without my patch; I have found out that if it was recognized as 
"next/5" then --with-next framework will compile almost correctly, and will 
take care of the __eprintf and _environ symbols

I never got errors on the "restFP" and "saveFP" symbols.

I addressed it by making the system recognizable as something sane, and 
using the same LIBTOOL_CRUFT and LDSHARED as next/5

When I get back to my Mac I can  get some more details for you... 
essentially _environ should be left undefined (via ld's -U option), 
___eprintf is found using -lcc_dynamic

 > These changes to configure are pretty straightforward because they just
> > modify existing steps of the configure process. Its at
> > http://tony.lownds.com/macosx/ page.
>
>These patches look pretty good to me(*) - especially as they
>apparently don't interfere with any other configuration, so they can
>only improve things. Would you like to submit them to
>sourceforge.net:/projects/python?

Let me add some stuff to make --with-next-framework build correctly as well.

> > How do you think the FCNTL.py / fcntlmodule.so problem can be solved?

...

>On the case-insensitive case-preserving variants of DOS file systems
>(i.e. VFAT), opening a module involves reading the directory to see if
>the case on disk is the same as the expected case, see
>import.c:case_check. So if HFS is also case-preserving, a similar
>approach might work.

HFS+ is case-preserving. As long as fcntlmodule.so can't be imported 
*again* as FCNTLmodule.so, thereby causing a crash! The check_case stuff 
uses the Win32 api, but something like that will be necessary!

-Tony