> > arb_replace: error while loading shared libraries: libARBDB.so: cannot open 
> > shared object file: No such file or directory

> Ahh, thanks for this hint.  This kind of bugs occure if you don't compile 
> packages
> in a clean chroot.  I had installed a former version of arb on the box I 
> builded
> the package.  Thus the library was found which is not the case if you compile 
> the
> package on a clean box.

> I'll foreward this problem upstream.

This can be also fixed with following in debian/rules.

--- debian/rules~       2005-08-31 07:18:37.000000000 +0000
+++ debian/rules        2005-09-08 08:05:21.000000000 +0000
@@ -28,11 +28,13 @@
        export ARBHOME=`pwd` ; \
        export LC_ALL=C ; \
        export PATH=$${ARBHOME}/bin:$${PATH} ; \
+       export LD_LIBRARY_PATH=$${ARBHOME}/lib:$${LD_LIBRARY_PATH}; \
          $(MAKE) all
 #      export GCC=gcc-2.95 ; \ ####
        export ARBHOME=`pwd` ; \
        export LC_ALL=C ; \
        export PATH=$${ARBHOME}/bin:$${PATH} ; \
+       export LD_LIBRARY_PATH=$${ARBHOME}/lib:$${LD_LIBRARY_PATH}; \
          $(MAKE) arbxtras
 
        touch build-stamp

The missing -fpic/-fPIC can be fixed by:

--- WINDOW/Makefile~    2005-09-08 08:37:53.000000000 +0000
+++ WINDOW/Makefile     2005-09-08 08:37:53.000000000 +0000
@@ -21,7 +21,7 @@
        $(CCPLIB) $(cflags) -c $< $(CPPINCLUDES)
 
 .c.o:
-       $(ACC) $(cflags) -c $< $(CPPINCLUDES)
+       $(CCLIB) $(cflags) -c $< $(CPPINCLUDES)
 
 DEPENDS = $(OBJECTS:.o=.depend)
 depends: $(DEPENDS)


But arb depends on xview which is not 64 bit clean and is unavailable
on all 64 bit archs, including amd64.

Even with patches above and xview patch from 
http://debian-ppc64.alioth.debian.org/gcc4/patches/xview_3.2p1.4-19.0.0.1.gcc4.patch
arb cannot be built on amd64 - "error: cast from 'void*' to 'int' loses 
precision".
This can be "fixed" by changing cast (int) to (long),
(as in attached patch) but according to warnings in build log,
the arb is definitely not 64 bit clean.

Therefore, I suggest to apply only patch for debian/rules and 
WINDOW/Makefile and restrict architectures similarly as xview.

Andreas J., I am just curious, are these patches also sufficient for ppc64 ?

Regards

        Petr




diff -ur /home/sid32/tmp/26/arb-0.0.20050526/ALIV3/a3_helix.cxx 
arb-0.0.20050526/ALIV3/a3_helix.cxx
--- /home/sid32/tmp/26/arb-0.0.20050526/ALIV3/a3_helix.cxx      2005-01-05 
13:08:24.000000000 +0100
+++ arb-0.0.20050526/ALIV3/a3_helix.cxx 2005-09-08 11:59:20.000000000 +0200
@@ -65,12 +65,12 @@
                          matrix.Set(back - left,pos - left,(vp)1)) error = 3;
                 {
                     if      (last < 0)                     last = 
mark.Add((vp)pos);
-                    else if ((back - (int)mark[last]) > 1) last = 
mark.Add((vp)pos);
+                    else if ((back - (long)mark[last]) > 1) last = 
mark.Add((vp)pos);
                 }
             }
             else if (increment < 0)
             {
-                int back    = (int)mark[last],
+                int back    = (long)mark[last],
                     backend = left,
                     tmp     = back;
                 
@@ -78,7 +78,7 @@
                 
                 back = tmp - 1;
                 
-                if (last > 0) backend = (int)mark[last - 1] + 1;
+                if (last > 0) backend = (long)mark[last - 1] + 1;
 
                 while (back >= backend)
                 {
@@ -101,7 +101,7 @@
                                 if (last >= 0) mark.Del(last--);
 
                                 if      (last < 0)                     last = 
mark.Add((vp)pos);
-                                else if ((back - (int)mark[last]) > 1) last = 
mark.Add((vp)pos);
+                                else if ((back - (long)mark[last]) > 1) last = 
mark.Add((vp)pos);
 
                                 break;
                             }
@@ -112,7 +112,7 @@
                     {
                         if (last >= 0) mark.Del(last--);
                         
-                        if (last > 0) backend = (int)mark[last - 1] + 1;
+                        if (last > 0) backend = (long)mark[last - 1] + 1;
                         else          backend = left;
                     }
                     
diff -ur /home/sid32/tmp/26/arb-0.0.20050526/ALIV3/a3_matrix.cxx 
arb-0.0.20050526/ALIV3/a3_matrix.cxx
--- /home/sid32/tmp/26/arb-0.0.20050526/ALIV3/a3_matrix.cxx     2005-01-05 
13:08:24.000000000 +0100
+++ arb-0.0.20050526/ALIV3/a3_matrix.cxx        2005-09-08 11:44:40.000000000 
+0200
@@ -141,7 +141,7 @@
             int p = l + x;
             
             if (edump) edump(matrix[p]);
-            else cout << " " << (int)matrix[p];
+            else cout << " " << (long)matrix[p];
 
             x++;
         }
diff -ur /home/sid32/tmp/26/arb-0.0.20050526/AWT/AWT_tree_cb.cxx 
arb-0.0.20050526/AWT/AWT_tree_cb.cxx
--- /home/sid32/tmp/26/arb-0.0.20050526/AWT/AWT_tree_cb.cxx     2004-10-22 
18:45:14.000000000 +0200
+++ arb-0.0.20050526/AWT/AWT_tree_cb.cxx        2005-09-08 11:29:43.000000000 
+0200
@@ -119,7 +119,7 @@
 }
 
 static int nt_sequence_is_partial(GBDATA *gb_species, void *cd_partial) {
-    int wanted  = (int)cd_partial;
+    int wanted  = (long)cd_partial;
     awt_assert(wanted == 0 || wanted == 1);
     int partial = GBT_is_partial(gb_species, 1-wanted, 0);
 
--- arb-0.0.20050526/TRS/trs_server.cxx~        2005-09-08 10:16:52.000000000 
+0000
+++ arb-0.0.20050526/TRS/trs_server.cxx 2005-09-08 10:16:52.000000000 +0000
@@ -76,7 +76,7 @@
                char *eq = strchr(out,'=');
                if (!eq) continue;
                *(eq) = 0;
-               TRS_write_hash(hash,out,(int)(eq+1));
+               TRS_write_hash(hash,out,(long)(eq+1));
        }
        return hash;
 }

Reply via email to