Open grimbough opened 3 years ago
@kasperdanielhansen I'm not sure how to go about replicating your setup for debugging this, but I thought it'd be useful to have an issue to track suggestions.
After a cursory look over the log, I'm suspicious about the apostrophe in -lm'
on the configure: Corrected Fortran libraries:
line (also the line above that). I'm not sure where it's coming from, but I've seed stray apostrophes mess up linking lines before.
Well, while it is custom, it is the department-wide installation of R on our HPC with around ~800 packages installed (although I guess that's "only") and many users.
I agree the tick seems weird. Could have been a copy and paste error, I had to do this via screen so I could only get a screenful at a time.
Looking at the configure
script I do see a lot of potential issues, some of which are related to my issue. In line 94 you start the configure script inside of src/SYMPHONY
. Here, you by-pass the system level CFLAGS and CXXFLAGS. You should grab both of these from R CMD config
and you should also grab FFLAGS. The current approach only works on systems where you don't need custom library paths.
Fixing this makes the package install on my system. I did the following
94 else
95 (cd src/SYMPHONY && \
96 ./configure \
97 --enable-static --disable-shared --with-pic \
98 --with-application=no --disable-dependency-tracking \
99 --disable-zlib --disable-bzlib \
100 --disable-cplex-libcheck --disable-glpk-libcheck \
101 --disable-osl-libcheck --disable-soplex-libcheck \
102 --disable-xpress-libcheck \
103 CC="`${R} CMD config CC`" \
104 CFLAGS="`${R} CMD config CFLAGS`" \
105 CXX="`${R} CMD config CXX`" \
106 CXXFLAGS="`${R} CMD config CXXFLAGS`" \
107 F77="`${R} CMD config FC`" \
108 FFLAGS="`${R} CMD config FFLAGS`" \
109 FLIBS="`${R} CMD config FLIBS`")
110 SYMPHONY_LIBS="-lSym -lCgl -lOsiClp -lClp -lOsi -lCoinUtils"
You may also need to carry over LDFLAGS and the various CPICFLAGS (by various I mean CXXPICFLAGS etc), but that was not needed by my system. The Darwin stuff looks a bit weird to me, where you switch compiler if it doesn't support openmp.
A diff:
diff --git a/configure b/configure
index ea3a741..11568a8 100755
--- a/configure
+++ b/configure
@@ -100,13 +100,12 @@ EOF
--disable-cplex-libcheck --disable-glpk-libcheck \
--disable-osl-libcheck --disable-soplex-libcheck \
--disable-xpress-libcheck \
- CFLAGS="-w -g -O2" \
- CXXFLAGS="-w -g -O2" \
CC="`${R} CMD config CC`" \
- #CPP="`${R} CMD config CPP`" \
+ CFLAGS="`${R} CMD config CFLAGS`" \
CXX="`${R} CMD config CXX`" \
- #CXXCPP="`${R} CMD config CXXCPP`" \
+ CXXFLAGS="`${R} CMD config CXXFLAGS`" \
F77="`${R} CMD config FC`" \
+ FFLAGS="`${R} CMD config FFLAGS`" \
FLIBS="`${R} CMD config FLIBS`")
SYMPHONY_LIBS="-lSym -lCgl -lOsiClp -lClp -lOsi -lCoinUtils"
SYMPHONY_INCLUDE_PATH="-ISYMPHONY/include"
Also, put a link to the Github repos in the DESCRIPTION.