Bug#345607: libtool: line 606: --: command not found message for --mode=link
Hi John, * John V. Belmonte wrote on Mon, Jan 02, 2006 at 08:22:34AM CET: In a clean sid environment, running libtool with --mode=link causes the following message to be output on sterr: /usr/bin/libtool: line 606: --: command not found Could you please rerun the command line with '--debug' added (or, if the buggy output happens before the '--debug' argument is evaluated, just run with '$SHELL -x /usr/bin/libtool ..', where $SHELL is the same as in the first line of the script)? Please post the output with stdout and stderr intermixed, so we can see where it happens. (I don't have access to a sid installation ATM.) Thanks, Ralf -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
On Mon, Jan 02, 2006 at 02:22:34AM -0500, John V. Belmonte wrote: Package: libtool Version: 1.5.22-1 Severity: normal In a clean sid environment, running libtool with --mode=link causes the following message to be output on sterr: /usr/bin/libtool: line 606: --: command not found Other than that, operation still seems correct. Please show the whole command line. I can reproduce this if for instance I use gcc-4.0 instead of gcc or cc. I then get: $ libtool --mode=link gcc-4.0 tst.c -o tst /usr/bin/libtool: line 606: --: command not found libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' Adding a --tag=CC fixes my problem: $libtool --mode=link --tag=CC gcc-4.0 tst.c -o tst gcc-4.0 tst.c -o tst Normally using gcc also fixes the problem: $libtool --mode=link gcc tst.c -o tst gcc tst.c -o tst Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
On Mon, Jan 02, 2006 at 09:39:44AM +0100, Ralf Wildenhues wrote: Hi John, * John V. Belmonte wrote on Mon, Jan 02, 2006 at 08:22:34AM CET: In a clean sid environment, running libtool with --mode=link causes the following message to be output on sterr: /usr/bin/libtool: line 606: --: command not found Could you please rerun the command line with '--debug' added (or, if the buggy output happens before the '--debug' argument is evaluated, just run with '$SHELL -x /usr/bin/libtool ..', where $SHELL is the same as in the first line of the script)? Please post the output with stdout and stderr intermixed, so we can see where it happens. I've attached what I get when not using the --tag. Kurt libtool: enabling shell trace mode + preserve_args=' --debug' + test 5 -gt 0 + arg=--mode=link + shift + case $arg in ++ echo X--mode=link ++ /bin/sed -e '1s/^X//' -e 's/[-_a-zA-Z0-9]*=//' + optarg=link + test -n '' + case $arg in + mode=link + test 4 -gt 0 + arg=gcc-4.0 + shift + case $arg in + optarg= + test -n '' + case $arg in + nonopt=gcc-4.0 + break + test -n '' + case $disable_libs in + exec_cmd= + test -z '' + test -z link + test -n '' + generic_help='Try `libtool --help'\'' for more information.' + help='Try `libtool --help --mode=link'\'' for more information.' + case $mode in + modename='libtool: link' + case $host in + allow_undefined=yes + libtool_args=gcc-4.0 + base_compile='gcc-4.0 tst.c -o tst' + compile_command=gcc-4.0 + finalize_command=gcc-4.0 + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= ++ pwd + lib_search_path=/root + inst_prefix_dir= + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + notinst_path= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + func_infer_tag gcc-4.0 tst.c -o tst + test -n ' CXX F77 GCJ BINCC BINCXX' + test -z '' + CC_quoted= + for arg in '$CC' + case $arg in + CC_quoted=' gcc' + case $@ in ++ echo gcc ++ echo gcc ++ echo gcc ++ echo gcc + for z in '$available_tags' + grep '^# ### BEGIN LIBTOOL TAG CONFIG: CXX$' ++ /bin/sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: CXX$/,/^# ### END LIBTOOL TAG CONFIG: CXX$/p' + eval '# ### BEGIN LIBTOOL TAG CONFIG: CXX # Libtool was configured on host athlon: # Shell to use when invoking shell scripts. SHELL=/bin/sh # Whether or not to build shared libraries. build_libtool_libs=yes # Whether or not to build static libraries. build_old_libs=yes # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=no # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=no # Whether or not to optimize for fast installation. fast_install=yes # The host system. host_alias= host=x86_64-pc-linux-gnu host_os=linux-gnu # The build system. build_alias=x86_64-linux-gnu build=x86_64-pc-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. echo=echo # The archiver. AR=ar AR_FLAGS=cru # A C compiler. LTCC=gcc # LTCC compiler flags. LTCFLAGS=-Wall -g -O2 # A language-specific compiler. CC=g++ # Is the compiler the GNU C compiler? with_gcc=yes # An ERE matcher. EGREP=grep -E # The linker used to build libraries. LD=/usr/bin/ld -m elf_x86_64 # Whether we need hard or soft links. LN_S=ln -s # A BSD-compatible nm program. NM=/usr/bin/nm -B # A symbol stripping program STRIP=strip # Used to examine libraries when file_magic_cmd begins file MAGIC_CMD=file # Used on cygwin: DLL creation program. DLLTOOL=dlltool # Used on cygwin: object dumper. OBJDUMP=objdump # Used on cygwin: assembler. AS=as # The name of the directory that contains temporary libtool files. objdir=.libs # How to create reloadable object files. reload_flag= -r reload_cmds=\$LD\$reload_flag -o \$output\$reload_objs # How to pass a linker flag through the compiler. wl=-Wl, # Object file suffix (normally o). objext=o # Old archive suffix (normally a). libext=a # Shared library suffix (normally .so). shrext_cmds='\''.so'\'' # Executable file suffix (normally ). exeext= # Additional compiler flags for building library objects. pic_flag= -fPIC -DPIC pic_mode=default # What is the maximum length of a command? max_cmd_len=32768 # Does compiler simultaneously support -c and -o options? compiler_c_o=yes # Must we lock files when doing compilation? need_locks=no # Do we need the lib prefix for modules? need_lib_prefix=no # Do we need a version for libraries? need_version=no # Whether dlopen is supported. dlopen_support=yes # Whether dlopen of programs is supported. dlopen_self=yes # Whether dlopen of statically linked
Bug#345607: libtool: line 606: --: command not found message for --mode=link
* Kurt Roeckx wrote on Mon, Jan 02, 2006 at 01:48:24PM CET: On Mon, Jan 02, 2006 at 09:39:44AM +0100, Ralf Wildenhues wrote: * John V. Belmonte wrote on Mon, Jan 02, 2006 at 08:22:34AM CET: In a clean sid environment, running libtool with --mode=link causes the following message to be output on sterr: /usr/bin/libtool: line 606: --: command not found Could you please rerun the command line with '--debug' added I've attached what I get when not using the --tag. Thank you. I can't seem to access the Debian package diffs at the moment, but searching the web turns up a rule like this in debian/rules: echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' libtool sed -n -e '/^# ### BEGIN LIBTOOL CONFIG/,/^# ### END LIBTOOL CONFIG/p' libtool \ | grep -B 2 -A 1 -e '^LTCC=' -e '^CC=' \ | sed -e 's/gcc/cc/g' libtool echo '# ### END LIBTOOL TAG CONFIG: BINCC' libtool echo libtool grep -A/-B outputs a line with two dashes as separator for matches, if more than one is found. This is exposed with 1.5.22, as we backported LTCFLAGS support to it, and thus LTCC is not immediately followed by CC any more. You could change the last sed command to kill those separators: | sed '/^--/d;s/gcc/cc/g' libtool Similar applies to BINCXX. Aside, you should probably include LTCFLAGS in the BINCC tag as well. Cheers, Ralf -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
On Mon, Jan 02, 2006 at 02:10:52PM +0100, Ralf Wildenhues wrote: grep -A/-B outputs a line with two dashes as separator for matches, if more than one is found. This is exposed with 1.5.22, as we backported LTCFLAGS support to it, and thus LTCC is not immediately followed by CC any more. I noticed that it had that -- in it before, I just never saw it generate any problems. You could change the last sed command to kill those separators: | sed '/^--/d;s/gcc/cc/g' libtool Thanks for the suggestion. Similar applies to BINCXX. Aside, you should probably include LTCFLAGS in the BINCC tag as well. BINCC only? BINCXX seems to have it too, so I'll do it for both. Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
* Kurt Roeckx wrote on Mon, Jan 02, 2006 at 02:35:23PM CET: I noticed that it had that -- in it before, I just never saw it generate any problems. I don't think it does now. On Mon, Jan 02, 2006 at 02:10:52PM +0100, Ralf Wildenhues wrote: You could change the last sed command to kill those separators: | sed '/^--/d;s/gcc/cc/g' libtool Thanks for the suggestion. BTW, this might generate problems on MinGW (because of the automatic argv rewriting for win32 paths); not that I expect Debian's libtool to end up there, but some things end up where you never expected them.. Similar applies to BINCXX. Aside, you should probably include LTCFLAGS in the BINCC tag as well. BINCC only? BINCXX seems to have it too, so I'll do it for both. Sure, I did not mean to imply that. Cheers, Ralf -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
On Mon, Jan 02, 2006 at 02:40:43PM +0100, Ralf Wildenhues wrote: On Mon, Jan 02, 2006 at 02:10:52PM +0100, Ralf Wildenhues wrote: You could change the last sed command to kill those separators: | sed '/^--/d;s/gcc/cc/g' libtool Thanks for the suggestion. BTW, this might generate problems on MinGW (because of the automatic argv rewriting for win32 paths); not that I expect Debian's libtool to end up there, but some things end up where you never expected them.. This only ends up in /usr/bin/libtool, and has nothing to do with any of the other files. So this really shouldn't affect anything other than Debian. I hope nobody just takes that file to do something else. Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
Kurt Roeckx wrote: Please show the whole command line. I can reproduce this if for instance I use gcc-4.0 instead of gcc or cc. I then get: $ libtool --mode=link gcc-4.0 tst.c -o tst /usr/bin/libtool: line 606: --: command not found libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' Adding a --tag=CC fixes my problem: $libtool --mode=link --tag=CC gcc-4.0 tst.c -o tst gcc-4.0 tst.c -o tst Normally using gcc also fixes the problem: $libtool --mode=link gcc tst.c -o tst gcc tst.c -o tst As gcc-4.0 is the default compiler in sid, that would seem to be triggering the problem. I'm using gcc on the command line. The --tag option doesn't seem to be documented in info libtool so I can't comment on that workaround. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
On Mon, Jan 02, 2006 at 11:36:40AM -0500, John Belmonte wrote: Kurt Roeckx wrote: Please show the whole command line. I can reproduce this if for instance I use gcc-4.0 instead of gcc or cc. I then get: $ libtool --mode=link gcc-4.0 tst.c -o tst /usr/bin/libtool: line 606: --: command not found libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' Adding a --tag=CC fixes my problem: $libtool --mode=link --tag=CC gcc-4.0 tst.c -o tst gcc-4.0 tst.c -o tst Normally using gcc also fixes the problem: $libtool --mode=link gcc tst.c -o tst gcc tst.c -o tst As gcc-4.0 is the default compiler in sid, that would seem to be triggering the problem. I'm using gcc on the command line. The --tag option doesn't seem to be documented in info libtool so I can't comment on that workaround. I just use gcc-4.0 because I didn't have gcc-3.4 or something installed. It look at the string to know which tag it should be using, and if it doesn't find it you can use --tag to make it do the proper thing. And yes, it's know that the documetation for --tag is a little missing, there is an open bug about that too. Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#345607: libtool: line 606: --: command not found message for --mode=link
Package: libtool Version: 1.5.22-1 Severity: normal In a clean sid environment, running libtool with --mode=link causes the following message to be output on sterr: /usr/bin/libtool: line 606: --: command not found Other than that, operation still seems correct. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.13.4 Locale: LANG=, LC_CTYPE= (charmap=ANSI_X3.4-1968) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]