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:

Hi,

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>
    sys.exit(scanner_main(sys.argv))
  File "./giscanner/scannermain.py", line 538, in scanner_main
    ss = create_source_scanner(options, args)
  File "./giscanner/scannermain.py", line 446, in create_source_scanner
    ss.parse_files(filenames)
  File "./giscanner/sourcescanner.py", line 262, in parse_files
    self._parse(headers)
  File "./giscanner/sourcescanner.py", line 305, in _parse
    self._cpp_options)
  File "./giscanner/ccompiler.py", line 200, in preprocess
    extra_postargs=extra_postargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/unixccompiler.py", 
line 112, in preprocess
    self.spawn(pp_args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", 
line 875, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/spawn.py", 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/spawn.py", line 
139, in _spawn_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.6" but "10.13" during 
configure
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/ccompiler.py 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.

Regards,
John Ralls


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