qweak.org Forum Index qweak.org
Discussion of software and simulation issues related to the Qweak experiment
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

build problems on Redhat 9

 
Post new topic   Reply to topic    qweak.org Forum Index -> compile / link issues (G3)
View previous topic :: View next topic  
Author Message
jonesrt



Joined: 16 Oct 2003
Posts: 23

PostPosted: Thu Oct 16, 2003 9:15 pm    Post subject: build problems on Redhat 9 Reply with quote

There are problems when trying to build the Qweak executable on Redhat 9 (gcc version 3.2.2) and cernlib 2003 or earlier. The problem occurs at link time, as shown in the listing below. The first couple of errors are just warnings about using c-library calls that are considered insecure. The real errors appear in the listing right afterwards.

Quote:

/cern/pro/bin/gxint -m -v pro -g 321 -o Qweak \
-L. -lfcalc -lcrypt -ldl -lnsl \
descin.o elastic.o epc.o erstop.o fndarg.o genbod.o getstr.o greucl.o gtckov.o gufld.o guhadr.o gukine.o guout.o guphad.o gustep.o gutrak.o gutrev.o gweucl.o lorntz.o maid2000.o maid_g0.o nextcoma.o nospac.o nsp1.o nsp2.o ntuple_chtop.o ntuple_close.o ntuple_open.o ntuple_write.o pdk.o pi_brems.o quasi_elastic.o Qweak.o random.o redarg.o redint.o rednmb.o redstr.o region.o sigma_eeprime.o sigma_gvp.o uangle.o ucards.o ucfile.o uconfi.o udeuclid.o udglob.o udkine.o udnamepar.o ufieldmap.o ufread.o uget.o uginit.o uglast.o ugpkin.o uhbeam.o uhdeca.o uhglob.o uhsta.o uhtarg.o uinterp.o uofile.o upglob.o uphysi.o uplot.o uprint.o uprtcn.o varfcalc.o vofcalc.o xsect_n.o
******************************************************
* loading interactive Geant
* creating : Qweak
* loader used : f77
* user library path : -L.
* user libraries : -lfcalc -lcrypt -ldl -lnsl
* Cern libraries : geant321 pawlib graflib/X11 packlib mathlib
* gxint used : user supplied
******************************************************
/cern/pro/lib/libpawlib.a(bugrep.o)(.text+0xfe): In function `br_create_template':
: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/local/lib/libshift.a(error.o)(.text+0x67d): In function `rfio_serror_r':
: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
/usr/local/lib/libshift.a(serror.o)(.text+0x320): In function `sstrerror_r':
: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
/cern/pro/lib/libpawlib.a(npantup.o)(.text+0x1096): In function `expand_var_list':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(npantup.o)(.text+0x10ce): In function `expand_var_list':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(qp_mask.o)(.text+0x740): In function `mask_hash':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(qp_mask.o)(.text+0x746): In function `mask_hash':
: undefined reference to `__ctype_tolower'
/cern/pro/lib/libpawlib.a(qp_mask.o)(.text+0x1139): In function `do_mask_open':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(qp_scanner.o)(.text+0x128): In function `uint_conv':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(qp_symtab.o)(.text+0x218): In function `hash_val':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(qp_symtab.o)(.text+0x21e): In function `hash_val':
: undefined reference to `__ctype_tolower'
/cern/pro/lib/libpawlib.a(str.o)(.text+0x1f5): In function `str_toupper':
: undefined reference to `__ctype_toupper'
/cern/pro/lib/libpawlib.a(str.o)(.text+0x235): In function `str_tolower':
: undefined reference to `__ctype_tolower'
/cern/pro/lib/libpawlib.a(hash_int_table.o)(.text+0x310): In function `HashInt_hash':
: undefined reference to `__ctype_b'
/cern/pro/lib/libpawlib.a(hash_int_table.o)(.text+0x316): In function `HashInt_hash':
: undefined reference to `__ctype_tolower'
/cern/pro/lib/libpawlib.a(qp_name.o)(.text+0x1255): In function `file_load':
: undefined reference to `__ctype_toupper'
/cern/pro/lib/libpawlib.a(qp_name.o)(.text+0x1e11): In function `name_comis':
: undefined reference to `__ctype_b'

... more like the above ...

/cern/pro/lib/libpacklib.a(kmacro.o)(.text+0x1230): In function `ku_match':
: undefined reference to `__ctype_tolower'
/usr/local/lib/libshift.a(stage_util.o)(.text+0x1bf5): In function `stage_util_check_for_strutou64':
/scratch/happi/CASTOR/castor-1.5.1.3/stage/stage_util.c:628: undefined reference to `__ctype_b'
/usr/local/lib/libshift.a(stage_util.o)(.text+0x1c19):/scratch/happi/CASTOR/castor-1.5.1.3/stage/stage_util.c:630: undefined reference to `__ctype_b'
/usr/local/lib/libshift.a(u64subr.o)(.text+0xfb): In function `strtou64':
: undefined reference to `__ctype_b'
/usr/local/lib/libshift.a(u64subr.o)(.text+0x137): In function `strtou64':
: undefined reference to `__ctype_b'
/usr/local/lib/libshift.a(u64subr.o)(.text+0x2d7): In function `strutou64':
: undefined reference to `__ctype_b'
/usr/local/lib/libshift.a(u64subr.o)(.text+0x313): more undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status
make: *** [Qweak] Error 1
[/code]
[/list][/list]
Back to top
View user's profile Send private message
jonesrt



