patchGNU Libtool - Patches: patch #7055, archive_cmds_need_lc macro check...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7055: archive_cmds_need_lc macro check is broken (result check is inverted)

Submitter:  Gianluigi Tiesi <sherpya>
Submitted:  Mon 04 Jan 2010 03:18:54 AM UTC
   
 
Category:  None Priority:  6
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Jump to the original submission

Wed 06 Jan 2010 11:02:52 PM UTC, comment #12: 

I've removed the offending code, it works now, thanks, configure.ac was not mine, it was from upstream package, unfortunately I'm not much familiar with autotools code :)

Gianluigi Tiesi <sherpya>
Wed 06 Jan 2010 10:26:26 PM UTC, comment #11: 

Thanks for the link.  The bug seems to be in your configure.ac:

# This is required to get past a stupid configure bug when making the rpm.
# Basically it is broken to specify the host as a command line argument to
# configure on its own, i.e. without giving --host=. It is supposed to work
# but doesn't. So this sets host and erases nonopt effectively moving the
# standalone command line option into the --host= form.
if test "x$nonopt" != "xNONE"; then
host="$nonopt"
nonopt="NONE"
fi

Try removing those lines.  Or at least, add something like
  && test "x$nonopt" != x

to the if conditions, so that $host is not set to the empty value here.

Ralf Wildenhues <rwild>
Group Member
Wed 06 Jan 2010 10:01:20 PM UTC, comment #10: 

$ ./configure --version
ntfsprogs configure 2.0.0
generated by GNU Autoconf 2.65

Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.

it was generated from scratch from linux-ntfs configure.ac
the linux ntfs repo does not have premade files, my stuff is here:

http://github.com/sherpya/linux-ntfs

Gianluigi Tiesi <sherpya>
Wed 06 Jan 2010 09:55:23 PM UTC, comment #9: 

Hmpf.  Maybe this code does come from somewhere else, and the Autoconf used isn't old.  Anyway, the verbose log shows that something sets host= to empty after host is set correctly.  That is a bug, either in your configure.ac script or some Autoconf macro.  Can you post (a link to) the script?  Thanks.

Ralf Wildenhues <rwild>
Group Member
Wed 06 Jan 2010 08:04:11 PM UTC, comment #8: 

Your verbose configure output contains lines like
+ nonopt=NONE

which have been removed from Autoconf in 2000.  So, unless they come from your configure.ac file, this configure script has been generated with an ancient autoconf version.  Try running
  ./configure --version

If it doesn't state the Autoconf version it was generated with, then it is too old.

Ralf Wildenhues <rwild>
Group Member
Wed 06 Jan 2010 07:56:50 PM UTC, comment #7: 

I've generated files from autogen.sh on a debian sid, autoconf version
is 2.65, mingw native does not have autoconf

configure.ac
has
AC_PREREQ(2.59)

libtool is 2.2.6b

Gianluigi Tiesi <sherpya>
Wed 06 Jan 2010 06:55:36 PM UTC, comment #6: 

OK.  You are using an ancient version of Autoconf, presumably 2.13, but it must be from before 2000.  Please update to a non-ancient version first; libtool requires 2.59 or newer, but preferably you should use 2.65.

Ralf Wildenhues <rwild>
Group Member
Wed 06 Jan 2010 10:10:23 AM UTC, comment #5: 

attaching verbose configure out, I hope it does not contain sensible data ;P

(file #19419)

Gianluigi Tiesi <sherpya>
Wed 06 Jan 2010 09:14:40 AM UTC, comment #4: 

with ./configure --host=i586-mingw32msvc
on linux I have exactly same problem on native mingw, it complains about -lc

on cross:
# The host system.
host_alias=i586-mingw32msvc
host=
host_os=mingw32msvc

on native:
# The host system.
host_alias=
host=
host_os=mingw32


Gianluigi Tiesi <sherpya>
Wed 06 Jan 2010 06:32:00 AM UTC, comment #3: 

If you want cross compilation, enable it with
  ./configure --host=i586-mingw32msvc

not with
  ./configure CC=i586-mingw32msvc-gcc

That will fix half of your problems.  There is still another
one in your native build: there, -lc should be ignored as well.
It strikes me as odd that the --config output shows $host as
empty.  It should be a triple matching --mingw*.  This causes
the failure to ignore -lc.

Please find out why your $host is not set correctly: how do you
invoke configure?  What does the
  checking host system type...

configure check say?  Maybe your config.guess and config.sub
scripts are not present, or very old?

Ralf Wildenhues <rwild>
Group Member
Tue 05 Jan 2010 07:59:33 AM UTC, comment #2: 

attached info: in the archive

native-log.txt: link on native mingw
ltconfig-native.txt: libtool --config on mingw

cross-log.txt and ltconfig-cross.txt
same thing while cross compiling on linux

please note, while cross compiling the linkers fails to find -lc at all


(file #19412)

Gianluigi Tiesi <sherpya>
Mon 04 Jan 2010 07:40:45 PM UTC, comment #1: 

The test is written as intended.  However, there is code in libtool (from ltmain.sh) that removes -lc from link command lines for $host matching --mingw*.  So, let's find out why that apparently didn't work in your case.

Please show the failing link command line plus all of its output, as well as the output of './libtool --config'.  Thanks.

Ralf Wildenhues <rwild>
Group Member
Mon 04 Jan 2010 03:18:54 AM UTC, original submission:  

#
# Do we need to explicitly link libc?
#

        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
        then
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
        else
      _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
        fi


gets expanded to:
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
        then
      archive_cmds_need_lc=no
        else
      archive_cmds_need_lc=yes
        fi

EXIT STATUS
       Normally,  the  exit  status  is  0  if  selected lines are found and 1 otherwise.

on mingw I'm unable to produce shared dll because libtool complains about missing -lc


Gianluigi Tiesi <sherpya>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19419:  conf-verbose.txt.gz added by sherpya (64KiB - application/gzip)
file #19412:  ltbug.tar.gz added by sherpya (6KiB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rwild (Posted a comment)
  • -email is unavailable- added by sherpya (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-06 sherpya Attached File- Added conf-verbose.txt.gz, #19419
    2010-01-05 sherpya Attached File- Added ltbug.tar.gz, #19412

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code