Skip to content
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

Conflicting thispackage.sh scripts for multiple packages #600

Closed
rete opened this issue Dec 12, 2019 · 3 comments · Fixed by #621
Closed

Conflicting thispackage.sh scripts for multiple packages #600

rete opened this issue Dec 12, 2019 · 3 comments · Fixed by #621
Labels

Comments

@rete
Copy link
Contributor

rete commented Dec 12, 2019

  • OS version: ubuntu 18.4
  • Compiler version: GCC 8.3.0
  • DD4hep version: HEAD (982b654)

What I'm trying to do

I'm developing an event display package based on DD4hep and ROOT Eve7 experimental web event display.

See https://github.com/rete/LCEve

To make it modular I use the plugin mechanism of DD4hep to load LCIO collection converters.
I have successfully:

  • Compiled the general library (libLCEve)
  • Compiled a DD4hep plugin library (libLCEvePlugins) using the CMake function add_dd4hep_plugin()
  • Generated my thislceve.sh using the CMake function dd4hep_instantiate_package( lceve )
  • Create an executable LCEventDisplay that is looking for a set of plugins using dd4hep::PluginService::Create()

Important point: I'm using lcgeo to load our standard ILD geometry for the display (ILD_l5_v02).

The issue

To run my event display I execute the following:

source /path/to/lcgeo/bin/thislcgeo.sh
source /path/to/lceve/bin/thislceve.sh
/path/to/lceve/bin/LCEventDisplay [args]

The program fails while loading the geometry:

Compact          INFO  ++ Converted subdetector:Tube of type DD4hep_Beampipe_o1_v01 
Compact          ERROR FAILED     subdetector:QD0_cryostat of type TubeSupport_o1_v01 
PluginService    ERROR Factory requested: TubeSupport_o1_v01 (N10__cxxabiv120__function_type_infoE) :bad any_cast
PluginService    ERROR Stub is invalid!
Compact          ERROR ++ FAILED    to convert subdetector: QD0_cryostat: Failed to execute subdetector creation plugin. 		No factory with name Create(TubeSupport_o1_v01) for type TubeSupport_o1_v01 found.
		Please check library load path and/or plugin factory name.

**************************************************** 
*  A runtime error has occured :                     
*    Failed to execute subdetector creation plugin. 		No factory with name Create(TubeSupport_o1_v01) for type TubeSupport_o1_v01 found.
		Please check library load path and/or plugin factory name.
*  the program will have to be terminated - sorry.   
**************************************************** 

but my plugins from LCEve are found correctly.

It seems that my thislceve.sh hides the environement of lcgeo. As a confirmation, from a new shell, if I switch the file source commands, the geometry is correctly loaded but my plugins are not found.

I looked my environment and found that LD_LIBRARY_PATH in the first case (lcgeo then lceve source) is set to the following:

$ printenv
...
LD_LIBRARY_PATH=/home/ilc/dev/install/lib:/home/ilc/DD4hep/lib::/home/ilc/root/install/lib:/home/ilc/lcgeo/lib:/home/ilc/DD4hep/lib:/home/ilc/python/lib
...

DD4hep library path is set twice. /home/ilc/dev/install/ is the install prefix for LCEve.
Now comes the strange fact: if I remove the last DD4hep library path, i.e:

export LD_LIBRARY_PATH=/home/ilc/dev/install/lib:/home/ilc/root/install/lib:/home/ilc/lcgeo/lib:/home/ilc/DD4hep/lib:/home/ilc/python/lib

then everything works perfectly.

Summary:

  • I'm not sure why it is not working so far... Having twice DD4hep library path should not be a problem, but it is for plugins loading.
  • Sourcing multiple this{package}.sh scripts from different packages in the same shell somehow leads to conflicts.
@andresailer
Copy link
Member

You also dropped the empty path in your second LD_LIBRARY_PATH
This is in the first one:

LD_LIBRARY_PATH=/home/ilc/dev/install/lib:/home/ilc/DD4hep/lib::/home/ilc/root/install/lib:/
                                                              ^^

Does adding or removing that make a difference?

@andresailer
Copy link
Member

I think there was a bug in the PluginServiceV2 that stopped the processing of the directories after the two colons. Can you try with #621 ?

@rete
Copy link
Contributor Author

rete commented Feb 14, 2020

Thanks Andre. I tried and indeed it solves the problem.
I'll update my docker image after your fix.

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

Successfully merging a pull request may close this issue.

3 participants