Commit f1e13ac2 authored by Daniel Xu's avatar Daniel Xu Committed by Facebook Github Bot

Fix libfollylogging link dependency (#872)

Summary:
The folly logging library introduced a new shared library:
libfollylogging. folly::init recently started to depend on on
libfollylogging's initLoggingOrDie(). The problem is that libfolly is
never linked with libfollylogging, leading to the following error
upon application link time:

    /usr/local/lib/libfolly.so: undefined reference to
    folly::initLoggingOrDie(folly::Range<char const*>)

This patch forces libfollylogging to implicitly link with libfolly
through the removal of libfollylogging altogether.

Note that logging/InitWeak.cpp has been added to the source list.
This was previously omitted.
Closes https://github.com/facebook/folly/pull/872

Reviewed By: simpkins

Differential Revision: D8530795

Pulled By: danobi

fbshipit-source-id: 280fbc2170364621e9a682ae38cf812c23bde5e5
parent f124d94d
......@@ -11,7 +11,7 @@ SUBDIRS = . \
$(MAYBE_INIT) \
chrono/test \
io/test \
logging \
logging/example \
stats/test
ACLOCAL_AMFLAGS = -I m4
......@@ -617,6 +617,31 @@ libfolly_la_SOURCES = \
lang/Assume.cpp \
lang/ColdClass.cpp \
lang/SafeAssert.cpp \
logging/AsyncFileWriter.cpp \
logging/FileHandlerFactory.cpp \
logging/FileWriterFactory.cpp \
logging/GlogStyleFormatter.cpp \
logging/ImmediateFileWriter.cpp \
logging/Init.cpp \
logging/InitWeak.cpp \
logging/LogCategory.cpp \
logging/LogCategoryConfig.cpp \
logging/LogConfig.cpp \
logging/LogConfigParser.cpp \
logging/Logger.cpp \
logging/LoggerDB.cpp \
logging/LogHandlerConfig.cpp \
logging/LogLevel.cpp \
logging/LogMessage.cpp \
logging/LogName.cpp \
logging/LogStream.cpp \
logging/LogStreamProcessor.cpp \
logging/printf.cpp \
logging/RateLimiter.cpp \
logging/StandardLogHandler.cpp \
logging/StandardLogHandlerFactory.cpp \
logging/StreamHandlerFactory.cpp \
logging/xlog.cpp \
detail/MemoryIdler.cpp \
detail/SocketFastOpen.cpp \
MacAddress.cpp \
......
......@@ -664,7 +664,6 @@ AC_CONFIG_FILES([Makefile
experimental/io/test/Makefile
experimental/symbolizer/Makefile
init/Makefile
logging/Makefile
logging/example/Makefile
stats/test/Makefile])
......
SUBDIRS = . example
lib_LTLIBRARIES = libfollylogging.la
libfollylogging_la_SOURCES = \
AsyncFileWriter.cpp \
FileHandlerFactory.cpp \
FileWriterFactory.cpp \
GlogStyleFormatter.cpp \
ImmediateFileWriter.cpp \
Init.cpp \
LogCategory.cpp \
LogCategoryConfig.cpp \
LogConfig.cpp \
LogConfigParser.cpp \
Logger.cpp \
LoggerDB.cpp \
LogHandlerConfig.cpp \
LogLevel.cpp \
LogMessage.cpp \
LogName.cpp \
LogStream.cpp \
LogStreamProcessor.cpp \
printf.cpp \
RateLimiter.cpp \
StandardLogHandler.cpp \
StandardLogHandlerFactory.cpp \
StreamHandlerFactory.cpp \
xlog.cpp
libfollylogging_la_LIBADD = $(top_builddir)/libfolly.la
libfollylogging_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
......@@ -6,4 +6,4 @@ logging_example_LDADD = libfollylogging_example.la
libfollylogging_example_la_SOURCES = lib.cpp
libfollylogging_example_la_LIBADD = \
$(top_builddir)/logging/libfollylogging.la
$(top_builddir)/libfolly.la
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment