錯誤訊息:
gmake[3]: Entering directory `/usr/ports/graphics/graphviz/work/graphviz-2.28.0/cmd/dot'
CC dot-dot.o
CC dot-no_builtins.o
CC dot_builtins-dot.o
CC dot_builtins-dot_builtins.o
CCLD dot_builtins
CCLD dot
../../lib/gvc/.libs/libgvc.so: undefined reference to `sincos'
collect2: ld returned 1 exit status
gmake[3]: *** [dot] Error 1
FreeBSD 的 libm 裡目前還沒有實作 sincos 這個函式。
autoconf 產生出的 configure script 測出來會說有,是因為它的測試參數下得跟實際編譯時不一樣,會用到 GCC 的 built-in function。
這個老外已經有說解法了:
http://markmail.org/thread/okslhtdmwckdweed#query:+page:1+mid:okslhtdmwckdweed+state:results
就是跑完 configure 之後直接把測試結果 edit 掉。
在 FreeBSD 要做這種事很簡單,在 Makefile 的 post-configure 加點料就可以搞定:
--- Makefile.orig 2011-08-28 23:30:48.000000000 +0800 +++ Makefile 2011-08-28 23:30:44.000000000 +0800 @@ -432,6 +432,10 @@ ${WRKSRC}/Makefile.in .endif +post-configure: + @${REINPLACE_CMD} -e 's|^#.*HAVE_SINCOS.*$$|#undef HAVE_SINCOS|' \ + ${WRKSRC}/config.h + post-install: install-ldconfig-file cd ${WRKSRC}/lib/expr && \ ${MAKE} ${INSTALL_TARGET} |

