libDAI compile error on Mac OS X

32 views
Skip to first unread message

George Beck

unread,
Dec 12, 2019, 9:55:06 AM12/12/19
to libDAI
when compiling libDAI on Mac OS X with boost from Homebrew (1.70) I get the following error:

$ make


g++ -Iinclude -I/opt/local/include -I/usr/local/lib -I../gmp -I/usr/local/Cellar/boost/1.70.0/include/boost -Wno-deprecated -Wall -W -Wextra -fPIC -DMACOSX -arch x86_64 -O3 -g -DDAI_DEBUG  -Llib -L/opt/local/lib -L/../gmp/.libs -c src/graph.cpp

clang: warning: argument unused during compilation: '-Llib' [-Wunused-command-line-argument]

clang: warning: argument unused during compilation: '-L/opt/local/lib' [-Wunused-command-line-argument]

clang: warning: argument unused during compilation: '-L/../gmp/.libs' [-Wunused-command-line-argument]

In file included from src/graph.cpp:9:

In file included from include/dai/graph.h:20:

include/dai/util.h:41:14: fatal error: 'boost/tr1/unordered_map.hpp' file not found

    #include <boost/tr1/unordered_map.hpp> // only present in boost 1.37 and higher

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

make: *** [graph.o] Error 1




The boost library is different on Mac OS X for some reason. Is there any way this could be fixed without forking libdai ?
Thank you

George

Joris Mooij

unread,
Dec 12, 2019, 11:37:58 AM12/12/19
to George Beck, libDAI
Hi George,

could you try whether replacing in the libDAI source code any

#include <boost/tr1/unordered_map.hpp> // only present in boost 1.37 and higher

by

#include <boost/unordered_map.hpp> // only present in boost 1.37 and higher

fixes the problem for you?

Best wishes,
Joris
> --
> You received this message because you are subscribed to the Google Groups
> "libDAI" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to libdai+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/
> libdai/047a9c74-db9e-4a60-b9b3-b0e8da996ab5%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages