Skip to content

[cxxmodules] Also load TreePlayer to fix TDataFrame tests. #1328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

Teemperor
Copy link
Contributor

Depends on: #1317, adds only one other commit:

It seems automatically loading TreePlayer when TDataFrame is used
without the appropriate include never worked. This was previously
fixed by just adding TreePlayer (which contains TDF) to the PCH.

As always, let's recreate this hack with modules to make restore
the old behavior with modules turned on.

Without modules, many STL and libc headers are automatically
provided by ROOT via the attached ROOT PCH. This means that
we don't need to have autloading or explicit includes for STL
or libc headers when running with the PCH attached. This leads
to making user code like this working in ROOT:

```C++
// no includes here that provides assert
int foo() {
  assert(false);
}
```

However, as the modules don't come with this big PCH, we
are now suddenly in the situation where we can't resolve
things such as `assert`. We also can't rely on the
normal autoloading of ROOT as those declarations were
actually never autoloaded, but just provided by the PCH.

To simulate this behavior with modules, we automatically load
those headers that we expect to have in the ROOT PCH
(which are probably the STL and libc headers).
If we preload the core modules that can contain complex.h, we
break a lot of tests that name variables or template arguments I.
It seems automatically loading TreePlayer when TDataFrame is used
without the appropriate include never worked. This was previously
fixed by just adding TreePlayer (which contains TDF) to the PCH.

As always, let's recreate this hack with modules to make restore
the old behavior with modules turned on.
@Teemperor Teemperor requested a review from pcanal as a code owner November 14, 2017 16:02
@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

@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 mac1012/native.
See console output.

Errors:

  • /usr/include/sys/_posix_availability.h:29:3: error: "Never use <sys/_posix_availability.h> directly. Use <sys/cdefs.h> instead."
  • /usr/include/sys/_types/_intptr_t.h:30:9: error: declaration of '__darwin_intptr_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/sys/_types/_size_t.h:30:9: error: declaration of '__darwin_size_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/sys/_types/_ct_rune_t.h:31:9: error: declaration of '__darwin_ct_rune_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/sys/_types/_rune_t.h:30:9: error: declaration of '__darwin_rune_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/sys/_types/_wint_t.h:31:9: error: declaration of '__darwin_wint_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/mach/i386/_structs.h:321:2: error: declaration of '__uint8_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/sys/_pthread/_pthread_attr_t.h:30:9: error: missing '#include <sys/_pthread/_pthread_types.h>'; declaration of '__darwin_pthread_attr_t' must be imported from module 'Darwin.sys._pthread._pthread_types' before it is required
  • /usr/include/sys/_types/_sigaltstack.h:39:2: error: declaration of '__darwin_size_t' must be imported from module 'Darwin.machine._types' before it is required
  • /usr/include/sys/_types/_ucontext.h:37:2: error: missing '#include <sys/_types.h>'; declaration of '__darwin_sigset_t' must be imported from module 'Darwin.POSIX.sys.types' before it is required

And 10 more

@phsft-bot
Copy link

Build failed on centos7/gcc49.
See console output.

Errors:

  • Error: *** Datamember TWebFile::fFullCache: no size indication!
  • Error: *** Datamember TWebFile::fFullCache: pointer to fundamental type (need manual intervention)

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 setDict:
  • 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 map2Dict:
  • 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_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 multimap2Dict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multimapDict:

And 7 more

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error: *** Datamember TWebFile::fFullCache: no size indication!
  • Error: *** Datamember TWebFile::fFullCache: pointer to fundamental type (need manual intervention)

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 multisetDict:
  • 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:
  • 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 setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module vectorDict:

And 7 more

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error in <TCling::LoadCoreModules>: Couldn't parse core headers: #include "algorithm"
  • Error: *** Datamember TChainElement::fBaddress: no size indication!
  • Error: *** Datamember TChainElement::fBaddress: pointer to fundamental type (need manual intervention)
  • Error: *** Datamember TChainElement::fPackets: no size indication!
  • Error: *** Datamember TChainElement::fPackets: pointer to fundamental type (need manual intervention)
  • Error: *** Datamember TChainElement::fBranchPtr: pointer to pointer (need manual intervention)

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 vectorDict:
  • 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 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_setDict:
  • 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 mapDict:

And 7 more

@phsft-bot
Copy link

Build failed on slc6/gcc49.
See console output.

Errors:

  • Error: *** Datamember TWebFile::fFullCache: no size indication!
  • Error: *** Datamember TWebFile::fFullCache: pointer to fundamental type (need manual intervention)

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 map2Dict:
  • 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 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 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 unordered_multisetDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multimap2Dict:

And 7 more

@vgvassilev
Copy link
Member

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=On

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=On
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error: *** Datamember TWebFile::fFullCache: no size indication!
  • Error: *** Datamember TWebFile::fFullCache: pointer to fundamental type (need manual intervention)

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 unordered_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 vectorDict:
  • 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 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 multimap2Dict:

And 7 more

@Teemperor
Copy link
Contributor Author

We first need to fix the dependencies that TreePlayer is built before we try to load it.

@vgvassilev
Copy link
Member

That would require building quite a lot of root...

@Teemperor
Copy link
Contributor Author

Teemperor commented Nov 14, 2017

Yeah, we could just load if if the module is already built as a temporary workaround.

EDIT: Nvm, that would be the same principle with a horrible implementation.

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