{"action":"created","issue":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/241","labels_url":"https://api.github.com/repos/mesonbuild/meson/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/mesonbuild/meson/issues/241/comments","events_url":"https://api.github.com/repos/mesonbuild/meson/issues/241/events","html_url":"https://github.com/mesonbuild/meson/issues/241","id":102911347,"number":241,"title":"Failure/Traceback calling import('gnome') when gobject-introspection-1.0 is missing","user":{"login":"thiblahute","id":83553,"avatar_url":"https://avatars.githubusercontent.com/u/83553?v=3","gravatar_id":"","url":"https://api.github.com/users/thiblahute","html_url":"https://github.com/thiblahute","followers_url":"https://api.github.com/users/thiblahute/followers","following_url":"https://api.github.com/users/thiblahute/following{/other_user}","gists_url":"https://api.github.com/users/thiblahute/gists{/gist_id}","starred_url":"https://api.github.com/users/thiblahute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiblahute/subscriptions","organizations_url":"https://api.github.com/users/thiblahute/orgs","repos_url":"https://api.github.com/users/thiblahute/repos","events_url":"https://api.github.com/users/thiblahute/events{/privacy}","received_events_url":"https://api.github.com/users/thiblahute/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mesonbuild/meson/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mesonbuild/meson/labels/gnome","name":"gnome","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-24T23:17:01Z","updated_at":"2015-08-25T08:22:49Z","closed_at":null,"body":"Cross compiling [gstreamer](https://github.com/jpakkane/gstreamer) with this cross compile file:\r\n\r\n```\r\n[binaries]\r\nc = 'x86_64-w64-mingw32-gcc'\r\ncpp = 'x86_64-w64-mingw32-g++'\r\nar = 'x86_64-w64-mingw32-ar'\r\nstrip = 'x86_64-w64-mingw32-strip'\r\nexe_wrapper = 'wine'\r\npkgconfig = 'pkg-config'\r\n\r\n[properties]\r\nsizeof_int = 4\r\nsizeof_wchar_t = 4\r\nsizeof_char = 1\r\nsizeof_void* = 4\r\nsizeof_long = 8\r\nsizeof_short = 2\r\n\r\nalignment_char = 1\r\nalignment_void* = 4\r\nalignment_double = 4 # Don't know if this is correct...\r\n\r\nhas_function_printf = true\r\nhas_function_hfkerhisadf = false\r\n\r\n[host_machine]\r\nsystem = 'windows'\r\ncpu = 'x86_64'\r\nendian = 'little'\r\n```\r\n\r\nLeads to (when calling importing(\"gnome\")):\r\n\r\n```\r\nmeson build  --cross-file ubuntu-mingw.txt\r\nThe Meson build system\r\nVersion: 0.26.0-research\r\nSource dir: /home/thiblahute/devel/misc/gstreamer\r\nBuild dir: /home/thiblahute/devel/misc/gstreamer/build\r\nBuild type: cross build\r\nBuild machine cpu: x86_64\r\nHost machine cpu: x86_64\r\nTarget machine cpu: x86_64\r\nProject name: gstreamer-core\r\nNative c compiler: gcc (gcc 5.2.0)\r\nCross c compiler: x86_64-w64-mingw32-gcc (gcc 4.7.3)\r\nfixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046}\r\nNative cpp compiler: g++ (gcc 5.2.0)\r\nCross cpp compiler: x86_64-w64-mingw32-g++ (gcc 4.7.3)\r\nHas header \"dlfcn.h\": NO\r\nHas header \"inttypes.h\": YES\r\nHas header \"memory.h\": YES\r\nHas header \"poll.h\": NO\r\nHas header \"stdint.h\": YES\r\nHas header \"stdio_ext.h\": NO\r\nHas header \"strings.h\": YES\r\nHas header \"string.h\": YES\r\nHas header \"sys/param.h\": YES\r\nHas header \"sys/poll.h\": NO\r\nHas header \"sys/prctl.h\": NO\r\nHas header \"sys/socket.h\": NO\r\nHas header \"sys/stat.h\": YES\r\nHas header \"sys/times.h\": NO\r\nHas header \"sys/types.h\": YES\r\nHas header \"sys/utsname.h\": NO\r\nHas header \"sys/wait.h\": NO\r\nHas header \"ucontext.h\": NO\r\nHas header \"unistd.h\": YES\r\nHas header \"valgrind/valgrind.h\": NO\r\nHas header \"winsock2.h\": YES\r\nChecking for size of \"char\": 1\r\nChecking for size of \"int\": 4\r\nChecking for size of \"long\": 8\r\nChecking for size of \"short\": 2\r\nChecking for size of \"void*\": 4\r\nChecking for function \"gmtime_r\": NO\r\nChecking for function \"localtime_r\": NO\r\nChecking for function \"sigaction\": NO\r\nChecking for function \"fseeko\": YES\r\nChecking for function \"ftello\": YES\r\nChecking for function \"fsetpos\": YES\r\nChecking for function \"fgetpos\": YES\r\nChecking for function \"poll\": NO\r\nChecking for function \"pselect\": NO\r\nChecking for function \"posix_memalign\": NO\r\nChecking for function \"getpagesize\": NO\r\nChecking for type \"ptrdiff_t\": NO\r\nFound pkg-config: /mnt/data/devel/cerbero_workdir/build-tools/bin/pkg-config (0.28)\r\nCross dependency glib-2.0 found: YES 2.44.1\r\nCross dependency gobject-2.0 found: YES 2.44.1\r\nCross dependency gmodule-2.0 found: YES 2.44.1\r\nCross dependency gio-2.0 found: YES 2.44.1\r\nLibrary m found: NO\r\nProgram flex found: YES (/usr/bin/flex)\r\nProgram bison found: YES (/usr/bin/bison)\r\nProgram g-ir-scanner found: YES (/usr/bin/g-ir-scanner)\r\nWarning, glib compiled dependencies will not work until this upstream issue is fixed: https://bugzilla.gnome.org/show_bug.cgi?id=745754\r\nLibrary m found: NO\r\nProgram build_mkenum.py found: YES (/home/thiblahute/devel/misc/gstreamer/gst/build_mkenum.py)\r\nProgram gen_lex.py found: YES (/home/thiblahute/devel/misc/gstreamer/gst/parse/gen_lex.py)\r\nProgram gen_grammar.py found: YES (/home/thiblahute/devel/misc/gstreamer/gst/parse/gen_grammar.py)\r\nPackage gobject-introspection-1.0 was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `gobject-introspection-1.0.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'gobject-introspection-1.0' found\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/meson\", line 194, in run\r\n    app.generate()\r\n  File \"/usr/bin/meson\", line 135, in generate\r\n    intr.run()\r\n  File \"/usr/share/meson/interpreter.py\", line 953, in run\r\n    self.evaluate_codeblock(self.ast)\r\n  File \"/usr/share/meson/interpreter.py\", line 975, in evaluate_codeblock\r\n    raise e\r\n  File \"/usr/share/meson/interpreter.py\", line 969, in evaluate_codeblock\r\n    self.evaluate_statement(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1038, in evaluate_statement\r\n    return self.function_call(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1740, in function_call\r\n    return self.funcs[func_name](node, self.flatten(posargs), kwargs)\r\n  File \"/usr/share/meson/interpreter.py\", line 59, in wrapped\r\n    return f(self, node, args, kwargs)\r\n  File \"/usr/share/meson/interpreter.py\", line 1558, in func_subdir\r\n    self.evaluate_codeblock(codeblock)\r\n  File \"/usr/share/meson/interpreter.py\", line 975, in evaluate_codeblock\r\n    raise e\r\n  File \"/usr/share/meson/interpreter.py\", line 969, in evaluate_codeblock\r\n    self.evaluate_statement(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1048, in evaluate_statement\r\n    return self.evaluate_if(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1891, in evaluate_if\r\n    self.evaluate_codeblock(i.block)\r\n  File \"/usr/share/meson/interpreter.py\", line 975, in evaluate_codeblock\r\n    raise e\r\n  File \"/usr/share/meson/interpreter.py\", line 969, in evaluate_codeblock\r\n    self.evaluate_statement(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1048, in evaluate_statement\r\n    return self.evaluate_if(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1891, in evaluate_if\r\n    self.evaluate_codeblock(i.block)\r\n  File \"/usr/share/meson/interpreter.py\", line 975, in evaluate_codeblock\r\n    raise e\r\n  File \"/usr/share/meson/interpreter.py\", line 969, in evaluate_codeblock\r\n    self.evaluate_statement(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1042, in evaluate_statement\r\n    return self.method_call(cur)\r\n  File \"/usr/share/meson/interpreter.py\", line 1840, in method_call\r\n    return obj.method_call(method_name, args, kwargs)\r\n  File \"/usr/share/meson/interpreter.py\", line 708, in method_call\r\n    value = fn(state, args, kwargs)\r\n  File \"/usr/share/meson/modules/gnome.py\", line 52, in generate_gir\r\n    pkgstr = subprocess.check_output(['pkg-config', '--cflags', 'gobject-introspection-1.0'])\r\n  File \"/usr/lib/python3.4/subprocess.py\", line 620, in check_output\r\n    raise CalledProcessError(retcode, process.args, output=output)\r\nsubprocess.CalledProcessError: Command '['pkg-config', '--cflags', 'gobject-introspection-1.0']' returned non-zero exit status 1\r\n```"},"comment":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/comments/134520174","html_url":"https://github.com/mesonbuild/meson/issues/241#issuecomment-134520174","issue_url":"https://api.github.com/repos/mesonbuild/meson/issues/241","id":134520174,"user":{"login":"ignatenkobrain","id":2866862,"avatar_url":"https://avatars.githubusercontent.com/u/2866862?v=3","gravatar_id":"","url":"https://api.github.com/users/ignatenkobrain","html_url":"https://github.com/ignatenkobrain","followers_url":"https://api.github.com/users/ignatenkobrain/followers","following_url":"https://api.github.com/users/ignatenkobrain/following{/other_user}","gists_url":"https://api.github.com/users/ignatenkobrain/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatenkobrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatenkobrain/subscriptions","organizations_url":"https://api.github.com/users/ignatenkobrain/orgs","repos_url":"https://api.github.com/users/ignatenkobrain/repos","events_url":"https://api.github.com/users/ignatenkobrain/events{/privacy}","received_events_url":"https://api.github.com/users/ignatenkobrain/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T08:22:49Z","updated_at":"2015-08-25T08:22:49Z","body":"Yeah, we should use pkg-config from cross-file and print error instead of crash."}}