ypmen / PulsarX

Pulsar searching
GNU General Public License v3.0
16 stars 6 forks source link

compile issue on RHEL8 #2

Open scottransom opened 1 year ago

scottransom commented 1 year ago

Hi Yunpeng,

I had issues compiling and was able to fix them by two small changes. One is for recent versions of Python. And the other is to get libboost to link correctly:

diff --git a/config/ax_python.m4 b/config/ax_python.m4
index 05efd1c..e66cd55 100644
--- a/config/ax_python.m4
+++ b/config/ax_python.m4
@@ -55,7 +55,7 @@
 AC_DEFUN([AX_PYTHON],
 [AC_MSG_CHECKING(for python build information)
 AC_MSG_RESULT([])
-for python in python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
+for python in python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
 AC_CHECK_PROGS(PYTHON_BIN, [$python])
 ax_python_bin=$PYTHON_BIN
 if test x$ax_python_bin != x; then
diff --git a/configure.ac b/configure.ac
index 3f5ba4d..48aee8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ CXXFLAGS='-std=c++11 -O3'
 LT_INIT

 # Checks for libraries.
-AX_BOOST_BASE([1.56], [LIBS="$LIBS -lboost_program_options -lboost_log"], [echo "Boost library was not found!";exit -1])
+AX_BOOST_BASE([1.56], [LIBS="$LIBS -lboost_system -lboost_program_options -lboost_log"], [echo "Boost library was not found!";exit -1])
 AC_CHECK_LIB([cfitsio], [ffgky], [], [echo "cfitsio library was not found!";exit -1])
 AC_CHECK_LIB([png], [png_set_flush], [], [echo "library not found!";exit -1])
 AX_PTHREAD([LIBS+=" -lpthread"], [echo "library not found!";exit -1])
ypmen commented 5 months ago

Hi Scott. Didn't notice your message for a long time. Thanks for reporting the issue!