Package: xmpi
Severity: normal
Tags: patch

When building 'xmpi' on amd64,
I get the following error:

make[3]: Entering directory `/xmpi-2.2.3b8/src/libxmpi'
/bin/sh ../../libtool --mode=link mpic++.lam  -g -O2   -o libxmpi.la -rpath 
/usr/lib  app_mgmt.lo bhostparse.lo build_run.lo mpitr_com.lo mpitr_dtype.lo 
ndi_resolve.lo nodeslist.lo trdrain_mpi.lo xmpi_asc_parse.lo 
xmpi_sys_snapshot.lam.lo xmpi_sys.lam.lo  
mpic++.lam -shared /usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64/crti.o 
/usr/lib/gcc/x86_64-linux/4.0.0/crtbeginS.o  .libs/app_mgmt.o 
.libs/bhostparse.o .libs/build_run.o .libs/mpitr_com.o .libs/mpitr_dtype.o 
.libs/ndi_resolve.o .libs/nodeslist.o .libs/trdrain_mpi.o 
.libs/xmpi_asc_parse.o .libs/xmpi_sys_snapshot.lam.o .libs/xmpi_sys.lam.o  
-L/usr/lib/lam/lib -L/usr/lib/gcc/x86_64-linux/4.0.0 
-L/usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64 
-L/usr/lib/gcc/x86_64-linux/4.0.0/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 
-llammpio -llammpi++ -llamf77mpi -lmpi -llam -lutil -ldl -lstdc++ -lm -lpthread 
-lc -lgcc_s /usr/lib/gcc/x86_64-linux/4.0.0/crtendS.o 
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64/crtn.o  -o .libs/libxmpi.0.0.0
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64/crti.o(.init+0x0): In 
function `_init':
/glibc-2.3.2.ds1/build-tree/amd64-libc/csu/crti.S:11: multiple definition of 
`_init'
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64/crti.o(.init+0x0):/glibc-2.3.2.ds1/build-tree/amd64-libc/csu/crti.S:11:
 first defined here
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64/crti.o(.fini+0x0): In 
function `_fini':
: multiple definition of `_fini'
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../lib64/crti.o(.fini+0x0): first 
defined here
/usr/lib/gcc/x86_64-linux/4.0.0/crtbeginS.o(.data.rel+0x0): multiple definition 
of `__dso_handle'
/usr/lib/gcc/x86_64-linux/4.0.0/crtbeginS.o(.data.rel+0x0): first defined here
collect2: ld returned 1 exit status
mpic++.lam: No such file or directory
make[3]: *** [libxmpi.la] Error 1
make[3]: Leaving directory `/xmpi-2.2.3b8/src/libxmpi'


The configure script uses "$LD" instead of $LD in its linker tests. This
makes the shell look for the filename "ld -m elf_x86_64" on amd64 which
does not exists because the ' -m elf_86_64' part is not interpreted as
an option but as part of the filename. Therefore 'configure' does not
find the GNU ld and does not set the correct linker options (the option
-nostdlib will be missing).

This "$LD" problem was caused by using an old buggy version of
'libtool.m4' when creating the configure script.

There are also some "cast from 'void*' to 'int' loses precision" errors
when xmpi is compiled with gcc-4.0 on amd64


With the attached patch 'xmpi' can be compiled on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/xmpi-2.2.3b8/aclocal.m4 ./aclocal.m4
--- ../tmp-orig/xmpi-2.2.3b8/aclocal.m4 2003-09-03 05:31:28.000000000 +0200
+++ ./aclocal.m4        2005-03-23 11:30:52.000000000 +0100
@@ -2873,7 +2873,7 @@
 [AC_REQUIRE([AC_PROG_EGREP])dnl
 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `"$LD" -v 2>&1 </dev/null` in
+case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
   ;;
diff -urN ../tmp-orig/xmpi-2.2.3b8/configure ./configure
--- ../tmp-orig/xmpi-2.2.3b8/configure  2005-03-23 11:41:41.764997040 +0100
+++ ./configure 2005-03-23 11:31:46.000000000 +0100
@@ -9728,7 +9728,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `"$LD" -v 2>&1 </dev/null` in
+case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
   ;;
@@ -14877,7 +14877,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `"$LD" -v 2>&1 </dev/null` in
+case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
   ;;
diff -urN ../tmp-orig/xmpi-2.2.3b8/src/xmpi/xmpi_vendor.cc 
./src/xmpi/xmpi_vendor.cc
--- ../tmp-orig/xmpi-2.2.3b8/src/xmpi/xmpi_vendor.cc    2003-09-03 
06:28:54.000000000 +0200
+++ ./src/xmpi/xmpi_vendor.cc   2005-03-23 11:41:31.957893109 +0100
@@ -165,7 +165,7 @@
 vendor_schema_toggle_change_cb(Widget, XtPointer client_data, 
                               XtPointer call_data)
 {
-  int which = (int) client_data;
+  long which = (long) client_data;
   XmToggleButtonCallbackStruct *state = 
     (XmToggleButtonCallbackStruct *) call_data;
 
@@ -177,7 +177,7 @@
 vendor_schema_textbox_change_cb(Widget ch_widget, XtPointer client_data,
                                XtPointer)
 {
-  int which = (int) client_data;
+  long which = (long) client_data;
 
   if (! (schema_options[which].current_val.xmpi_text == NULL))
     free(schema_options[which].current_val.xmpi_text);
@@ -200,7 +200,7 @@
 vendor_run_toggle_change_cb(Widget, XtPointer client_data, 
                               XtPointer call_data)
 {
-  int which = (int) client_data;
+  long which = (long) client_data;
   XmToggleButtonCallbackStruct *state = 
     (XmToggleButtonCallbackStruct *) call_data;
 
@@ -213,7 +213,7 @@
 vendor_run_textbox_change_cb(Widget ch_widget, XtPointer client_data,
                                XtPointer)
 {
-  int which = (int) client_data;
+  long which = (long) client_data;
 
   if (! (run_options[which].current_val.xmpi_text == NULL))
     free(run_options[which].current_val.xmpi_text);


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to