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 783783 - Potential compile racing issue when generating nm-core-tests-enum-types.c.stamp
Potential compile racing issue when generating nm-core-tests-enum-types.c.stamp
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-14 11:50 UTC by Andrei Gherzan
Modified: 2017-06-15 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrei Gherzan 2017-06-14 11:50:02 UTC
Even though I can't reproduce this on my local host, on the build server, compile fails with:

| glib-mkenums --fhead "/* Generated by glib-mkenums. Do not edit */\n\n#ifndef __NM_CORE_TESTS_ENUM_TYPES_H__\n#define __NM_CORE_TESTS_ENUM_TYPES_H__\n\n" --identifier-prefix NM  --fhead "#include <glib-object.h>\n\nG_BEGIN_DECLS\n" --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())\n" --ftail "G_END_DECLS\n\n#endif /* __NM_CORE_TESTS_ENUM_TYPES_H__ */" ../NetworkManager-1.8.0/libnm-core/tests/test-general-enums.h > libnm-core/tests/nm-core-tests-enum-types.h.tmp && (cmp -s libnm-core/tests/nm-core-tests-enum-types.h.tmp libnm-core/tests/nm-core-tests-enum-types.h || cp libnm-core/tests/nm-core-tests-enum-types.h.tmp libnm-core/tests/nm-core-tests-enum-types.h) && rm -f libnm-core/tests/nm-core-tests-enum-types.h.tmp && echo timestamp > libnm-core/tests/nm-core-tests-enum-types.h.stamp
| glib-mkenums --fhead "/* Generated by glib-mkenums. Do not edit */\n\n#include \"config.h\"\n\n#include \"nm-core-tests-enum-types.h\"\n" --identifier-prefix NM  --fhead "\n#include \"test-general-enums.h\"\n\n" --vhead "GType\n@enum_name@_get_type (void)\n{\n  static volatile gsize g_define_type_id__volatile = 0;\n\n  if (g_once_init_enter (&g_define_type_id__volatile))\n    {\n      static const G@Type@Value values[] = {\n" --vprod "        { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" },\n" --vtail "        { 0, NULL, NULL }\n      };\n      GType g_define_type_id =\n        g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n    }\n\n  return g_define_type_id__volatile;\n}\n" ../NetworkManager-1.8.0/libnm-core/tests/test-general-enums.h > libnm-core/tests/nm-core-tests-enum-types.c.tmp && (cmp -s libnm-core/tests/nm-core-tests-enum-types.c.tmp libnm-core/tests/nm-core-tests-enum-types.c || cp libnm-core/tests/nm-core-tests-enum-types.c.tmp libnm-core/tests/nm-core-tests-enum-types.c) && rm -f libnm-core/tests/nm-core-tests-enum-types.c.tmp && echo timestamp > libnm-core/tests/nm-core-tests-enum-types.c.stamp
| /bin/bash: libnm-core/tests/nm-core-tests-enum-types.c.tmp: No such file or directory

This looks like a racing issue and I was able to narrow down to the fact that when `nm-core-tests-enum-types.c.tmp` needs to be created, the path `libnm-core/tests` is not created when building out of source tree.

I can help in fixing this if somebody can provide me a hint on how to proceed.
Comment 1 Thomas Haller 2017-06-14 13:19:58 UTC
Hi


this should be fixed now with https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=b55fba8fbda49b9ec2f6f67c44960a0a5fd35ad9


can you verify that? (Closing as FIXED, please reopen if necessary)


Thanks
Comment 2 Andrei Gherzan 2017-06-15 10:36:00 UTC
Hello,

I applied the patch on top of 1.8.0 and everything looks fine now. Thanks for the quick fix.

Regards,
Andrei