【问题标题】:Error while trying to make a RabbitMQ C-master project尝试创建 RabbitMQ C-master 项目时出错
【发布时间】:2017-08-22 04:45:52
【问题描述】:

我正在尝试构建自己的项目,即使用 RabbitMQ C-master 的 smart_parking。 C API 的链接是: https://github.com/alanxz/rabbitmq-c

我在 rabbitmq 文件夹中创建了一个名为 smart_parking 的文件夹。我还编写了 CMakeLists.txt 文件并编辑了 Makefile.am 如下:

CMakeLists.txt:

# vim:set ts=2 sw=2 sts=2 et:
include_directories(${LIBRABBITMQ_INCLUDE_DIRS})

if (WIN32)
    set(PLATFORM_DIR win32)
else (WIN32)
    set(PLATFORM_DIR unix)
endif (WIN32)

set(COMMON_SRCS
    utils.h
    utils.c
    ${PLATFORM_DIR}/platform_utils.c
    )

add_executable(client_1 client_1.c ${COMMON_SRCS})
target_link_libraries(client_1 ${RMQ_LIBRARY_TARGET})

add_executable(client_2 client_2.c ${COMMON_SRCS})
target_link_libraries(client_2 ${RMQ_LIBRARY_TARGET})

add_executable(client_3 client_3.c ${COMMON_SRCS})
target_link_libraries(client_3 ${RMQ_LIBRARY_TARGET})

add_executable(client_4 client_4.c ${COMMON_SRCS})
target_link_libraries(client_4 ${RMQ_LIBRARY_TARGET})

Makefile.am:

if SMART_PARKING
noinst_LTLIBRARIES += smart_parking/libutils.la

smart_parking_libutils_la_SOURCES = \
    smart_parking/utils.c \
    smart_parking/utils.h
smart_parking_libutils_la_CFLAGS = $(AM_CFLAGS)

if OS_UNIX
smart_parking_libutils_la_SOURCES += smart_parking/unix/platform_utils.c
endif

if OS_WIN32
smart_parking_libutils_la_SOURCES += smart_parking/win32/platform_utils.c
smart_parking_libutils_la_CFLAGS += -I$(top_srcdir)/tools/win32/msinttypes
endif

noinst_PROGRAMS = \
    smart_parking/client_1 \
    smart_parking/client_2 \
    smart_parking/client_3 \
    smart_parking/client_4 

smart_parking_client_1_SOURCES = smart_parking/client_1.c
smart_parking_client_1_LDADD = \
    smart_parking/libutils.la \
    librabbitmq/librabbitmq.la

smart_parking_client_2_SOURCES = smart_parking/client_2.c
smart_parking_client_2_LDADD = \
    smart_parking/libutils.la \
    librabbitmq/librabbitmq.la

smart_parking_client_3_SOURCES = smart_parking/client_3.c
smart_parking_client_3_LDADD = \
    smart_parking/libutils.la \
    librabbitmq/librabbitmq.la

smart_parking_client_4_SOURCES = smart_parking/client_4.c
smart_parking_client_4_LDADD = \
    smart_parking/libutils.la \
    librabbitmq/librabbitmq.la
endif

但是当我尝试制作项目时,我收到以下错误:

GEN      tools/doc/amqp-publish.1
usage: xmlto [OPTION]... FORMAT XML
OPTIONs are:
  -v              verbose output (-vv for very verbose)
  -x stylesheet   use the specified stylesheet instead of choosing one
  -m fragment     use the XSL fragment to customize the stylesheet
  -o directory    put output in the specified directory instead of
                  the current working directory
  -p postprocopts pass option to postprocessor
  --extensions    turn on stylesheet extensions for this tool chain
  --noautosize    do not autodetect paper size via locales or paperconf
  --noclean       temp files are not deleted automatically
                  (good for diagnostics)
  --noextensions  do not use passivetex/fop extensions
  --searchpath    colon-separated list of fallback directories
  --skip-validation
                  do not attempt to validate the input before processing
  --stringparam paramname=paramvalue
                  pass a named parameter to the stylesheet from the
                  command line
  --with-fop      use fop for formatting (if fop available)
  --with-dblatex  use dblatex for formatting (if dblatex available)

Available FORMATs depend on the type of the XML file (which is
determined automatically).

For documents of type "docbook":
awt  dvi  epub  fo  html  htmlhelp  html-nochunks  javahelp  man  mif  pcl  pdf  ps  svg  text  txt  xhtml  xhtml-nochunks

For documents of type "xhtml1":
awt  dvi  fo  mif  pcl  pdf  ps  svg  txt

For documents of type "fo":
awt  dvi  mif  pcl  pdf  ps  svg  txt
make[1]: *** [tools/doc/amqp-publish.1] Error 1
make[1]: Leaving directory `/home/l4tmm/Desktop/Smart parking simulation in C/rabbitmq-c'
make: *** [all] Error 2

【问题讨论】:

  • 如果您要将项目添加到 rabbitmq-c 构建系统,您只需将其添加到 CMakeLists.txtMakefile.am 文件中,而不是同时添加。

标签: c makefile cmake rabbitmq-c


【解决方案1】:

usage: xmlto [OPTION]... FORMAT XML 错误是由于从构建脚本中错误地调用了 xmlto。通过将--disable-docs 传递给配置脚本来禁用文档生成。

【讨论】:

  • 您能否详细说明如何执行此操作?
  • 运行./configure时添加--disable-docs标志,例如./configure --disable-docs
  • 这有帮助.. 谢谢! @alanxz
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-12-29
  • 1970-01-01
  • 2019-11-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多