[Bug other/38805] sed Unterminated `s' command
--- Comment #10 from thomas dot jourdan at gmail dot com 2009-01-17 15:23 --- Hi My mistake was to export a function in the bash to fool a shell script. But then I configured GCC without removing it. I did : function install() { ginstall $@; } export -f install Then I configured GCC, which led to the problem. Thanks to Ralf : ./config.status -d config.status: creating as sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating collect-ld sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating nm sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating Makefile sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating gccbug sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating libada-mk sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating ada/Makefile sed: file ./confstatg0aq6N/subs-5.sed line 7: unterminated `s' command config.status: creating auto-host.h config.status: auto-host.h is unchanged config.status: executing default commands Then we can see the output file : cat confstatg0aq6N/subs-5.sed :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@host_xm_file_list@, auto-host.h $(srcdir)/../include/ansidecl.h,;t t s,@host_xm_include_list@, auto-host.h ansidecl.h,;t t s,@host_xm_defines@,,;t t s,@out_host_hook_obj@,host-solaris.o,;t t s,@install@,() { ginstall $@ },;t t s,@lang_opt_files@, /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/ada/lang.opt /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/fortran/lang.opt /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/java/lang.opt /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/treelang/lang.opt,;t t s,@lang_specs_files@,,;t t s,@lang_tree_files@, /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/ada/ada-tree.def /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/cp/cp-tree.def /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/java/java-tree.def /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/gcc/objc/objc-tree.def,;t t s,@local_prefix@,/export/home/thomas/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu/sys-root,;t t s,@md_file@,i386/i386.md,;t t s,@objc_boehm_gc@,,;t t s,@out_file@,i386/i386.c,;t t s,@out_object_file@,i386.o,;t t s,@thread_file@,single,;t t s,@tm_file_list@,options.h $(srcdir)/config/i386/i386.h $(srcdir)/config/i386/unix.h $(srcdir)/config/i386/att.h $(srcdir)/config/dbxelf.h $(srcdir)/config/elfos.h $(srcdir)/config/svr4.h $(srcdir)/config/linux.h $(srcdir)/config/i386/linux.h $(srcdir)/defaults.h,;t t s,@tm_include_list@,options.h config/i386/i386.h config/i386/unix.h config/i386/att.h config/dbxelf.h config/elfos.h config/svr4.h config/linux.h config/i386/linux.h defaults.h,;t t s,@tm_defines@, UCLIBC_DEFAULT=0,;t t s,@tm_p_file_list@, $(srcdir)/config/i386/i386-protos.h tm-preds.h,;t t s,@tm_p_include_list@, config/i386/i386-protos.h tm-preds.h,;t t s,@xm_file_list@, auto-host.h $(srcdir)/../include/ansidecl.h,;t t s,@xm_include_list@, auto-host.h ansidecl.h,;t t s,@xm_defines@,,;t t s,@c_target_objs@,,;t t s,@cxx_target_objs@,,;t t s,@target_cpu_default@,,;t t s,@GMPLIBS@,-L/export/home/thomas/x-tools/i686-nptl-linux-gnu/lib -L/export/home/thomas/x-tools/i686-nptl-linux-gnu/lib -lmpfr -lgmp,;t t s,@GMPINC@,-I/export/home/thomas/x-tools/i686-nptl-linux-gnu/include -I/export/home/thomas/x-tools/i686-nptl-linux-gnu/include,;t t s,@LIBOBJS@,,;t t s,@LTLIBOBJS@,,;t t /@language_hooks@/r Make-hooks s,@language_hooks@,,;t t And as you can see, you find my install function replaced. This makes sed unhappy. Regards, Thomas -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #7 from rwild at gcc dot gnu dot org 2009-01-14 18:02 --- Please go into the gcc directory in the build tree and confirm that ./config.status reproduces the errors (ignore further errors). If yes, then please show the output of ./config.status -d wc confstat*/* If any of the sed scripts are longer than roughly 6KB, or have line lengths over 4000 bytes, then try /usr/xpg4/bin/sed (put /usr/xpg4/bin early in PATH). Or try GNU sed. Solaris' seds are rather limited, although the configure scripts should usually work around most known issues. The @gcc_config_arguments@ substitution line could be rather long in your case. If all sed programs show the same error, then please post the sed script that causes it (the 'config.status -d' left it behind in that temporary subdir). BTW, your build log shows that you are patching the GCC sources quite a bit: ... [DEBUG]Applying patch '/export/home/thomas/workspace/ct-ng/trunk/patches/gcc/4.3.2/130-cross-compile.patch' [DEBUG]== Executing: 'patch -g0 -F1 -p1 -f' [ALL ]patching file gcc/configure [ALL ]patching file gcc/configure.ac ... [DEBUG]Applying patch '/export/home/thomas/workspace/ct-ng/trunk/patches/gcc/4.3.2/250-sh-pr24836.patch' [DEBUG]== Executing: 'patch -g0 -F1 -p1 -f' [ALL ]patching file gcc/configure [ALL ]patching file gcc/configure.ac ... Please prove that none of the several dozen patches are relevant to this issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #8 from thomas dot jourdan at gmail dot com 2009-01-14 20:45 --- Hi all I did my homework tonight and I found the problem, thanks to your help. For other purposes, I had to export a function in my shell this way : ---8--- function install() { ginstall $@; } export -f install ---8--- To fool a configure script (not related to gcc) which needed GNU install instead of SunOS install. I had no knowledge of `config.status -d`, but this helped me a lot. I've been able to see the confstat temporary files and figure out the problem. Thanks for pointing this out, this will help me a lot to debug ct-ng and cross tool chain building. Thanks again for your help and sorry for the false alarm ! Regards, Thomas -- thomas dot jourdan at gmail dot com changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #9 from rwild at gcc dot gnu dot org 2009-01-15 07:16 --- I had no knowledge of `config.status -d`, but this helped me a lot. I've been able to see the confstat temporary files and figure out the problem. Thanks for pointing this out, this will help me a lot to debug ct-ng and cross tool chain building. Would you be so nice and show the actual problem and the fix you used, so that others can profit, too? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #4 from rwild at gcc dot gnu dot org 2009-01-13 13:05 --- (In reply to comment #3) for ac_var in `(set) 21 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do That happens much earlier than the posted errors. Thomas, please print the full name of the directory you are configuring in, and the exact command line you are using to configure and build the GCC tree. Thanks, Ralf -- rwild at gcc dot gnu dot org changed: What|Removed |Added CC||rwild at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #5 from thomas dot jourdan at gmail dot com 2009-01-13 20:50 --- Created an attachment (id=17093) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17093action=view) Configure and build log This patch contains the full build log of the cross tool chain. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #6 from thomas dot jourdan at gmail dot com 2009-01-13 21:11 --- Hi all, First of all, thanks for answering so quickly. I am using crosstool-ng (http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool) scripts to build my cross tool chain. It works greats (with the same gcc / binutils / libc configuration) under linux but I am trying to make it works on other OS. Today, this is OpenSolaris. I attached the full (and big) log. The error is visible at line 102477. To summarize, the compiler is configured with : CC_FOR_BUILD=i386-build_pc-solaris2.11-gcc CFLAGS=-pipe /export/home/thomas/workspace/cdk/i686/targets/src/gcc-4.3.2/configure --build=i386-build_pc-solaris2.11 --host=i386-build_pc-solaris2.11 --target=i686-nptl-linux-gnu --prefix=/export/home/thomas/workspace/cdk/i686/targets/i686-nptl-linux-gnu/build/gcc-core-static --with-local-prefix=/export/home/thomas/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu/sys-root --disable-multilib --with-sysroot=/export/home/thomas/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu/sys-root --with-newlib --enable-threads=no --disable-shared --with-arch=i686 --with-gmp=/export/home/thomas/x-tools/i686-nptl-linux-gnu --with-mpfr=/export/home/thomas/x-tools/i686-nptl-linux-gnu --enable-__cxa_atexit --disable-nls --enable-symvers=gnu --enable-languages=c --enable-target-optspace make all-gcc make install-gcc The configure goes fine but make all-gcc will run the configure fragment in the gcc subdirectory. You can see the problem by running make configure-host instead of make all-gcc. The same thing works fine on my ubuntu box. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-13 00:59 --- How did you invoke configure? How did you invoke GNU make? -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #3 from pinskia at gcc dot gnu dot org 2009-01-13 01:01 --- for ac_var in `(set) 21 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805
[Bug other/38805] sed Unterminated `s' command
--- Comment #1 from thomas dot jourdan at gmail dot com 2009-01-11 15:19 --- Mistake in bug description : host = i386-pc-solaris2.11 build = i386-pc-solaris2.11 target = i686-nptl-linux-gnu This is a cross build -- thomas dot jourdan at gmail dot com changed: What|Removed |Added GCC build triplet|i686-nptl-linux-gnu |i386-pc-solaris2.11 GCC target triplet|i386-pc-solaris2.11 |i686-nptl-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38805