After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742486 - Don't bootstrap python on osx
Don't bootstrap python on osx
Status: RESOLVED OBSOLETE
Product: jhbuild
Classification: Infrastructure
Component: module sets
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2015-01-06 22:17 UTC by Patrick Griffis (tingping)
Modified: 2021-05-17 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't bootstrap python on osx (2.60 KB, patch)
2015-01-06 22:17 UTC, Patrick Griffis (tingping)
rejected Details | Review

Description Patrick Griffis (tingping) 2015-01-06 22:17:32 UTC
Created attachment 293986 [details] [review]
Don't bootstrap python on osx

OSX has shipped with python 2.7 for multiple releases now so there is little value in building it.
Comment 1 Allison Karlitskaya (desrt) 2015-01-06 22:26:43 UTC
Review of attachment 293986 [details] [review]:

Being able to drop this dependency would be awesome, but we're going to need to try harder.

As you mentioned on IRC, doing this requires setting the PKG_CONFIG_PATH to the framework directory.  I don't consider that to be acceptable.

One idea is that we could add a <framework/> tag to system modules.  We would probably want to wrap that in <if condition-set="macos">...</if>.  In case this is specified we could look in the system framework directories and expand the PKG_CONFIG_PATH (and maybe also C_INCLUDE_PATH and so on) of any module that directly depends on that system module.  We would also use it to tweak the scanning during the sysdeps process.

For the libxml issue, I think we want to solve the problem that you're hitting upstream.  Packages should simply never try to install anything outside of --prefix, period.  We shouldn't have to use ./configure arguments to hack the package into behaving properly.
Comment 2 John Ralls 2015-01-06 23:03:02 UTC
If you're going to rely on pkg-config to detect the availability of python you're going to have to install a fake python.pc. The framework build of Python doesn't generate one, so you won't find it in either /System/Library nor in the SDK. Better to use python2.7-config, which works on all platforms.

Whatever you do, make sure that it works correctly when building against an SDK; the compiler and linker are told about that with the -isysroot flag.

FWIW the first version of OSX with Python 2.7 was Lion.
Comment 3 Patrick Griffis (tingping) 2015-01-06 23:22:05 UTC
>The framework build of Python doesn't generate one, so you won't find it
>in either /System/Library nor in the SDK.

On 10.10 at least it does exist in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig for me.

>For the libxml issue, I think we want to solve the problem that you're hitting
upstream. 

They clearly knew it was a problem as their hacky work around was add --with-python-install-dir in the last minor release.
Comment 4 Patrick Griffis (tingping) 2015-01-06 23:27:23 UTC
Oh also the current module for python fails to build for me on 10.10 with a lot of errors
such as:

    clang -L/Users/tingping/jhbuild/install/lib  -u _PyMac_Error -o python.exe \
	    		Modules/python.o \
		   	-L. -lpython2.7 -ldl  -framework CoreFoundation     
    building dbm using ndbm
    Undefined symbols for architecture x86_64:
      "_PyArg_UnpackTuple", referenced from:
        _unpack in _struct.o
      "_PyBool_FromLong", referenced from:
          _bu_bool in _struct.o
         _nu_bool in _struct.o
Comment 5 John Ralls 2015-01-07 02:19:52 UTC
(In reply to comment #3)
> >The framework build of Python doesn't generate one, so you won't find it
> >in either /System/Library nor in the SDK.
> 
> On 10.10 at least it does exist in
> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig for me.
>
 
Hmph. So it does, I wonder what I told `find` wrong. I still don't find it in the SDK, which is what you want to build against if you're going to distribute a binary.

> >For the libxml issue, I think we want to solve the problem that you're hitting
> upstream. 
> 
> They clearly knew it was a problem as their hacky work around was add
> --with-python-install-dir in the last minor release.

The commit message says that that's not what they had in mind, and claims that it will have no effect except when cross-compiling. I've no doubt that you tested it and found otherwise.
Comment 6 GNOME Infrastructure Team 2021-05-17 16:01:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/jhbuild/-/issues/210.