dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* build static with libedit
@ 2011-09-02 21:30 nothink
  2011-09-03  1:31 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: nothink @ 2011-09-02 21:30 UTC (permalink / raw)
  To: dash

[-- 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
  

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: build static with libedit
  2011-09-02 21:30 build static with libedit nothink
@ 2011-09-03  1:31 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2011-09-03  1:31 UTC (permalink / raw)
  To: nothink; +Cc: dash

nothink <nothink@shellmix.com> wrote:
> [-- text/plain, encoding 7bit, charset: ISO-8859-1, 104 lines --]
> 
> 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.

Please send unified diffs only.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-03  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-02 21:30 build static with libedit nothink
2011-09-03  1:31 ` Herbert Xu

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 NNTP newsgroup(s).