Problem 1250 - wrong build of OpenInventor driver in 9.5 beta
Summary: wrong build of OpenInventor driver in 9.5 beta
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: config (show other problems)
Version: other
Hardware: All All
: P5 trivial
Assignee: John.Allison
URL:
Depends on:
Blocks:
 
Reported: 2011-09-18 21:16 CEST by Alexey
Modified: 2011-09-24 15:49 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Alexey 2011-09-18 21:16:28 CEST
The problem occurs in new 9.5 beta version.

source/interfaces/common/GNUmakefile no more contains line
include $(G4INSTALL)/config/G4VIS_BUILD.gmk

now for specific config i get libG4interfaces.so unusable by libG4OpenInventor.so.
This triggers when G4UI_BUILD_XM_SESSION and G4UI_BUILD_XAW_SESSION are not set but G4VIS_BUILD_OIX_DRIVER is set. All these settings define G4INTY_BUILD_XT = 1. Now that line "include $(G4INSTALL)/config/G4VIS_BUILD.gmk" is missing, value of G4INTY_BUILD_XT is 0 but it must be 1 when built with OIX driver!

Build of Geant4 completes fine but when i compile an app that uses libG4OpenInvetor.so i get linkage error complaining about undefined reference to G4Xt::getInstance(), which is not surpising because source/interfaces/common/src/G4Xt.cc was compiled with G4INTY_BUILD_XT = 0 and therefore contains no symbols.

Quick fix: add line "include $(G4INSTALL)/config/G4VIS_BUILD.gmk" to source/interfaces/common/GNUmakefile (but i do not know if it can lead to other errors) or (what i did when compiled) comment line

#if defined(G4INTY_BUILD_XT) || defined(G4INTY_USE_XT)

and corresponding

#endif

in files source/interfaces/common/src/G4Xt.cc and source/interfaces/common/include/G4Xt.hh
Comment 1 John.Allison 2011-09-24 15:49:55 CEST
This is understood.  A fix will be included in release 9.5.

Both OIX and Xm in visualisation need Xt in interfaces.  Often, this is not a problem since the user builds Xt anyway.  But if not, it must be forced.  The following lines in G4UI_BUILD.gmk do it:

# Special case: if OPENGLXM vis driver requested, G4Xt must be built.
ifdef G4VIS_BUILD_OPENGLXM_DRIVER
  G4INTY_BUILD_XT = 1
endif

# Special case: if OIX vis driver requested, G4Xt must be built.
ifdef G4VIS_BUILD_OIX_DRIVER
  G4INTY_BUILD_XT  = 1
endif

This introduces a sort of dependence between vis and interfaces, but it cannot be helped.