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




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

Hi John,

that's strange. I don't need python at all for the project myself and there's no need to bundle it - it's 
just used when building gobject-introspection. Simple

jhbuild bootstrap && jhbuild build meta-gtk-osx-bootstrap && jhbuild build meta-gtk-osx-core 

used to work fine - now it fails when gobject-introspection starts compiling. I don't know, it may not be 
because of macOS 10.13 - it could also be because of some recent change in the modules (haven't tried them 
in the last 2 months).

Jiri

On Sat, Sep 16, 2017 at 5:30 PM, John Ralls <jralls ceridwen us> wrote:


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.

Jiri,

It might be a change in gobject-introspection. I don't remember it needing to link Libpython.

Regards,
John Ralls



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