The test passes locally, but the cmake job is failing in the exact same way as 
the Xcode one. Based on the error, it looks like the compiler invocation has 
failed.

.. and, aha!, here is the failed invocation:

green-dragon-23:non-overlapping-index-variable-i buildslave$ make MAKE_DSYM=NO 
MAKE_GMODULES=YES ARCH=x86_64 
CC="/Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang-7.0"
/Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang-7.0  
-std=c++11 -g -O0 -fno-builtin -arch x86_64  
-I/Users/buildslave/jenkins/workspace/lldb-cmake/src/llvm/tools/lldb/packages/Python/lldbsuite/test/make/../../../../../include
 -include 
/Users/buildslave/jenkins/workspace/lldb-cmake/src/llvm/tools/lldb/packages/Python/lldbsuite/test/make/test_common.h
 
-I/Users/buildslave/jenkins/workspace/lldb-cmake/src/llvm/tools/lldb/packages/Python/lldbsuite/test/make/
  -fno-limit-debug-info   -fmodules -gmodules -fmodules-cache-path=module-cache 
--driver-mode=g++ -c -o main.o main.cpp
main.cpp:27:9: error: no matching constructor for initialization of 'Point'
        point(0, 0)
        ^     ~~~~
/usr/include/MacTypes.h:538:8: note: candidate constructor (the implicit copy 
constructor) not viable: requires 1 argument, but 2 were provided
struct Point {
       ^
/usr/include/MacTypes.h:538:8: note: candidate constructor (the implicit move 
constructor) not viable: requires 1 argument, but 2 were provided
/usr/include/MacTypes.h:538:8: note: candidate constructor (the implicit 
default constructor) not viable: requires 0 arguments, but 2 were provided
main.cpp:36:23: error: no member named 'x' in 'Point'
        ptr[i]->point.x = i;
        ~~~~~~~~~~~~~ ^
main.cpp:37:23: error: no member named 'y' in 'Point'
        ptr[i]->point.y = i+1;
        ~~~~~~~~~~~~~ ^
main.cpp:47:77: error: no member named 'x' in 'Point'
            printf("data[%d] = %d (%d, %d)\n", i, ptr[i]->id, ptr[i]->point.x, 
ptr[i]->point.y);
                                                              ~~~~~~~~~~~~~ ^
main.cpp:47:94: error: no member named 'y' in 'Point'
            printf("data[%d] = %d (%d, %d)\n", i, ptr[i]->id, ptr[i]->point.x, 
ptr[i]->point.y);
                                                                               
~~~~~~~~~~~~~ ^
5 errors generated.
make: *** [main.o] Error 1

It looks like we're picking up "struct Point" from /usr/include/MacTypes.h!

vedant

> On Jan 25, 2018, at 1:02 PM, Vedant Kumar <v...@apple.com> wrote:
> 
> Taking a look. It may be another instance of a test not actually running with 
> -fmodules in the -gmodules configuration.
> 
> vedant
> 
>> On Jan 25, 2018, at 12:40 PM, Davide Italiano <dccitali...@gmail.com> wrote:
>> 
>> The bot started failing recently, and this commit seems the most likely 
>> culprit.
>> 
>> http://lab.llvm.org:8080/green/view/LLDB/job/lldb-xcode/4513/
>> 
>> 
>> Can you please take a look, Vedant?
>> 
>> Thanks,
>> 
>> --
>> Davide
>> 
>> On Thu, Jan 25, 2018 at 10:01 AM, Vedant Kumar via lldb-commits
>> <lldb-commits@lists.llvm.org> wrote:
>>> Author: vedantk
>>> Date: Thu Jan 25 10:01:27 2018
>>> New Revision: 323450
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=323450&view=rev
>>> Log:
>>> Use test-specific module caches to avoid stale header conflicts
>>> 
>>> Stale global module caches cause problems for the bots. The modules
>>> become invalid when clang headers are updated by version control, and
>>> tests which use these modules fail to compile, e.g:
>>> 
>>> fatal error: file '.../__stddef_max_align_t.h' has been modified since the 
>>> module file '/var/.../Darwin.pcm' was built
>>> note: please rebuild precompiled header '/var/.../Darwin.pcm'
>>> 
>>> Eventually we should transition to having just a single module cache to 
>>> speed
>>> tests up. This patch should be just enough to fix the spurious bot failures 
>>> due
>>> to stale caches.
>>> 
>>> rdar://36479805, also related to llvm.org/PR36048
>>> 
>>> Differential Revision: https://reviews.llvm.org/D42277
>>> 
>>> Modified:
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
>>>   
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
>>>   lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -26,6 +26,8 @@ class CppDataFormatterTestCase(TestBase)
>>>    @expectedFailureAll(
>>>        oslist=["windows"],
>>>        bugnumber="llvm.org/pr24462: Data formatters have problems on 
>>> Windows")
>>> +    @skipIf(debug_info="gmodules",
>>> +            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048";)
>>>    def test_with_run_command(self):
>>>        """Test that that file and class static variables display 
>>> correctly."""
>>>        self.build()
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -9,6 +9,7 @@ import os
>>> import time
>>> import lldb
>>> from lldbsuite.test.lldbtest import *
>>> +from lldbsuite.test.decorators import *
>>> import lldbsuite.test.lldbutil as lldbutil
>>> 
>>> 
>>> @@ -22,6 +23,8 @@ class GlobalsDataFormatterTestCase(TestB
>>>        # Find the line number to break at.
>>>        self.line = line_number('main.cpp', '// Set break point at this 
>>> line.')
>>> 
>>> +    @skipIf(debug_info="gmodules",
>>> +            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048";)
>>>    def test_with_run_command(self):
>>>        """Test that that file and class static variables display 
>>> correctly."""
>>>        self.build()
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -31,6 +31,8 @@ class LibcxxListDataFormatterTestCase(Te
>>>                                 '// Set fourth break point at this line.')
>>> 
>>>    @add_test_categories(["libc++"])
>>> +    @skipIf(debug_info="gmodules",
>>> +            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048";)
>>>    def test_with_run_command(self):
>>>        """Test that that file and class static variables display 
>>> correctly."""
>>>        self.build()
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -18,6 +18,8 @@ class LibcxxVectorDataFormatterTestCase(
>>>    mydir = TestBase.compute_mydir(__file__)
>>> 
>>>    @add_test_categories(["libc++"])
>>> +    @skipIf(debug_info="gmodules",
>>> +            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048";)
>>>    def test_with_run_command(self):
>>>        """Test that that file and class static variables display 
>>> correctly."""
>>>        self.build()
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -1,6 +1,6 @@
>>> LEVEL = ../../../make
>>> OBJC_SOURCES := main.m
>>> 
>>> -CFLAGS += -fmodules -gmodules -g
>>> +CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
>>> 
>>> include $(LEVEL)/Makefile.rules
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -26,7 +26,7 @@ class ObjCModulesAutoImportTestCase(Test
>>>        self.line = line_number('main.m', '// Set breakpoint 0 here.')
>>> 
>>>    @skipUnlessDarwin
>>> -    @skipIf(macos_version=["<", "10.12"])
>>> +    @skipIf(macos_version=["<", "10.12"], 
>>> debug_info=no_match(["gmodules"]))
>>>    def test_expr(self):
>>>        self.build()
>>>        exe = self.getBuildArtifact("a.out")
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -4,5 +4,5 @@ OBJC_SOURCES := main.m myModule.m
>>> 
>>> include $(LEVEL)/Makefile.rules
>>> 
>>> -CFLAGS += -fmodules -I$(PWD)
>>> +CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD)
>>> LDFLAGS += -framework Foundation
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -24,7 +24,7 @@ class IncompleteModulesTestCase(TestBase
>>> 
>>>    @skipUnlessDarwin
>>>    @unittest2.expectedFailure("rdar://20416388")
>>> -    @skipIf(macos_version=["<", "10.12"])
>>> +    @skipIf(macos_version=["<", "10.12"], 
>>> debug_info=no_match(["gmodules"]))
>>>    def test_expr(self):
>>>        self.build()
>>>        exe = self.getBuildArtifact("a.out")
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -6,4 +6,4 @@ OBJC_SOURCES := main.m
>>> 
>>> include $(LEVEL)/Makefile.rules
>>> 
>>> -CFLAGS += -fmodules -I$(PWD)
>>> +CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD)
>>> 
>>> Modified: 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
>>>  (original)
>>> +++ 
>>> lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
>>>  Thu Jan 25 10:01:27 2018
>>> @@ -27,7 +27,7 @@ class ModulesInlineFunctionsTestCase(Tes
>>>        self.line = line_number('main.m', '// Set breakpoint here.')
>>> 
>>>    @skipUnlessDarwin
>>> -    @skipIf(macos_version=["<", "10.12"])
>>> +    @skipIf(macos_version=["<", "10.12"], 
>>> debug_info=no_match(["gmodules"]))
>>>    def test_expr(self):
>>>        self.build()
>>>        exe = self.getBuildArtifact("a.out")
>>> 
>>> Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=323450&r1=323449&r2=323450&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original)
>>> +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Thu Jan 
>>> 25 10:01:27 2018
>>> @@ -237,13 +237,15 @@ ifeq "$(MAKE_DWO)" "YES"
>>>       CFLAGS += -gsplit-dwarf
>>> endif
>>> 
>>> +CLANG_MODULE_CACHE_DIR := module-cache
>>> +
>>> +MANDATORY_MODULE_BUILD_CFLAGS := -fmodules -gmodules 
>>> -fmodules-cache-path=$(CLANG_MODULE_CACHE_DIR)
>>> +
>>> ifeq "$(MAKE_GMODULES)" "YES"
>>> -       CFLAGS += -fmodules -gmodules
>>> +       CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
>>> endif
>>> 
>>> -CXXFLAGS += -std=c++11
>>> -# FIXME: C++ modules aren't supported on all platforms.
>>> -CXXFLAGS += $(subst -fmodules,, $(CFLAGS))
>>> +CXXFLAGS += -std=c++11 $(CFLAGS)
>>> LD = $(CC)
>>> LDFLAGS ?= $(CFLAGS)
>>> LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
>>> @@ -636,7 +638,7 @@ endif
>>> dsym:  $(DSYM)
>>> all:   $(EXE) $(DSYM)
>>> clean::
>>> -       $(RM) $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(DWOS) 
>>> $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS)
>>> +       $(RM) -rf $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(DWOS) 
>>> $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) $(CLANG_MODULE_CACHE_DIR)
>>> ifneq "$(DYLIB_NAME)" ""
>>>       $(RM) -r $(DYLIB_FILENAME).dSYM
>>>       $(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_PREREQS:.d=.d.tmp) 
>>> $(DYLIB_DWOS) $(DYLIB_FILENAME) $(DYLIB_FILENAME).debug
>>> 
>>> 
>>> _______________________________________________
>>> lldb-commits mailing list
>>> lldb-commits@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> 

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to