Install Boost.Log on Fedora 17

I am trying to install Boost.Log on Fedora 17 and already did yum install boost-*. All related tutorials, and answers to similar questions involve moving lib/log into boost source directory and executing bootstrap.sh. I cannot find the boost source directory, or the bootstrap.sh file in my system (did find / -name '*bootstrap.sh' 2> /dev/null). All I can find is /usr/share/boost-build/ with lots of jam files in it. Concluding that the yum installation does not contain the source directory and bootstrap.sh, I tried to build it manually but the Boost.Log source files include windows specific headers and I got double confused. Can anyone shed a light on this?

Answers


Wrote the following Makefile to compile and install, which does not include files referring to windows.h, I believe it works:

SRCS= attribute_name.cpp attribute_set.cpp attribute_values_view.cpp \
      code_conversion.cpp core.cpp \
      default_filter_factory.cpp default_sink.cpp event.cpp \
      exceptions.cpp filter_parser.cpp \
      formatter_parser.cpp global_logger_storage.cpp init_from_settings.cpp \
      init_from_stream.cpp light_rw_mutex.cpp named_scope.cpp \
      once_block.cpp parser_utils.cpp process_id.cpp \
      record_ostream.cpp severity_level.cpp syslog_backend.cpp \
      text_file_backend.cpp text_ostream_backend.cpp thread_id.cpp \
      threadsafe_queue.cpp thread_specific.cpp timer.cpp \
      timestamp.cpp trivial.cpp
OBJS=$(SRCS:.cpp=.o)
CXXFLAGS=-std=c++11 -DBOOST_FILESYSTEM_VERSION=2
libboost_log.so: $(OBJS)
  g++ -shared $^ -o $@ -lpthread -lboost_system -lboost_thread-mt -lrt -lboost_filesystem
%.o: %.cpp
  g++ $(CXXFLAGS) -fPIC -c $^ -o $@
install:
  cp libboost_log.so /usr/lib
clean: 
  rm *.o

It turns out that the main build tool in the current Fedora repo's yum boost-build package is called "bjam" and not "b2" (as implied by the latest documentation).

So, if you can't find b2 use bjam.


Need Your Help

Can an NHibernate session have two data readers open in separate threads?

c# .net nhibernate fluent-nhibernate

I'd like to know the correct approach for running two simultaneous queries using NHibernate. Right now, I have a single ISession object that I use for all my queries:

Are there limitations to JS searching by HTML ID tag based on type?

javascript jquery html jquery-selectors

I just did a test, and it seems like the below code will NOT find the following div <div class="class-name" id="1">