h2root crashes on amd64

Bug #334820 reported by David Eriksson
2
Affects Status Importance Assigned to Milestone
root-system (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: root-system

Description: Ubuntu 8.10
Release: 8.10

root-plugin-hbook:
  Installed: 5.18.00-2ubuntu1

I try to run h2root with any argument, both real hbook-files and dummy arguments like "a", and I always get this error message:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
LOCB/LOCF: address 0x7ffeff709c20 exceeds the 32 bit address space
or is not in the data segments
This may result in program crash or incorrect results
Therefore we will stop here
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am running the amd64 version of Ubuntu. On i686 h2root works as expected.

Revision history for this message
David Eriksson (meldavid) wrote :

After some testing I finally got it working.
The problem is solved by using static linking as described in /usr/share/doc/cernlib/README.64-bit
I made a small hack for this:

--- root-system-5.18.00.orig/main/Module.mk
+++ root-system-5.18.00/main/Module.mk
@@ -2,7 +2,7 @@
 # Copyright (c) 2000 Rene Brun and Fons Rademakers
 #
 # Author: Fons Rademakers, 29/2/2000
-
+CERNLIBSSTAT := `cernlib kernlib packlib`
 MODDIR := main
 MODDIRS := $(MODDIR)/src
 MODDIRI := $(MODDIR)/inc
@@ -159,17 +159,17 @@
 $(H2ROOT): $(H2ROOTO) $(ROOTLIBSDEP)
                $(LD) $(LDFLAGS) -o $@ $(H2ROOTO) \
                   $(RPATH) $(ROOTLIBS) \
- $(CERNLIBDIR) $(CERNLIBS) $(SHIFTLIBDIR) \
+ $(CERNLIBDIR) $(CERNLIBSSTAT) $(SHIFTLIBDIR) \
                   $(SHIFTLIB) $(F77LIBS) $(SYSLIBS)

 $(G2ROOT): $(G2ROOTO)
                $(F77LD) $(F77LDFLAGS) -o $@ $(G2ROOTO) \
- $(CERNLIBDIR) $(CERNLIBS) $(SHIFTLIBDIR) \
+ $(CERNLIBDIR) $(CERNLIBSSTAT) $(SHIFTLIBDIR) \
                   $(SHIFTLIB) $(F77LIBS) $(SYSLIBS)

 $(G2ROOTOLD): $(G2ROOTOLDO)
                $(F77LD) $(F77LDFLAGS) -o $@ $(G2ROOTOLDO) \
- $(CERNLIBDIR) $(CERNLIBS) $(SHIFTLIBDIR) \
+ $(CERNLIBDIR) $(CERNLIBSSTAT) $(SHIFTLIBDIR) \
                   $(SHIFTLIB) $(F77LIBS) $(SYSLIBS)

 ifeq ($(BUILDHBOOK),yes)

This removed the error message but the histograms produced contained no data. This second problem was solved with this patch:

--- root-system-5.18.00.orig/main/src/h2root.cxx
+++ root-system-5.18.00/main/src/h2root.cxx
@@ -205,19 +205,11 @@
 extern "C" void type_of_call hix(const int&,const int&,const float&);
 extern "C" void type_of_call hijxy(const int&,const int&,const int&,const float&,const float&);

-#ifndef R__B64
 extern "C" float type_of_call hi(const int&,const int&);
 extern "C" float type_of_call hie(const int&,const int&);
 extern "C" float type_of_call hif(const int&,const int&);
 extern "C" float type_of_call hij(const int&,const int&,const int&);
 extern "C" float type_of_call hije(const int&,const int&,const int&);
-#else
-extern "C" double type_of_call hi(const int&,const int&);
-extern "C" double type_of_call hie(const int&,const int&);
-extern "C" double type_of_call hif(const int&,const int&);
-extern "C" double type_of_call hij(const int&,const int&,const int&);
-extern "C" double type_of_call hije(const int&,const int&,const int&);
-#endif

 #ifndef WIN32
 extern "C" void type_of_call hcdir(DEFCHAR,DEFCHAR ,const int,const int);

Using this two patches I can build a working h2root.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.