Problem 582

Summary: Doesn't link properly
Product: Examples/Extended Reporter: jdlee
Component: analysis/A0Assignee: Mark.Donszelmann
Status: RESOLVED WORKSFORME    
Severity: major    
Priority: P2    
Version: other   
Hardware: PC   
OS: Linux   

Description jdlee 2004-02-16 15:12:29 CET
I am trying to analyze example A01 using AIDA.
After unpacking AIDAJNI-3.2.0 and JAIDA-3.2.0, I did

setenv JAIDA_HOME $HOME/JAIDA-3.2.0
source $JAIDA_HOME/bin/aida-setup.csh

setenv AIDAJNI_HOME $HOME/AIDAJNI-3.2.0
setenv JDK_HOME $HOME/java/j2sdk1.4.2_01
source $AIDAJNI_HOME/bin/Linux-g++2/aidajni-setup.csh

setenv G4ANALYSIS_USE 1
setenv G4VIS_USE_OPENGLX  #just in case..
setenv G4VIS_USE_OPENGLXM  #just in case..

Now, if I try to compile and link,

make
Making dependency for file src/A01..........
...............
.................
.............
Compiling A01AnalysisManager.cc ...
...........
.............
...
Creating/replacing...............
...............
Using grangular libraries ...
Linking A01app ...
g++: AIDAJNI: No such file or directory
g++: FHJNI: No such file or directory
g++: jvm: No such file or directory
make: *** [/home/.../Geant4/geant4.6.0.p01/bin/Linux-g++/A01app] Error 1

The funny thing is, if I kill G4ANALYSIS_USE by

setenv G4ANALYSIS_USE

it does compile and link, but when I run A01app and

/run/beamOn 100

there is no plotter window showing up!
Comment 1 perl 2004-03-03 16:51:59 CET
The SLAC team has just released a new installation CD for G4.6.0p01.
It includes significant revisions of components relevant to this bug.
Please try the instructions there.
http://geant4.slac.stanford.edu/g4cd/March2004/Welcome.html
Comment 2 tonyj 2004-03-04 11:25:59 CET
No plotter window showing up is the expected behaviour when G4ANALYSIS_USE is
not set.

You dont say which version of gcc you are using, so I am unclear if Linux-
g++2/aidajni-setup.csh is the correct setup file to read.
Comment 3 tonyj 2004-03-04 11:26:59 CET
Reassign to mark to see if he any other thoughts.
Comment 4 Mark.Donszelmann 2004-03-04 12:02:59 CET
Could you add the output of the command:

aida-config --lib

and let us know if you use g++ 2.95.x or g++ 3.x ?
Comment 5 Mark.Donszelmann 2004-03-04 14:31:59 CET
Version 3.2.0 of AIDAJNI has setup scripts in which the variable:

AIDAJNI_LIBS contains spaces between -L <dir> and -l <library, while the
linker only acceps -L<dir> -l<library.

The correct line should be:

setenv AIDAJNI_LIBS "-L${AIDAJNI_HOME}/lib/Linux-g++2 -lAIDAJNI -lFHJNI -
L${JDK_HOME}/jre/lib/i386/client -ljvm"

This is fixed if you use AIDAJNI 3.2.1, which has just been released.
Comment 6 jdlee 2004-03-30 19:46:59 CEST
Thanks for all your help!
I finally fixed the problem by patching "-l" and "<library>".