[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiling on OpenBSD



Attached is a diff of the changes I needed to make in order to get
kivaloo to compile on OpenBSD and install in my homedir. It would seem
OpenBSD doesn't need -lrt.

Also I had to remove $$$$_ from the ends of the tmp filenames since on
$$$$_ would be different for each step, meaning the binary saved had a
different number at the end then what was then used to copy it over.

Also, I switched the chmod and strip command around since I got permission
denied errors when strip ran. The current order may be fine when ran as
root but installing as a normal user in my homedir the binaries had to
have write permission in order for me to strip them.

Obviously, the diff isn't meant to be applied, just shows the things I
had to change to make it compile and install correctly.

Thanks.
diff -u -p -r kivaloo-1.0.0/bench/bulk_extract/Makefile backup/kivaloo-1.0.0/bench/bulk_extract/Makefile
--- kivaloo-1.0.0/bench/bulk_extract/Makefile	Sun Mar 27 20:41:52 2011
+++ backup/kivaloo-1.0.0/bench/bulk_extract/Makefile	Mon Mar 28 18:32:08 2011
@@ -2,7 +2,7 @@
 PROG=kivaloo-bulk_extract
 SRCS=main.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c kvldskey.c monoclock.c sock.c warnp.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_kvlds_client.c
 IDIRS=-I ../../lib/datastruct -I ../../lib/util -I ../../lib/alg -I ../../lib/events -I ../../lib/network -I ../../lib/netbuf -I ../../lib/wire -I ../../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
diff -u -p -r kivaloo-1.0.0/bench/bulk_insert/Makefile backup/kivaloo-1.0.0/bench/bulk_insert/Makefile
--- kivaloo-1.0.0/bench/bulk_insert/Makefile	Sun Mar 27 20:41:52 2011
+++ backup/kivaloo-1.0.0/bench/bulk_insert/Makefile	Mon Mar 28 18:32:01 2011
@@ -2,7 +2,7 @@
 PROG=kivaloo-bulk_insert
 SRCS=main.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c kvldskey.c monoclock.c sock.c warnp.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_kvlds_client.c
 IDIRS=-I ../../lib/datastruct -I ../../lib/util -I ../../lib/alg -I ../../lib/events -I ../../lib/network -I ../../lib/netbuf -I ../../lib/wire -I ../../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
diff -u -p -r kivaloo-1.0.0/bench/bulk_update/Makefile backup/kivaloo-1.0.0/bench/bulk_update/Makefile
--- kivaloo-1.0.0/bench/bulk_update/Makefile	Sun Mar 27 20:41:52 2011
+++ backup/kivaloo-1.0.0/bench/bulk_update/Makefile	Mon Mar 28 18:32:15 2011
@@ -2,7 +2,7 @@
 PROG=kivaloo-bulk_update
 SRCS=main.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c kvldskey.c monoclock.c sock.c warnp.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_kvlds_client.c
 IDIRS=-I ../../lib/datastruct -I ../../lib/util -I ../../lib/alg -I ../../lib/events -I ../../lib/network -I ../../lib/netbuf -I ../../lib/wire -I ../../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
diff -u -p -r kivaloo-1.0.0/bench/hotspot_read/Makefile backup/kivaloo-1.0.0/bench/hotspot_read/Makefile
--- kivaloo-1.0.0/bench/hotspot_read/Makefile	Sun Mar 27 20:41:53 2011
+++ backup/kivaloo-1.0.0/bench/hotspot_read/Makefile	Mon Mar 28 18:32:34 2011
@@ -2,7 +2,7 @@
 PROG=kivaloo-hotspot_read
 SRCS=main.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c kvldskey.c monoclock.c sock.c warnp.c mkpair.c sha256.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_kvlds_client.c
 IDIRS=-I ../../lib/datastruct -I ../../lib/util -I ../lib -I ../../lib/alg -I ../../lib/events -I ../../lib/network -I ../../lib/netbuf -I ../../lib/wire -I ../../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
diff -u -p -r kivaloo-1.0.0/bench/random_mixed/Makefile backup/kivaloo-1.0.0/bench/random_mixed/Makefile
--- kivaloo-1.0.0/bench/random_mixed/Makefile	Sun Mar 27 20:41:53 2011
+++ backup/kivaloo-1.0.0/bench/random_mixed/Makefile	Mon Mar 28 18:32:28 2011
@@ -2,7 +2,7 @@
 PROG=kivaloo-random_mixed
 SRCS=main.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c kvldskey.c monoclock.c sock.c warnp.c mkpair.c sha256.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_kvlds_client.c
 IDIRS=-I ../../lib/datastruct -I ../../lib/util -I ../lib -I ../../lib/alg -I ../../lib/events -I ../../lib/network -I ../../lib/netbuf -I ../../lib/wire -I ../../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
diff -u -p -r kivaloo-1.0.0/bench/random_read/Makefile backup/kivaloo-1.0.0/bench/random_read/Makefile
--- kivaloo-1.0.0/bench/random_read/Makefile	Sun Mar 27 20:41:53 2011
+++ backup/kivaloo-1.0.0/bench/random_read/Makefile	Mon Mar 28 18:32:22 2011
@@ -2,7 +2,7 @@
 PROG=kivaloo-random_read
 SRCS=main.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c kvldskey.c monoclock.c sock.c warnp.c mkpair.c sha256.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_kvlds_client.c
 IDIRS=-I ../../lib/datastruct -I ../../lib/util -I ../lib -I ../../lib/alg -I ../../lib/events -I ../../lib/network -I ../../lib/netbuf -I ../../lib/wire -I ../../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
diff -u -p -r kivaloo-1.0.0/kvlds/Makefile backup/kivaloo-1.0.0/kvlds/Makefile
--- kivaloo-1.0.0/kvlds/Makefile	Sun Mar 27 20:41:51 2011
+++ backup/kivaloo-1.0.0/kvlds/Makefile	Mon Mar 28 18:38:12 2011
@@ -2,16 +2,16 @@
 PROG=kivaloo-kvlds
 SRCS=main.c dispatch.c dispatch_mr.c dispatch_nmr.c btree.c btree_balance.c btree_cleaning.c btree_mlen.c btree_sync.c btree_find.c btree_mutate.c btree_node.c btree_node_split.c btree_node_merge.c serialize.c node.c elasticarray.c kvldskey.c kvhash.c kvpair.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c pool.c asprintf.c daemonize.c humansize.c monoclock.c sock.c warnp.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c network_accept.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c proto_lbs_client.c proto_kvlds_server.c
 IDIRS=-I ../lib/datastruct -I ../lib/util -I ../lib/alg -I ../lib/events -I ../lib/network -I ../lib/netbuf -I ../lib/wire -I ../lib/proto_lbs -I ../lib/proto_kvlds
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
 install:${PROG}
 	mkdir -p ${BINDIR}
-	cp ${PROG} ${BINDIR}/_inst.${PROG}.$$$$_
-	chmod 0555 ${BINDIR}/_inst.${PROG}.$$$$_
-	strip ${BINDIR}/_inst.${PROG}.$$$$_
-	mv -f ${BINDIR}/_inst.${PROG}.$$$$_ ${BINDIR}/${PROG}
+	cp ${PROG} ${BINDIR}/_inst.${PROG}
+	strip ${BINDIR}/_inst.${PROG}
+	chmod 0555 ${BINDIR}/_inst.${PROG}
+	mv -f ${BINDIR}/_inst.${PROG} ${BINDIR}/${PROG}
 
 clean:
 	rm -f ${PROG} ${SRCS:.c=.o}
diff -u -p -r kivaloo-1.0.0/lbs/Makefile backup/kivaloo-1.0.0/lbs/Makefile
--- kivaloo-1.0.0/lbs/Makefile	Sun Mar 27 20:41:50 2011
+++ backup/kivaloo-1.0.0/lbs/Makefile	Mon Mar 28 18:38:20 2011
@@ -2,16 +2,16 @@
 PROG=kivaloo-lbs
 SRCS=main.c dispatch.c dispatch_request.c dispatch_response.c worker.c storage.c storage_findfiles.c storage_util.c disk.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c asprintf.c daemonize.c hexify.c monoclock.c sock.c warnp.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c network_accept.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c proto_lbs_server.c
 IDIRS=-I ../lib/datastruct -I ../lib/util -I ../lib/alg -I ../lib/events -I ../lib/network -I ../lib/netbuf -I ../lib/wire -I ../lib/proto_lbs
-LDADD=-lpthread -lrt
+LDADD=-lpthread
 
 all:	${PROG}
 
 install:${PROG}
 	mkdir -p ${BINDIR}
-	cp ${PROG} ${BINDIR}/_inst.${PROG}.$$$$_
-	chmod 0555 ${BINDIR}/_inst.${PROG}.$$$$_
-	strip ${BINDIR}/_inst.${PROG}.$$$$_
-	mv -f ${BINDIR}/_inst.${PROG}.$$$$_ ${BINDIR}/${PROG}
+	cp ${PROG} ${BINDIR}/_inst.${PROG}
+	strip ${BINDIR}/_inst.${PROG}
+	chmod 0555 ${BINDIR}/_inst.${PROG}
+	mv -f ${BINDIR}/_inst.${PROG} ${BINDIR}/${PROG}
 
 clean:
 	rm -f ${PROG} ${SRCS:.c=.o}
diff -u -p -r kivaloo-1.0.0/mux/Makefile backup/kivaloo-1.0.0/mux/Makefile
--- kivaloo-1.0.0/mux/Makefile	Sun Mar 27 20:41:51 2011
+++ backup/kivaloo-1.0.0/mux/Makefile	Mon Mar 28 18:38:30 2011
@@ -2,16 +2,16 @@
 PROG=kivaloo-mux
 SRCS=main.c dispatch.c elasticarray.c ptrheap.c timerqueue.c elasticqueue.c seqptrmap.c asprintf.c daemonize.c monoclock.c sock.c warnp.c crc32c.c events_immediate.c events_network.c events_timer.c events.c network_buf.c network_accept.c netbuf_read.c netbuf_write.c wire_packet.c wire_readpacket.c wire_writepacket.c wire_requestqueue.c
 IDIRS=-I ../lib/datastruct -I ../lib/util -I ../lib/alg -I ../lib/events -I ../lib/network -I ../lib/netbuf -I ../lib/wire
-LDADD=-lrt
+LDADD=
 
 all:	${PROG}
 
 install:${PROG}
 	mkdir -p ${BINDIR}
-	cp ${PROG} ${BINDIR}/_inst.${PROG}.$$$$_
-	chmod 0555 ${BINDIR}/_inst.${PROG}.$$$$_
-	strip ${BINDIR}/_inst.${PROG}.$$$$_
-	mv -f ${BINDIR}/_inst.${PROG}.$$$$_ ${BINDIR}/${PROG}
+	cp ${PROG} ${BINDIR}/_inst.${PROG}
+	strip ${BINDIR}/_inst.${PROG}
+	chmod 0555 ${BINDIR}/_inst.${PROG}
+	mv -f ${BINDIR}/_inst.${PROG} ${BINDIR}/${PROG}
 
 clean:
 	rm -f ${PROG} ${SRCS:.c=.o}