Re: [gtk-osx-users] Error when compiling gobject-introspection on macOS 10.13

On Sep 16, 2017, at 7:42 AM, Jiří Techet <techet gmail com> wrote:


I got the following error during jhbuild when compiling gobject-introspection:

  GISCAN   GLib-2.0.gir
Traceback (most recent call last):
  File "./g-ir-scanner", line 66, in <module>
  File "./giscanner/", line 538, in scanner_main
    ss = create_source_scanner(options, args)
  File "./giscanner/", line 446, in create_source_scanner
  File "./giscanner/", line 262, in parse_files
  File "./giscanner/", line 305, in _parse
  File "./giscanner/", line 200, in preprocess
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", 
line 112, in preprocess
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", 
line 875, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 
38, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 
139, in _spawn_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.6" but "10.13" during 
make[2]: *** [GLib-2.0.gir] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Error during phase build of gobject-introspection: ########## Error running make -j 9  *** [5/11]

My deployment target is 10.6 and it seems that the deployment target of python under macOS 10.13 is 10.13 
which leads to this error.

I don't know what the proper fix is but as a workaround I tried to add the following line into 
giscanner/ just before the call which causes the error:

os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.13"

This overrides the deployment target just for the run of the introspection script and makes it work. Not 
very nice though.

That’s always been true. Build python as part of your project and include it in the bundle. Note that it 
needs openssl. Another user found that building both of them before bootstrapping allowed openssl to build 
and install without manual intervention, but I haven’t been able to get that to work for me.

BTW have you tested your build on a 10.6 system? When I tried to build for 10.6 using the 10.11 SDK it built 
but crashed when I tried to run on a 10.6 VM.

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]