2015-02-17 19 views
5

Tôi gặp lỗi như vậy khi cố gắng xây dựng libnice-0.1.10. Đối với giải pháp, tôi đang theo dõi possibly undefined macro: AC_MSG_ERROR, nhưng vẫn không đến đó.AS_IF và AC_MSG_ERROR: lỗi: có thể macro không xác định

một số phiên bản chương trình

uname: 3.5.0-23-generic 
m4: 1.4.16 
automake: 1.14.1 
autoconf: 2.69 
libtoolize: 2.4.2 

Tôi cũng thêm ACLOCAL_FLAGS = "- Tôi /.../share/aclocal" trong bashrc.

Đây là những gì được báo cáo từ autogen.

$ ./autogen.sh 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
libtoolize: putting auxiliary files in `.'. 
libtoolize: copying file `./ltmain.sh' 
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. 
libtoolize: copying file `m4/libtool.m4' 
libtoolize: copying file `m4/ltoptions.m4' 
libtoolize: copying file `m4/ltsugar.m4' 
libtoolize: copying file `m4/ltversion.m4' 
libtoolize: copying file `m4/lt~obsolete.m4' 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:105: error: possibly undefined macro: AS_IF 
     If this token and others are legitimate, please use m4_pattern_allow. 
     See the Autoconf documentation. 
configure.ac:218: error: possibly undefined macro: AC_MSG_ERROR 
autoreconf: /opt/oblong/deps-64-10/bin/autoconf failed with exit status: 1 

Cảm ơn rất nhiều sự trợ giúp!

+0

Bạn đã cài đặt ['pkg-config'] (http://www.freedesktop.org/wiki/Software/pkg-config/) chưa? Xem nếu: '/.../ share/aclocal/pkg.m4' tồn tại. Không nên thiết lập 'ACLOCAL_INCLUDE' - thư mục đó đã là một phần của autoconf - và nó có thể ngăn tìm kiếm trong thư mục libnice' m4'. –

Trả lời

7

Điều này có nghĩa là bạn đang thiếu pkg-config (hoặc có thể bạn có phiên bản cũ). Chỉ cần tải xuống và cài đặt.

+0

Tôi đã chắc chắn rằng pkg-config đã được cài đặt và tôi có /usr/share/aclocal/pkg.m4 trên hệ thống của mình. Tôi vẫn gặp lỗi khi sử dụng các thông tin sau: ACX_PTHREAD ([AC_DEFINE ([HAVE_PTHREAD] ...). Lỗi này là configure.ac:31: error: macro có thể không xác định: AC_DEFINE. Nếu mã thông báo này và các mã khác hợp lệ, vui lòng sử dụng Vì vậy, có thể có các nguyên nhân khác –

+0

Bạn nên nêu chi tiết các bước khắc phục sự cố dẫn đến kết luận 'pkg-config' là vấn đề. – jww

Các vấn đề liên quan