summaryrefslogtreecommitdiff
path: root/examples/dragmap
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dragmap')
-rw-r--r--examples/dragmap/Makefile6
-rw-r--r--examples/dragmap/README.md47
-rwxr-xr-xexamples/dragmap/config.mk15
-rwxr-xr-xexamples/dragmap/run.sh11
-rwxr-xr-xexamples/dragmap/test1.sh3
-rwxr-xr-xexamples/dragmap/test2.sh5
-rwxr-xr-xexamples/dragmap/test3.sh7
7 files changed, 94 insertions, 0 deletions
diff --git a/examples/dragmap/Makefile b/examples/dragmap/Makefile
new file mode 100644
index 0000000..31dd118
--- /dev/null
+++ b/examples/dragmap/Makefile
@@ -0,0 +1,6 @@
+include config.mk
+$(info BOOST_ROOT is $(BOOST_ROOT))
+$(info BOOST_INCLUDEDIR is $(BOOST_INCLUDEDIR))
+$(info BOOST_LIBRARYDIR is $(BOOST_LIBRARYDIR))
+$(info CPPFLAGS is $(CPPFLAGS))
+$(info LDFLAGS is $(LDFLAGS))
diff --git a/examples/dragmap/README.md b/examples/dragmap/README.md
new file mode 100644
index 0000000..29ba382
--- /dev/null
+++ b/examples/dragmap/README.md
@@ -0,0 +1,47 @@
+# README
+
+Trying to build [DRAGMAP](https://github.com/Illumina/DRAGMAP) using updated
+[Boost libraries](https://www.boost.org/). But the building process seems to be
+using the outdated system Boost libraries in `/usr/include/boost/`. This is because I keep getting these errors:
+
+ /usr/include/boost/program_options/detail/value_semantic.hpp:170: undefined reference to `boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int)'
+
+Here I examine the behaviour of the following environment variables:
+
+* `BOOST_ROOT`
+* `BOOST_INCLUDEDIR`
+* `BOOST_LIBRARYDIR`
+
+The required Boost libraries are:
+
+ BOOST_LIBRARIES := system filesystem date_time thread iostreams regex program_options
+
+They reside in `/usr/include/boost169/boost/`; for example:
+
+ /usr/include/boost169/boost/system
+ /usr/include/boost169/boost/filesystem
+
+Use `./run.sh` to run all the test scripts.
+
+## Notes
+
+* The `CPPFLAGS` macro is the one to use to specify `#include` directories.
+* The `LDFLAGS` is normally set to contain options that are passed through to
+ the linker (so may include required libraries).
+
+[Probably the same
+problem](https://stackoverflow.com/questions/62280304/yum-using-boost-1-69-instead-of-default-1-53-version-on-centos)
+but I do not want to manually manipulate the symlinks by changing:
+
+ /lib64/libboost_system.so -> libboost_system.so.1.53.0
+
+to:
+
+ /lib64/libboost_system.so -> libboost_system.so.1.69.0
+
+## Fix
+
+Do not include `boost` in the DIR. For example:
+
+ export BOOST_INCLUDEDIR=/usr/include/boost169
+ export BOOST_LIBRARYDIR=/usr/lib64/boost169
diff --git a/examples/dragmap/config.mk b/examples/dragmap/config.mk
new file mode 100755
index 0000000..433163a
--- /dev/null
+++ b/examples/dragmap/config.mk
@@ -0,0 +1,15 @@
+BOOST_LIBRARIES := system filesystem date_time thread iostreams regex program_options
+
+ifneq (,$(BOOST_ROOT))
+BOOST_INCLUDEDIR?=$(BOOST_ROOT)/include
+BOOST_LIBRARYDIR?=$(BOOST_ROOT)/lib
+endif # ifneq (,$(BOOST_ROOT))
+
+ifneq (,$(BOOST_INCLUDEDIR))
+CPPFLAGS += -I $(BOOST_INCLUDEDIR)
+endif
+
+ifneq (,$(BOOST_LIBRARYDIR))
+LDFLAGS += -L $(BOOST_LIBRARYDIR)
+endif
+LDFLAGS += $(BOOST_LIBRARIES:%=-lboost_%)
diff --git a/examples/dragmap/run.sh b/examples/dragmap/run.sh
new file mode 100755
index 0000000..dcb38fd
--- /dev/null
+++ b/examples/dragmap/run.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+>&2 echo -e "Running test1\n"
+./test1.sh
+>&2 echo
+>&2 echo -e "Running test2\n"
+./test2.sh
+>&2 echo
+>&2 echo -e "Running test3\n"
+./test3.sh
+>&2 echo
diff --git a/examples/dragmap/test1.sh b/examples/dragmap/test1.sh
new file mode 100755
index 0000000..d9eae58
--- /dev/null
+++ b/examples/dragmap/test1.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make
diff --git a/examples/dragmap/test2.sh b/examples/dragmap/test2.sh
new file mode 100755
index 0000000..8bbc6ff
--- /dev/null
+++ b/examples/dragmap/test2.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+export BOOST_ROOT=/usr/include/boost169/boost/
+
+make
diff --git a/examples/dragmap/test3.sh b/examples/dragmap/test3.sh
new file mode 100755
index 0000000..99aca0d
--- /dev/null
+++ b/examples/dragmap/test3.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+export BOOST_ROOT=/usr/include/boost169/
+export BOOST_INCLUDEDIR=/usr/include/boost169
+export BOOST_LIBRARYDIR=/usr/lib64/boost169
+
+make