Skip to content

Conversation

Teemperor
Copy link
Contributor

We need to respect the existing ExternalASTSource when setting up the
interpreter. Otherwise the ASTReader (which is the existing source)
doesn't receive the required callbacks to properly load C++ modules.

This patch now creates a multiplexer that contains our new
ASTSource and the existing one if it's necessary. We also
no longer attach the existing sema source which seemingly
was only a workaround that only works for the special case
were the external sema source and the external AST source
are the same object.

We need to respect the existing ExternalASTSource when setting up the
interpreter. Otherwise the ASTReader (which is the existing source)
doesn't receive the required callbacks to properly load C++ modules.

This patch now creates a multiplexer that contains our new
ASTSource and the existing one if it's necessary. We also
no longer attach the existing sema source which seemingly
was only a workaround that only works for the special case
were the external sema source and the external AST source
are the same object.
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu14/native, ubuntu14/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

Build failed on windows10/vc15.
See console output.

@Teemperor
Copy link
Contributor Author

@phsft-bot build with flags -Druntime_cxxmodules=On

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu14/native, ubuntu14/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On
How to customize builds

@phsft-bot
Copy link

Build failed on centos7/gcc49.
See console output.

Errors:

  • /usr/include/time.h:120:8: error: redefinition of 'timespec'
  • /usr/include/bits/sched.h:73:8: error: redefinition of 'sched_param'
  • /usr/include/bits/sched.h:104:8: error: redefinition of '__sched_param'
  • /usr/include/bits/sched.h:129:3: error: typedef redefinition with different types ('struct cpu_set_t' vs 'struct cpu_set_t')
  • /mnt/build/jenkins/workspace/root-pullrequests-build/build/etc/cling/lib/clang/5.0.0/include/bits/time.h:30:8: error: redefinition of 'timeval'
  • /usr/include/bits/timex.h:25:8: error: redefinition of 'timex'
  • /usr/include/time.h:133:8: error: redefinition of 'tm'
  • /usr/include/time.h:161:8: error: redefinition of 'itimerspec'
  • /usr/include/bits/pthreadtypes.h:63:7: error: redefinition of 'pthread_attr_t'
  • /usr/include/bits/pthreadtypes.h:75:16: error: redefinition of '__pthread_internal_list'

And 10 more

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module mapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module forward_listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multimap2Dict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multimapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:

And 6 more

@phsft-bot
Copy link

Build failed on slc6/gcc49.
See console output.

Errors:

  • /usr/include/time.h:120:8: error: redefinition of 'timespec'
  • /usr/include/bits/sched.h:74:8: error: redefinition of 'sched_param'
  • /usr/include/bits/sched.h:101:8: error: redefinition of '__sched_param'
  • /usr/include/bits/sched.h:126:3: error: typedef redefinition with different types ('struct cpu_set_t' vs 'struct cpu_set_t')
  • /usr/include/time.h:133:8: error: redefinition of 'tm'
  • /usr/include/time.h:161:8: error: redefinition of 'itimerspec'
  • /usr/include/bits/pthreadtypes.h:57:3: error: typedef redefinition with different types ('union pthread_attr_t' vs 'union pthread_attr_t')
  • /usr/include/bits/pthreadtypes.h:61:16: error: redefinition of '__pthread_internal_list'
  • /usr/include/bits/pthreadtypes.h:104:3: error: typedef redefinition with different types ('union pthread_mutex_t' vs 'union pthread_mutex_t')
  • /usr/include/bits/pthreadtypes.h:110:3: error: typedef redefinition with different types ('union pthread_mutexattr_t' vs 'union pthread_mutexattr_t')

And 10 more

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module dequeDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module map2Dict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multimap2Dict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multisetDict:

And 6 more

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • /usr/include/time.h:120:8: error: redefinition of 'timespec'
  • /usr/include/bits/sched.h:74:8: error: redefinition of 'sched_param'
  • /usr/include/bits/sched.h:101:8: error: redefinition of '__sched_param'
  • /usr/include/bits/sched.h:126:3: error: typedef redefinition with different types ('struct cpu_set_t' vs 'struct cpu_set_t')
  • /usr/include/time.h:133:8: error: redefinition of 'tm'
  • /usr/include/time.h:161:8: error: redefinition of 'itimerspec'
  • /usr/include/bits/pthreadtypes.h:57:3: error: typedef redefinition with different types ('union pthread_attr_t' vs 'union pthread_attr_t')
  • /usr/include/bits/pthreadtypes.h:61:16: error: redefinition of '__pthread_internal_list'
  • /usr/include/bits/pthreadtypes.h:104:3: error: typedef redefinition with different types ('union pthread_mutex_t' vs 'union pthread_mutex_t')
  • /usr/include/bits/pthreadtypes.h:110:3: error: typedef redefinition with different types ('union pthread_mutexattr_t' vs 'union pthread_mutexattr_t')

