* undefined reference getopt_long
@ 2007-08-27 15:39 Daniel C. Bastos
2007-09-01 20:21 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Daniel C. Bastos @ 2007-08-27 15:39 UTC (permalink / raw)
To: bug-gnu-emacs
%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:
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <next> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down-mouse-1> <mouse-1> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <report-emacs-bug>
Recent messages:
Loading cc-mode...done
For information about the GNU Project and its goals, type <f1> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: undefined reference getopt_long
2007-08-27 15:39 undefined reference getopt_long Daniel C. Bastos
@ 2007-09-01 20:21 ` Glenn Morris
2007-09-12 0:45 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2007-09-01 20:21 UTC (permalink / raw)
To: Daniel C. Bastos; +Cc: bug-gnu-emacs
"Daniel C. Bastos" wrote:
> 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'
I don't know much about this, so I might not help much. lib-src/
contains some getopt* files that ought to provide a definition of
getopt_long if your system does not have one. Can you figure out why
they are not working for you?
getopt1.c contains a definition of getopt_long, and your command-line
above shows getopt1.o being included in the compile command.
Did the file getopt.h in your lib-src directory get generated? Is
etags.c finding it when it gets compiled?
What are the values of GETOPT_H and GETOPTDEPS in your
lib-src/Makefile?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: undefined reference getopt_long
2007-09-01 20:21 ` Glenn Morris
@ 2007-09-12 0:45 ` Glenn Morris
0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2007-09-12 0:45 UTC (permalink / raw)
To: Daniel C. Bastos; +Cc: bug-gnu-emacs
Glenn Morris wrote:
> lib-src/ contains some getopt* files that ought to provide a
> definition of getopt_long if your system does not have one. Can you
> figure out why they are not working for you?
>
> getopt1.c contains a definition of getopt_long, and your command-line
> above shows getopt1.o being included in the compile command.
>
> Did the file getopt.h in your lib-src directory get generated? Is
> etags.c finding it when it gets compiled?
>
> What are the values of GETOPT_H and GETOPTDEPS in your
> lib-src/Makefile?
I'm sorry, but I think that we can't make any progress on this issue
without input from someone affected by it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-12 0:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 15:39 undefined reference getopt_long Daniel C. Bastos
2007-09-01 20:21 ` Glenn Morris
2007-09-12 0:45 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).