I am hitting a compile error when trying to install libDAI (A free/open source C++ library for Discrete Approximate Inference methods) on my ubuntu 14.04LTS system. I cloned the repo from github , edited the makefile for my system (only change was my matlab directory) and run make, which hits this error -
/usr/bin/ld: cannot find -lboost_program_options-mt
this is after doing all the related installs
apt-get install g++ make doxygen graphviz libboost-dev libboost-graph-dev libboost-program-options-dev libboost-test-dev libgmp-dev cimg-dev
as well as a shot in the dark
sudo apt-get install libboost-all-dev
and another, something that apparently worked for someone else namely
sudo apt-get libboost-program-options-dev
which gives an error for me (E: Invalid operation libboost-program-options-dev)
i can't progress without this lib it seems, so i'm at a wall
on a hunch based on
/sbin/ldconfig -p | grep libboost_program
I decided to take out the -mt part in the makefile , leaving me with
BOOSTLIBS_PO=-lboost_program_options (instead of ...options-mt)
Now I get
make /usr/local/MATLAB/R2015a/bin/mex -Iinclude CXX#g++ CXXFLAGS#'-Wno-deprecated -Wall -W -Wextra -fpic' -largeArrayDims -DDAI_WITH_BP -DDAI_WITH_FBP -DDAI_WITH_TRWBP -DDAI_WITH_MF -DDAI_WITH_HAK -DDAI_WITH_LC -DDAI_WITH_TREEEP -DDAI_WITH_JTREE -DDAI_WITH_MR -DDAI_WITH_GIBBS -DDAI_WITH_CBP -DDAI_WITH_DECMAP -lgmpxx -lgmp -output matlab/dai.mexa64 src/matlab/dai.cpp src/matlab/matlab.cpp src/graph.cpp src/dag.cpp src/bipgraph.cpp src/varset.cpp src/daialg.cpp src/alldai.cpp src/clustergraph.cpp src/factor.cpp src/factorgraph.cpp src/properties.cpp src/regiongraph.cpp src/util.cpp src/weightedgraph.cpp src/exceptions.cpp src/exactinf.cpp src/evidence.cpp src/emalg.cpp src/io.cpp src/bp.cpp src/fbp.cpp src/trwbp.cpp src/mf.cpp src/hak.cpp src/lc.cpp src/treeep.cpp src/jtree.cpp src/mr.cpp src/gibbs.cpp src/bbp.cpp src/cbp.cpp src/bp_dual.cpp src/decmap.cpp /home/jeremy/[email protected]/techdev/Research/clothes specific/fashionista/fashionista_v0.2/lib/libdai/libdaigit/libDAI/CXX#g++ not found; check that you are in the correct current folder, and check the spelling of '/home/jeremy/[email protected]/techdev/Research/clothes specific/fashionista/fashionista_v0.2/lib/libdai/libdaigit/libDAI/CXX#g++'.
the makefile has the following
# MATLAB
# MatLab version 7.3 (R2006b) or newer?
NEW_MATLAB=true
# Replace the following by the directory where MatLab has been installed
MATLABDIR=/usr/local/MATLAB/R2015a
#echo $MATLABDIR
# The following should resolve to the MatLab mex compile command
MEX=$(MATLABDIR)/bin/mex
# Specify the C++ compiler and flags for MEX
#MEXFLAGS:='g++'
MEXFLAGS:=CXX\#$(CC) CXXFLAGS\#'$(CCFLAGS)'