And 10 more

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module dequeDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module vectorDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module map2Dict:

And 6 more

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • /usr/include/time.h:120:8: error: redefinition of 'timespec'
  • /usr/include/bits/sched.h:74:8: error: redefinition of 'sched_param'
  • /usr/include/bits/sched.h:101:8: error: redefinition of '__sched_param'
  • /usr/include/bits/sched.h:126:3: error: typedef redefinition with different types ('struct cpu_set_t' vs 'struct cpu_set_t')
  • /usr/include/time.h:133:8: error: redefinition of 'tm'
  • /usr/include/time.h:161:8: error: redefinition of 'itimerspec'
  • /usr/include/bits/pthreadtypes.h:57:3: error: typedef redefinition with different types ('union pthread_attr_t' vs 'union pthread_attr_t')
  • /usr/include/bits/pthreadtypes.h:61:16: error: redefinition of '__pthread_internal_list'
  • /usr/include/bits/pthreadtypes.h:104:3: error: typedef redefinition with different types ('union pthread_mutex_t' vs 'union pthread_mutex_t')
  • /usr/include/bits/pthreadtypes.h:110:3: error: typedef redefinition with different types ('union pthread_mutexattr_t' vs 'union pthread_mutexattr_t')

And 10 more

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module dequeDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multimapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multimapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_mapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multisetDict:

And 6 more

@phsft-bot
Copy link

Build failed on ubuntu14/native.
See console output.

Errors:

  • /usr/include/x86_64-linux-gnu/bits/sched.h:72:8: error: redefinition of 'sched_param'
  • /usr/include/x86_64-linux-gnu/bits/sched.h:103:8: error: redefinition of '__sched_param'
  • /usr/include/x86_64-linux-gnu/bits/sched.h:128:3: error: typedef redefinition with different types ('struct cpu_set_t' vs 'struct cpu_set_t')
  • /usr/include/x86_64-linux-gnu/bits/timex.h:25:8: error: redefinition of 'timex'
  • /usr/include/time.h:133:8: error: redefinition of 'tm'
  • /usr/include/time.h:161:8: error: redefinition of 'itimerspec'
  • /usr/include/pthread.h:34:3: error: redefinition of enumerator 'PTHREAD_CREATE_JOINABLE'
  • /usr/include/pthread.h:36:3: error: redefinition of enumerator 'PTHREAD_CREATE_DETACHED'
  • /usr/include/pthread.h:44:3: error: redefinition of enumerator 'PTHREAD_MUTEX_TIMED_NP'
  • /usr/include/pthread.h:45:3: error: redefinition of enumerator 'PTHREAD_MUTEX_RECURSIVE_NP'

And 10 more

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module map2Dict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module mapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module dequeDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_mapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_setDict:

And 6 more

@phsft-bot
Copy link

Build failed on ubuntu14/native.
See console output.

Errors:

  • /usr/include/x86_64-linux-gnu/bits/sched.h:72:8: error: redefinition of 'sched_param'
  • /usr/include/x86_64-linux-gnu/bits/sched.h:103:8: error: redefinition of '__sched_param'
  • /usr/include/x86_64-linux-gnu/bits/sched.h:128:3: error: typedef redefinition with different types ('struct cpu_set_t' vs 'struct cpu_set_t')
  • /usr/include/x86_64-linux-gnu/bits/timex.h:25:8: error: redefinition of 'timex'
  • /usr/include/time.h:133:8: error: redefinition of 'tm'
  • /usr/include/time.h:161:8: error: redefinition of 'itimerspec'
  • /usr/include/pthread.h:34:3: error: redefinition of enumerator 'PTHREAD_CREATE_JOINABLE'
  • /usr/include/pthread.h:36:3: error: redefinition of enumerator 'PTHREAD_CREATE_DETACHED'
  • /usr/include/pthread.h:44:3: error: redefinition of enumerator 'PTHREAD_MUTEX_TIMED_NP'
  • /usr/include/pthread.h:45:3: error: redefinition of enumerator 'PTHREAD_MUTEX_RECURSIVE_NP'

And 10 more

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module mapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multimapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module dequeDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_mapDict:

And 6 more

@phsft-bot
Copy link

Build failed on mac1012/native.
See console output.

@vgvassilev
Copy link
Member

@phsft-bot build -Dvc=OFF -Dimt=ON -Dccache=ON

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu14/native, ubuntu14/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants