From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Daniel C. Bastos" Newsgroups: gmane.emacs.bugs Subject: undefined reference getopt_long Date: Mon, 27 Aug 2007 11:39:01 -0400 Message-ID: <18130.61461.588478.572113@blade3.toledo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1188241239 387 80.91.229.12 (27 Aug 2007 19:00:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2007 19:00:39 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 27 21:00:18 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IPjgv-0004TV-2D for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Aug 2007 20:52:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPjfG-0001gK-MY for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Aug 2007 14:50:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPggC-00065a-P3 for bug-gnu-emacs@gnu.org; Mon, 27 Aug 2007 11:39:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPggC-000651-0J for bug-gnu-emacs@gnu.org; Mon, 27 Aug 2007 11:39:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPggB-00064s-PX for bug-gnu-emacs@gnu.org; Mon, 27 Aug 2007 11:39:03 -0400 Original-Received: from blade3.toledo.com ([128.241.53.248]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IPggB-0003w0-ED for bug-gnu-emacs@gnu.org; Mon, 27 Aug 2007 11:39:03 -0400 Original-Received: from blade3.toledo.com (localhost [127.0.0.1]) by blade3.toledo.com (8.13.6.20060614/8.13.6) with ESMTP id l7RFd1Qa092572 for ; Mon, 27 Aug 2007 11:39:01 -0400 (EDT) Original-Received: (from dbastos@localhost) by blade3.toledo.com (8.13.6.20060614/8.13.6/Submit) id l7RFd1uk092559; Mon, 27 Aug 2007 11:39:01 -0400 (EDT) X-Mailer: VM 7.19 under Emacs 21.3.1 X-Detected-Kernel: FreeBSD 4.6-4.9 X-Mailman-Approved-At: Mon, 27 Aug 2007 14:49:50 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16457 Archived-At: %cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs (...) U emacs/vms/README U emacs/vms/make-mms-derivative.el Then: %cd emacs %./configure (...) Configured for `i386-unknown-freebsd4.7'. Where should the build process find the source code? /home/dbastos/tmp/emacs What operating system and machine description files should Emacs use? `s/freebsd.h' and `m/intel386.h' What compiler should emacs be built with? gcc -g -O2 Should Emacs use the GNU version of malloc? yes Should Emacs use a relocating allocator for buffers? no Should Emacs use mmap(2) for buffer allocation? yes What window system should Emacs use? x11 What toolkit should Emacs use? LUCID Where do we find X Windows header files? /usr/X11R6/include Where do we find X Windows libraries? /usr/X11R6/lib Does Emacs use -lXaw3d? yes Does Emacs use -lXpm? yes Does Emacs use -ljpeg? yes Does Emacs use -ltiff? yes Does Emacs use a gif library? yes -lungif Does Emacs use -lpng? yes Does Emacs use -lrsvg-2? no Does Emacs use -lgpm? no Does Emacs use X toolkit scroll bars? yes (...) creating lib-src/Makefile creating src/Makefile % make bootstrap (...) gcc -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib -DHAVE_CONFIG_H -I. -I../src -I/home/dbastos/tmp/emacs/lib-src -I/home/dbastos/tmp/emacs/lib-src/../src -Wl,-znocombreloc -L/usr/X11R6/lib -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib -g -O2 -DEMACS_NAME="\"GNU Emacs"\" -DVERSION="\"22.1.50\"" /home/dbastos/tmp/emacs/lib-src/etags.c getopt.o getopt1.o regex.o -lutil -lc -o etags /tmp/cc86z2lb.o: In function `main': /home/dbastos/tmp/emacs/lib-src/etags.c(.text+0x71f): undefined reference to `getopt_long' *** Error code 1 Stop in /home/dbastos/tmp/emacs/lib-src. *** Error code 1 Stop in /home/dbastos/tmp/emacs. *** Error code 1 Stop in /home/dbastos/tmp/emacs. *** Error code 1 Stop in /home/dbastos/tmp/emacs. % To investigate, I said: %nm *.o | grep getopt_long 0000006c T _getopt_long_only_r 00000024 T _getopt_long_r 00000000 T rpl_getopt_long 00000048 T rpl_getopt_long_only I've seen this problem before in a 4.11 freebsd. This one is a 4.7-RELEASE-p28. As a quick hack, I wrote #define getopt_long rpl_getopt_long in the first line of lib-src/etags.c. and ``make boostrap'' again: etags is built. But now b2m isn't: gcc -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib -DHAVE_CONFIG_H -I. -I../src -I/home/dbastos/tmp/emacs/lib-src -I/home/dbastos/tmp/emacs/lib-src/../src -Wl,-znocombreloc -L/usr/X11R6/lib -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib -g -O2 /home/dbastos/tmp/emacs/lib-src/b2m.c -DVERSION="\"22.1.50\"" getopt.o getopt1.o -lutil -lc -o b2m /tmp/ccRidQMZ.o: In function `main': /home/dbastos/tmp/emacs/lib-src/b2m.c(.text+0x9a): undefined reference to `getopt_long' So I added #define getopt_long rpl_getopt_long in the first line of lib-src/b2m.c. Then I said ``make'' and the build process finished. %ls -l emacs -rwxr-xr-x 2 dbastos dbastos 9324102 Aug 27 11:30 emacs* %file emacs emacs: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped % %uname -a FreeBSD blade3.toledo.com 4.7-RELEASE-p28 FreeBSD 4.7-RELEASE-p28 #47: Tue Apr 10 10:28:38 MDT 2007 root@fc2:/usr/home/dradford/work/os/freebsd4/sys/compile/VKERN i386 In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: C++/l Minor modes in effect: encoded-kbd-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: Recent messages: Loading cc-mode...done For information about the GNU Project and its goals, type C-p. Global-Font-Lock mode disabled Mark saved where search started Delete excess backup versions of c:/msys/home/dbastos/.emacs? (y or n) Wrote c:/msys/home/dbastos/.emacs t Toggling global-font-lock-mode off; better pass an explicit argument. nil Loading emacsbug...done