From: nothink <nothink@shellmix.com>
To: dash@vger.kernel.org
Subject: build static with libedit
Date: Sat, 03 Sep 2011 03:30:25 +0600 [thread overview]
Message-ID: <4E614AF1.7080802@shellmix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4997 bytes --]
Good time!
First of all, thank to everyone who develops dash.
Maybe I'm wrong, but I can't build 0.5.7-, git-version of dash with
option: --enable-static --with-libedit.
gcc -Wall -g -O2 -static -Wl,--fatal-warnings -o dash alias.o arith_yacc.o arith_yylex.o cd.o error.o eval.o exec.o expand.o histedit.o input.o jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o options.o parser.o redir.o show.o trap.o output.o printf.o system.o test.o times.o var.o builtins.o init.o nodes.o signames.o syntax.o -ledit
/usr/lib/libedit.a(terminal.o): In function `terminal_tputs':
/tmp/build/libedit-20110802-3.0/src/terminal.c:1223: undefined reference to `tputs'
/usr/lib/libedit.a(terminal.o): In function `terminal_deletechars':
/tmp/build/libedit-20110802-3.0/src/terminal.c:714: undefined reference to `tgoto'
/usr/lib/libedit.a(terminal.o): In function `terminal_set':
/tmp/build/libedit-20110802-3.0/src/terminal.c:881: undefined reference to `tgetent'
/tmp/build/libedit-20110802-3.0/src/terminal.c:899: undefined reference to `tgetflag'
/tmp/build/libedit-20110802-3.0/src/terminal.c:900: undefined reference to `tgetflag'
/tmp/build/libedit-20110802-3.0/src/terminal.c:902: undefined reference to `tgetflag'
/tmp/build/libedit-20110802-3.0/src/terminal.c:903: undefined reference to `tgetflag'
/tmp/build/libedit-20110802-3.0/src/terminal.c:905: undefined reference to `tgetflag'
/usr/lib/libedit.a(terminal.o):/tmp/build/libedit-20110802-3.0/src/terminal.c:906: more undefined references to `tgetflag' follow
/usr/lib/libedit.a(terminal.o): In function `terminal_set':
/tmp/build/libedit-20110802-3.0/src/terminal.c:908: undefined reference to `tgetnum'
/tmp/build/libedit-20110802-3.0/src/terminal.c:909: undefined reference to `tgetnum'
/tmp/build/libedit-20110802-3.0/src/terminal.c:912: undefined reference to `tgetstr'
/usr/lib/libedit.a(terminal.o): In function `terminal_insertwrite':
/tmp/build/libedit-20110802-3.0/src/terminal.c:755: undefined reference to `tgoto'
/usr/lib/libedit.a(terminal.o): In function `terminal_move_to_char':
/tmp/build/libedit-20110802-3.0/src/terminal.c:613: undefined reference to `tgoto'
/tmp/build/libedit-20110802-3.0/src/terminal.c:570: undefined reference to `tgoto'
/usr/lib/libedit.a(terminal.o): In function `terminal_move_to_line':
/tmp/build/libedit-20110802-3.0/src/terminal.c:517: undefined reference to `tgoto'
/tmp/build/libedit-20110802-3.0/src/terminal.c:530: undefined reference to `tgoto'
/usr/lib/libedit.a(terminal.o): In function `terminal_echotc':
/tmp/build/libedit-20110802-3.0/src/terminal.c:1522: undefined reference to `tgetstr'
/tmp/build/libedit-20110802-3.0/src/terminal.c:1658: undefined reference to `tgoto'
/tmp/build/libedit-20110802-3.0/src/terminal.c:1602: undefined reference to `tgoto'
collect2: ld returned 1 exit status
Obviously, need dependency lib - curses.
Somehow, builds system dash not use her.
diff -cr dash_np/configure.ac dash_mp/configure.ac
*** dash_np/configure.ac Sat Sep 3 01:06:25 2011
--- dash_mp/configure.ac Sat Sep 3 01:45:59 2011
***************
*** 129,135 ****
if test "$use_libedit" != "yes"; then
AC_DEFINE([SMALL], 1, [Define if you build with -DSMALL])
else
! export LIBS="$LIBS -ledit"
fi
AC_ARG_ENABLE(lineno, AS_HELP_STRING(--disable-lineno, \
[Disable LINENO support]))
--- 129,139 ----
if test "$use_libedit" != "yes"; then
AC_DEFINE([SMALL], 1, [Define if you build with -DSMALL])
else
! if test "$enable_static" = "yes"; then
! PKG_CHECK_MODULES([LIBEDIT], [libedit>= 0])
! else
! export LIBS="$LIBS -ledit"
! fi
fi
AC_ARG_ENABLE(lineno, AS_HELP_STRING(--disable-lineno, \
[Disable LINENO support]))
diff -cr dash_np/src/Makefile.am dash_mp/src/Makefile.am
*** dash_np/src/Makefile.am Sat Sep 3 01:06:25 2011
--- dash_mp/src/Makefile.am Sat Sep 3 01:47:39 2011
***************
*** 6,12 ****
-DBSD=1 -DSHELL \
-DIFS_BROKEN
! AM_CFLAGS = $(COMMON_CFLAGS)
AM_CPPFLAGS = $(COMMON_CPPFLAGS)
AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS)
AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
--- 6,12 ----
-DBSD=1 -DSHELL \
-DIFS_BROKEN
! AM_CFLAGS = $(COMMON_CFLAGS) $(LIBEDIT_CFLAGS)
AM_CPPFLAGS = $(COMMON_CPPFLAGS)
AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS)
AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
***************
*** 30,36 ****
init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \
myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \
show.h system.h trap.h var.h
! dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o
HELPERS = mkinit mksyntax mknodes mksignames
--- 30,36 ----
init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \
myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \
show.h system.h trap.h var.h
! dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o $(LIBEDIT_LIBS)
HELPERS = mkinit mksyntax mknodes mksignames
Thank for attention!
Good luck!
[-- Attachment #2: dash_static_with_libedit.patch --]
[-- Type: text/plain, Size: 2060 bytes --]
diff -cr dash_np/configure.ac dash_mp/configure.ac
*** dash_np/configure.ac Sat Sep 3 01:06:25 2011
--- dash_mp/configure.ac Sat Sep 3 01:45:59 2011
***************
*** 129,135 ****
if test "$use_libedit" != "yes"; then
AC_DEFINE([SMALL], 1, [Define if you build with -DSMALL])
else
! export LIBS="$LIBS -ledit"
fi
AC_ARG_ENABLE(lineno, AS_HELP_STRING(--disable-lineno, \
[Disable LINENO support]))
--- 129,139 ----
if test "$use_libedit" != "yes"; then
AC_DEFINE([SMALL], 1, [Define if you build with -DSMALL])
else
! if test "$enable_static" = "yes"; then
! PKG_CHECK_MODULES([LIBEDIT], [libedit >= 0])
! else
! export LIBS="$LIBS -ledit"
! fi
fi
AC_ARG_ENABLE(lineno, AS_HELP_STRING(--disable-lineno, \
[Disable LINENO support]))
diff -cr dash_np/src/Makefile.am dash_mp/src/Makefile.am
*** dash_np/src/Makefile.am Sat Sep 3 01:06:25 2011
--- dash_mp/src/Makefile.am Sat Sep 3 01:47:39 2011
***************
*** 6,12 ****
-DBSD=1 -DSHELL \
-DIFS_BROKEN
! AM_CFLAGS = $(COMMON_CFLAGS)
AM_CPPFLAGS = $(COMMON_CPPFLAGS)
AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS)
AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
--- 6,12 ----
-DBSD=1 -DSHELL \
-DIFS_BROKEN
! AM_CFLAGS = $(COMMON_CFLAGS) $(LIBEDIT_CFLAGS)
AM_CPPFLAGS = $(COMMON_CPPFLAGS)
AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS)
AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
***************
*** 30,36 ****
init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \
myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \
show.h system.h trap.h var.h
! dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o
HELPERS = mkinit mksyntax mknodes mksignames
--- 30,36 ----
init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \
myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \
show.h system.h trap.h var.h
! dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o $(LIBEDIT_LIBS)
HELPERS = mkinit mksyntax mknodes mksignames
next reply other threads:[~2011-09-02 21:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 21:30 nothink [this message]
2011-09-03 1:31 ` build static with libedit Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E614AF1.7080802@shellmix.com \
--to=nothink@shellmix.com \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.