From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12412 Path: news.gmane.org!.POSTED!not-for-mail From: Po-yi Wang Newsgroups: gmane.linux.lib.musl.general Subject: problem compiling bash-3.2.57 bash-4.4.12, seg fault Date: Sat, 27 Jan 2018 08:19:55 -0800 (PST) Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1517069895 28576 195.159.176.226 (27 Jan 2018 16:18:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Jan 2018 16:18:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12428-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jan 27 17:18:11 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1efTBA-0006v0-K0 for gllmg-musl@m.gmane.org; Sat, 27 Jan 2018 17:18:08 +0100 Original-Received: (qmail 15930 invoked by uid 550); 27 Jan 2018 16:20:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15893 invoked from network); 27 Jan 2018 16:20:09 -0000 Xref: news.gmane.org gmane.linux.lib.musl.general:12412 Archived-At: hi i am attempting to statically compile bash-3.2.57 or bash-4.4.12, with gcc-4.0.4 binutils-2.24 and musl-1.1.18 musl-gcc wrapper. (seg fault occurred on arm target)(musl compiled with -g3) i know they both compiled ok with other known working tools. anyway, i run into seg fault, the problem seem too deep for me. gdb provides little help. one clue though, the crashed program "claimed" to see zero length file when in fact non of them are, here are some output: *********************************************************** * * * GNU bash, version 4.4.12(1)-release (armv7l-unknown-linux-gnu) * * *********************************************************** rm -f shell.o musl-gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"armv7l"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"armv7l-unknown-linux-gnu"' -DCONF_VENDOR='"unknown"' -DLOCALEDIR='"/usr/musl/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 -Wno-parentheses -Wno-format-security -c shell.c shell.c: In function 'get_current_user_info': shell.c:1777: warning: assignment discards qualifiers from pointer target type rm -f eval.o musl-gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"armv7l"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"armv7l-unknown-linux-gnu"' -DCONF_VENDOR='"unknown"' -DLOCALEDIR='"/usr/musl/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2 -Wno-parentheses -Wno-format-security -c eval.c make[1]: Entering directory `/tmp/build/bash-3.2.57/bash-4.4.12/builtins' rm -f mkbuiltins.o musl-gcc -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I.. -I../include -I../lib -I. -g -O2 -Wno-parentheses -Wno-format-security mkbuiltins.c mkbuiltins.c: In function 'array_add': mkbuiltins.c:416: warning: passing argument 1 of 'xrealloc' from incompatible pointer type musl-gcc -static -static -rdynamic -g -O2 -Wno-parentheses -Wno-format-security -rdynamic -g -O2 -Wno-parentheses -Wno-format-security -o mkbuiltins mkbuiltins.o ./mkbuiltins -externfile builtext.h -structfile builtins.c \ -noproduction -D . ./alias.def ./bind.def ./break.def ./builtin.def ./caller.def ./cd.def ./colon.def ./command.def ./declare.def ./echo.def ./enable.def ./eval.def ./getopts.def ./exec.def ./exit.def ./fc.def ./fg_bg.def ./hash.def ./help.def ./history.def ./jobs.def ./kill.def ./let.def ./read.def ./return.def ./set.def ./setattr.def ./shift.def ./source.def ./suspend.def ./test.def ./times.def ./trap.def ./type.def ./ulimit.def ./umask.def ./wait.def ./reserved.def ./pushd.def ./shopt.def ./printf.def ./complete.def ./mapfile.def mkbuiltins: ./alias.def: skipping zero-length file make[1]: *** [builtext.h] Segmentation fault make[1]: *** Deleting file `builtext.h' make[1]: Leaving directory `/tmp/build/bash-3.2.57/bash-4.4.12/builtins' make: *** [builtins/builtext.h] Error 1 [armv7l][1] cd /build/bash-3.2.57/bash-4.4.12; cd /tmp/build/bash-3.2.57/bash-4. 4.12/builtins [armv7l][1] cd /tmp/build/bash-3.2.57/bash-4.4.12/builtins; gdb mkbuiltins GNU gdb (GDB) 7.6.2 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "armv7l-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /tmp/build/bash-3.2.57/bash-4.4.12/builtins/mkbuiltins...done. (gdb) run -externfile builtext.h -structfile builtins.c -noproduction -D . ./alias.def ./bind.def ./break.def ./builtin.def Starting program: /tmp/build/bash-3.2.57/bash-4.4.12/builtins/mkbuiltins -externfile builtext.h -structfile builtins.c -noproduction -D . ./alias.def ./bind.def ./break.def ./builtin.def mkbuiltins: ./alias.def: skipping zero-length file Program received signal SIGSEGV, Segmentation fault. 0x00009bc4 in main (argc=12, argv=0xbefffcd4) at mkbuiltins.c:318 318 extract_info (arg, structfile, externfile); (gdb) bt #0 0x00009bc4 in main (argc=12, argv=0xbefffcd4) at mkbuiltins.c:318 (gdb)