User Tools

Site Tools


ds:fesa_shared_libs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ds:fesa_shared_libs [2015/04/09 11:44]
tmilosic created
ds:fesa_shared_libs [2015/09/17 11:00] (current)
tmilosic
Line 16: Line 16:
 is available to place the shared libraries.\\ is available to place the shared libraries.\\
 More specifically, ''/common/fesa'' is the mount point of ''fsl00c:/fesa''.\\ More specifically, ''/common/fesa'' is the mount point of ''fsl00c:/fesa''.\\
-On the FEC, ''fsl00c:/fesa'' is mounted at the root directory, i.e. the libraries are available at\\+ 
 +On the **FEC** 
 +<code> 
 +fsl00c:/common/fesa/fec/arch/L866_{32,64}</code> 
 +is mounted at 
 +<code> 
 +/fec/arch 
 +</code> 
 +i.e. the libraries are available at\\
 <code> <code>
-/fec/arch/L866_{32,64}/lib+/fec/arch/lib
 </code> </code>
 It is encouraged to create a subdirectory for each lib, e.g. HVWrapper resides in It is encouraged to create a subdirectory for each lib, e.g. HVWrapper resides in
Line 26: Line 34:
 with  with 
 <code> <code>
-libcaenhvwrapper.so -> libcaenhvwrapper.so.5.62+libcaenhvwrapper.so -> libcaenhvwrapper.so.5.77
 libcaenhvwrapper.so.5.22 libcaenhvwrapper.so.5.22
 libcaenhvwrapper.so.5.56 libcaenhvwrapper.so.5.56
 libcaenhvwrapper.so.5.61 libcaenhvwrapper.so.5.61
 libcaenhvwrapper.so.5.62 libcaenhvwrapper.so.5.62
 +libcaenhvwrapper.so.5.77
 </code> </code>
 to make testing against different library versions simple.\\ to make testing against different library versions simple.\\
 +
 +However, since this affects all FECs globally,\\
 +make sure, that no operational system relying on that \\
 +lib boots or reloads the FESA binary while pointing\\
 +to an unwanted version and hooks it up - as this might \\
 +lead to unexpected behaviour!
 ==== Search Paths ==== ==== Search Paths ====
 The //required// linker flag The //required// linker flag
Line 77: Line 92:
 ==== Boilerplate Code ==== ==== Boilerplate Code ====
  
-When building FESA for a target architecture, the variable ''CPU'' is set\\+When building FESA for a target architecture, the variable ''CPU'' is set to either //i686// or //x86_64//\\
 and accessible from the Makefile. and accessible from the Makefile.
 Depending on where linking to the custom vendor shared library happens,\\ Depending on where linking to the custom vendor shared library happens,\\
Line 89: Line 104:
 </code> </code>
 (Currently, that's actually more connected to the distribution instead of the architecture - see RFC)\\ (Currently, that's actually more connected to the distribution instead of the architecture - see RFC)\\
-Next create to directory variables that reference the mount point on the ASL73x and the path as seen on the FEC:+Next create to directory variables that reference the mount point on the ASL73x and the path as seen on the FEC.\\ 
 +Mind again that 'caen' is specific to this example.
 <code> <code>
 LIB_PREFIX_LOCAL=/common/fesa LIB_PREFIX_LOCAL=/common/fesa
-LIB_FEC_PATH=/fec/arch/$(ARCH_DIR)/lib/caen+LIB_FEC_PATH_LOCAL=/fec/arch/$(ARCH_DIR)/lib/caen 
 +LIB_FEC_PATH=/fec/arch/lib/caen
 </code> </code>
-(Mind again that 'caen' is specific to this example)\\ +Two LIB_FEC* paths are required to make the binary run on the FEC and locally on the ASL73* cluster.\\ 
-Append appropriate paths to linker and rpath flags:+We can now append all appropriate paths to linker and rpath flags.
 <code> <code>
-LINKER_FLAGS += -L$(LIB_PREFIX_LOCAL)$(LIB_FEC_PATH) -lcaenhvwrapper +LINKER_FLAGS += -L$(LIB_PREFIX_LOCAL)$(LIB_FEC_PATH_LOCAL) -lcaenhvwrapper 
-LINKER_FLAGS += -Wl,-rpath=$(LIB_PREFIX_LOCAL)$(LIB_FEC_PATH),-rpath=$(LIB_FEC_PATH)+LINKER_FLAGS += -Wl,-rpath=$(LIB_PREFIX_LOCAL)$(LIB_FEC_PATH_LOCAL),-rpath=$(LIB_FEC_PATH)
 </code> </code>
 There must be no whitespace around the commas!\\ There must be no whitespace around the commas!\\
-Otherwise the linker will complaint+Otherwisethe linker will complain.\\ 
-==== Suggestion/RFC ====+\\ 
 +This allows to test the binary on the ASL73x cluster and run it on the FEC
 +==== Proposal ====
 I suggest changing the directory structure for shared libs from I suggest changing the directory structure for shared libs from
 <code> <code>
ds/fesa_shared_libs.1428572667.txt.gz · Last modified: 2015/04/09 11:44 by tmilosic