Blob Blame History Raw
From 4a4df0190ad24c0a3636994c2c23cb6c22e04589 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 24 Mar 2022 15:41:33 +0100
Subject: [PATCH 2/3] Remove namespace RooFit from libRooFitCore's LinkDef

The namespace is listed in the LinkDef's for both libRooFit and libRooFitCore.

ROOT only autoloads one of the libraries, for some reason usually
libRooFitCore. After this only symbols in the namespace from that
library are present. By removing the namespace from liRooFitCore's
LinkDef, only libRooFit can be chosen when autoloading. Since
libRooFit depends on libRooFitCore, both libraries are loaded, and the
symbols from the namespace in both libraries are available.

Fixes error:

IncrementalExecutor::executeFunction: symbol '_ZN6RooFit12bindFunctionEPKcPFddER10RooAbsReal' unresolved while linking function '_GLOBAL__sub_I_cling_module_217'!
You are probably missing the definition of RooFit::bindFunction(char const*, double (*)(double), RooAbsReal&)
Maybe you need to load the corresponding shared library?
Symbol found in '/builddir/build/BUILD/root-6.26.00/redhat-linux-build/lib/libRooFit.so.6.26.00'; did you mean to load it with '.L /builddir/build/BUILD/root-6.26.00/redhat-linux-build/lib/libRooFit.so.6.26.00'?
---
 roofit/roofitcore/inc/LinkDef.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/roofit/roofitcore/inc/LinkDef.h b/roofit/roofitcore/inc/LinkDef.h
index d421fd95cd..72c66db33b 100644
--- a/roofit/roofitcore/inc/LinkDef.h
+++ b/roofit/roofitcore/inc/LinkDef.h
@@ -105,7 +105,10 @@
 
 
 // Old LinkDef2.h
-#pragma link C++ namespace RooFit ;
+
+// "namespace RooFit" is in roofit/roofit/inc/Linkdef1.h
+// should not be in the dictionary for two different libraries
+// #pragma link C++ namespace RooFit ;
 #pragma link C++ namespace RooFitShortHand ;
 #pragma link C++ class RooDouble+ ;
 #pragma link C++ class RooEffGenContext+ ;
-- 
2.35.1