Discussion:
ndmpcopy for Linux
(too old to reply)
Augie Schwer
2007-05-21 21:23:02 UTC
Permalink
Has anyone built ndmpcopy for Linux recently? The Solaris versio
doesn't seem to build anymore and the ndmp.org web site does not loo
very active anymore

--
Augie Schwer - ***@Schwer.us - http://schwer.u
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C07
Michael van Elst
2007-05-22 05:46:55 UTC
Permalink
Post by Augie Schwer
Has anyone built ndmpcopy for Linux recently? The Solaris versio
doesn't seem to build anymore and the ndmp.org web site does not loo
very active anymore
The XDR_AND_SIZE macro in lib/ndmp_common.h is broken an
all of the place there are missing system includes. Her
is a patch

---------------------------------------------------------------------
diff -u -r ndmpcopy-1.2/lib/ndmp_common.h ndmpcopy-1.2-new/lib/ndmp_common.
--- ndmpcopy-1.2/lib/ndmp_common.h 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/lib/ndmp_common.h 2007-05-22 07:33:21.000000000 +020
@@ -37,7 +37,7 @
#define USE_SELEC
#endi

-#define XDR_AND_SIZE(func) (bool_t(*)(XDR*, ...))xdr_##func##,sizeof(func
+#define XDR_AND_SIZE(func) (bool_t(*)(XDR*, ...))xdr_##func,sizeof(func
#define AUTH_REQUIRED TRU
#define AUTH_NOT_REQUIRED FALS

diff -u -r ndmpcopy-1.2/src/Makefile ndmpcopy-1.2-new/src/Makefil
--- ndmpcopy-1.2/src/Makefile 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/src/Makefile 2007-05-22 07:34:43.000000000 +020
@@ -34,9 +34,9 @
LD = $(CC
LDFLAGS =
# These should work for solaris 2.
-LIBS = -L$(LIBDIR) -lndmp -lsocket -lns
+#LIBS = -L$(LIBDIR) -lndmp -lsocket -lns
# These should work for linu
-#LIBS = -L$(LIBDIR) -lndm
+LIBS = -L$(LIBDIR) -lndm


TARGET = ndmpcop
diff -u -r ndmpcopy-1.2/src/dump.c ndmpcopy-1.2-new/src/dump.
--- ndmpcopy-1.2/src/dump.c 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/src/dump.c 2007-05-22 07:36:03.000000000 +020
@@ -21,6 +21,7 @
* DEALINGS IN THE SOFTWARE
*/

+#include <stdlib.h
#include <stdio.h
#include <errno.h
#include <string.h
diff -u -r ndmpcopy-1.2/src/file_history.c ndmpcopy-1.2-new/src/file_history.
--- ndmpcopy-1.2/src/file_history.c 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/src/file_history.c 2007-05-22 07:36:42.000000000 +020
@@ -31,6 +31,8 @
* user wants verbose output
*

+#include <stdio.h

#include "ndmp_common.h
#include "queue.h
#include "main.h
diff -u -r ndmpcopy-1.2/src/log.c ndmpcopy-1.2-new/src/log.
--- ndmpcopy-1.2/src/log.c 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/src/log.c 2007-05-22 07:37:26.000000000 +020
@@ -29,6 +29,8 @
* The majority of this code was taken from the NDMP SDK client toolkit
*

+#include <stdio.h

#include "ndmp_common.h
#include "ndmpc.h
#include "main.h
diff -u -r ndmpcopy-1.2/src/notify.c ndmpcopy-1.2-new/src/notify.
--- ndmpcopy-1.2/src/notify.c 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/src/notify.c 2007-05-22 07:35:27.000000000 +020
@@ -29,6 +29,9 @
* The majority of this code is taken from the NDMP SDK client toolkit
*

+#include <string.h
+#include <stdio.h

#include "ndmp_common.h
#include "queue.h
#include "main.h
diff -u -r ndmpcopy-1.2/src/queue.c ndmpcopy-1.2-new/src/queue.
--- ndmpcopy-1.2/src/queue.c 2000-09-13 00:13:15.000000000 +020
+++ ndmpcopy-1.2-new/src/queue.c 2007-05-22 07:26:35.000000000 +020
@@ -22,6 +22,8 @
*/

#include <malloc.h
+#include <stdio.h
+#include <string.h
#include "main.h
#include "queue.h
#include "ndmp_common.h
---------------------------------------------------------------------

Greetings
--
Michael van Els
Internet: ***@serpens.d
"A potential Snark may lurk in every tree.
Sandeep Cariapa
2007-05-25 02:07:06 UTC
Permalink
Hi

I was able to build it on RHEL4, running kerne
2.6.9-42.EL. Grab the bits from here
http://www.ndmp.org/download/ndmpcop

The mods I made to get it to build were only in
files
./src/Makefil
37c3
< LIBS = -L$(LIBDIR) -lndmp -lsocket -lns
--
Post by Michael van Elst
#LIBS = -L$(LIBDIR) -lndmp -lsocket -lns
39c3
< #LIBS = -L$(LIBDIR) -lndm
--
Post by Michael van Elst
LIBS = -L$(LIBDIR) -lndm
./lib/ndmp_common.
40c4
< #define XDR_AND_SIZE(func) (bool_t(*)(XDR*
..))xdr_##func##,sizeof(func
--
Post by Michael van Elst
#define XDR_AND_SIZE(func) (bool_t(*)(XDR*
..))xdr_##func ,sizeof(func

I did not run any exhaustive tests after I built it
but hopefully this will at least get you started

Cheers
Sandeep Cariap
Sales Engineer, IBRI
http://www.ibrix.co
==============================================
Augie Schwer wrote
Has anyone built ndmpcopy for Linux recently? Th
Solaris versio
doesn't seem to build anymore and the ndmp.org we
site does not loo
very active anymore
Augie Schwer
2007-05-27 13:10:45 UTC
Permalink
Post by Sandeep Cariapa
I was able to build it on RHEL4, running kerne
2.6.9-42.EL. Grab the bits from here
http://www.ndmp.org/download/ndmpcop
Thanks all; it works like a charm now

--
Augie Schwer - ***@Schwer.us - http://schwer.u
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C07
Loading...