Joined: 16 Oct 2003
Posts: 23

PostPosted: Thu Oct 16, 2003 9:50 pm    Post subject: re: build problems with redhat 9 Reply with quote

To build executables with gcc-3.2 you need the correct release of cernlib. This release is available in tar files from the cern file server http://cernlib.web.cern.ch/cernlib/version.html under the link "PC linux Redhat 10 (RH9)". It is not clear why they have a Redhat 10 version before redhat 10 is released! But this version also appears to work for redhat 9. To get a complete set, download all 7 tar files (cernbin.tar.gz geant321.tar.gz mclibs.tar.gz cernglib.tar.gz include.tar.gz cernlib.tar.gz lapack.tar.gz) and go to the directory where all of the releases of cernlib appear (2001, 2002, 2003, pro, new ...) and untar them as in

Quote:
tar zxf /tmp/cernlib.tar.gz
(you may need to be superuser to do this)

Then you need to edit the file Makefile.in in the Qweak simulation directory and find the line that says "VERSION=(whatever)" and change it to "VERSION=2003". If your CERN_ROOT environment variable points to the folder where you unpacked the above tars then your build should go smoothly.

Quote:

./configure (to convert Makefile.in to Makefile)
make (to build Qweak from sources)
Back to top
View user's profile Send private message
tforest
Guest





PostPosted: Tue Oct 12, 2004 3:40 pm    Post subject: 4 steps I took to compile on RH9 Reply with quote

The steps below begin after unpacking Richard's source code replacement files an installing the 2003 CERN libraries (including lapack and blas libraries).

1.) Edit the Makefile and change VERSION so it reads

VERSION=Linux/2003

The path to the CERN libraries is set using the environmental variable CERNLIB

~ >printenv | grep CERN
CERN=/apps/cern
CERN_ROOT=/apps/cern/Linux/2003


2.) Add the absolute path to the GEANT include file to the line "INCLUDEFLAGS" in the Makefile

INCLUDEFLAGS = -I/apps/cern/Linux/2003/include -DCERNLIB_TYPE -Iinclude


3.) Make sure the geant program "gxint" is in my path

~ >which gxint
/apps/cern/Linux/2003/bin/gxint



4.) added "-llapack" to the GXINT line in the Makefile

ifdef MOTIF
$(GXINT) -m -d Motif -v $(VERSION) -g 321 -o $(DEST) \
-L$(LIBFCALC) -lfcalc -llapack $(ADDLIBS) \
$(GXINTFLAGS) $(OBJECTS)
else
$(GXINT) -m -v $(VERSION) -g 321 -o $(DEST) \
-L$(LIBFCALC) -lfcalc -llapack $(ADDLIBS) \
$(GXINTFLAGS) $(OBJECTS)
endif


*** There was a suggestion to add the library "-lshift" but I did not observe any change to the electrons only ntuple so I am not adding this library at this time.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    qweak.org Forum Index -> compile / link issues (G3) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group