sparse (cgcc) vs lintool
When trying to compile xfsprogs (from oss.sgi.com/projects/xfs)
hch@bigmac:~/work/xfs-cmds/xfsprogs$ CC=~/bin/cgcc ./configure hch@bigmac:~/work/xfs-cmds/xfsprogs$ make
I get this error:
=== libxfs ===/usr/bin/libtool --mode=compile /home/hch/bin/cgcc -I. -g -O2 -DNDEBUG -DVERSION=\"2.9.8\" -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-funsigned-char -fno-strict-aliasing -Wall -c bit.c
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[1]: *** [bit.lo] Error 1
make: *** [default] Error 2
Any idea what's up with sparse and libtool?
Quoted 17 lines · Christoph Hellwig
When trying to compile xfsprogs (from oss.sgi.com/projects/xfs)
hch@bigmac:~/work/xfs-cmds/xfsprogs$ CC=~/bin/cgcc ./configure hch@bigmac:~/work/xfs-cmds/xfsprogs$ makeI get this error:
=== libxfs ===
/usr/bin/libtool--mode=compile/home/hch/bin/cgcc-I. -g -O2 -DNDEBUG(quoted diff) +0
-3-DVERSION=\"2.9.8\" -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -c bit.clibtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag' make[1]: *** [bit.lo] Error 1
make: *** [default] Error 2
Quoted 1 line
Any idea what's up with sparse and libtool?
Looking at the FAQ from
http://www.astro.gla.ac.uk/~norman/star/ssn78/ssn78.htx/N-a5b1.html
I've just been told that libtool is ``unable to infer tagged configuration''. What on earth is that supposed to mean?
I'm not sure what this is supposed to mean exactly, but what it
seems to mean in practice is that libtool has become terribly confused about your compiler. Very probably, you forced ./configure to use a particular compiler by specifying one of the F77, FC or CC environment variables at configure time. You may have forgotten that you have that variable set.
Alternatively, you may be unaware that that variable is set: a
known manifestation of this problem is that the IRAF startup script sets F77 to be an IRAF-specific script, which works OK from the command-line (given that you want to use IRAF), but which leaves libtool in a confused heap.
This problem has also been spotted in the form libtool: compile:
specify a tag with `--tag', with apparently the same cause.
See Section 2.1.5 for more discussion of these variables.
Did gcc or any other development tools package change on your system?
Balbir
Hello Christoph,
* Christoph Hellwig wrote on Fri, Jun 06, 2008 at 02:34:34PM CEST:
Quoted 11 lines
/usr/bin/libtool--mode=compile/home/hch/bin/cgcc-I. -g -O2 -DNDEBUG(quoted diff) +0
-3-DVERSION=\"2.9.8\" -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -c bit.clibtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag' make[1]: *** [bit.lo] Error 1
make: *** [default] Error 2Any idea what's up with sparse and libtool?
If --tag=CC is not passed to libtool before /home/hch/bin/cgcc, then it tries to infer the set of compiler settings to use (CC, CXX, F77, ...) from the compiler name passed.
I don't know the sources in question, but typically you can append --tag=CC to some $(LIBTOOL) variable or set $(LIBTOOLFLAGS) or so.
Hope that helps.
Cheers,
Ralf
Quoted 8 lines · Ralf Wildenhues
Quoted 1 line
Any idea what's up with sparse and libtool?
If --tag=CC is not passed to libtool before
/home/hch/bin/cgcc, then it tries to infer the set of compiler settings to use (CC, CXX, F77, ...) from the compiler name passed.I don't know the sources in question, but typically you can append --tag=CC to some $(LIBTOOL) variable or set $(LIBTOOLFLAGS) or so.
Thanks, a
LIBTOOL="libtool --tag=CC" CC=~/bin/cgcc ./configure
does it for me. So I guess the problem is with libtool and it needs to be taught about cgcc.
* Christoph Hellwig wrote on Fri, Jun 06, 2008 at 03:07:56PM CEST:
Quoted 5 lines
LIBTOOL="libtool --tag=CC" CC=~/bin/cgcc ./configure
does it for me. So I guess the problem is with libtool and it needs to be taught about cgcc.
Well, thing is, the typical way things work is that a libtool script is generated as part of the configure process, and it sets things for the $CC, $CXX, etc. used for that configure. With this package, however, /usr/bin/libtool is used, and that typically has been configured only for /usr/bin/gcc etc.
I suppose a distro could add a section for cgcc, yes, or make it assume --tag=CC for 'cgcc'. But really passing --tag=CC is the sane thing to
do: the package knows that your code is C code, whereas libtool inferring it from the command line is error-prone (which is why the tag check was made stricter in the first place).
Cheers,
Ralf
Quoted 11 lines · Ralf Wildenhues
Well, thing is, the typical way things work is that a libtool script is generated as part of the configure process, and it sets things for the $CC, $CXX, etc. used for that configure. With this package, however,
/usr/bin/libtoolis used, and that typically has been configured only for/usr/bin/gccetc.I suppose a distro could add a section for cgcc, yes, or make it assume --tag=CC for 'cgcc'. But really passing --tag=CC is the sane thing to
do: the package knows that your code is C code, whereas libtool inferring it from the command line is error-prone (which is why the tag check was made stricter in the first place).
Thanks, that explanation makes a lot of sense. I'll see if I can fix up the xfsprogs buildsystems, it's a little odd anyway.
Quoted 4 lines · Christoph Hellwig
When trying to compile xfsprogs (from oss.sgi.com/projects/xfs)
hch@bigmac:~/work/xfs-cmds/xfsprogs$ CC=~/bin/cgcc ./configure hch@bigmac:~/work/xfs-cmds/xfsprogs$ make
A problem might be that make doesn't "know" that you want to use cgcc. If your configure is created with a recent autoconf, you should try to run:
./configure CC=~/bin/cgcc
make
Best regards
Uwe
Signature · 7 lines
Uwe Kleine-König http://www.google.com/search?q=sin%28pi%2F2%29 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 17 lines · Christoph Hellwig
When trying to compile xfsprogs (from oss.sgi.com/projects/xfs)
hch@bigmac:~/work/xfs-cmds/xfsprogs$ CC=~/bin/cgcc ./configure hch@bigmac:~/work/xfs-cmds/xfsprogs$ makeI get this error:
=== libxfs ===
/usr/bin/libtool--mode=compile/home/hch/bin/cgcc-I. -g -O2 -DNDEBUG(quoted diff) +0
-3-DVERSION=\"2.9.8\" -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -c bit.clibtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag' make[1]: *** [bit.lo] Error 1
make: *** [default] Error 2
Quoted 1 line
Any idea what's up with sparse and libtool?
It can be reproduced without sparse:
[proski@dv xfsprogs-2.9.8]$ ./configure CC=/usr/bin/gcc checking for gcc... /usr/bin/gcc
checking for C compiler default output file name... a.out checking whether the C compiler works... yes
checking whether we are cross compiling... no
...
checking size of char *... 8
configure: creating ./config.status
config.status: creating include/builddefs
config.status: creating include/platform_defs.h config.status: include/platform_defs.h is unchanged [proski@dv xfsprogs-2.9.8]$ make
=== include ===
rm -f xfs disk
ln -s . xfs
ln -s . disk
=== libxfs ===/usr/bin/libtool --mode=compile /usr/bin/gcc -I. -g -O2 -DNDEBUG -DVERSION=\"2.9.8\" -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE= \"xfsprogs\" -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-funsigned-char -fno-strict-aliasing -Wall -c bit.c
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
gmake[1]: *** [bit.lo] Error 1
make: *** [default] Error 2
[proski@dv xfsprogs-2.9.8]$
Besides, replying on user installed libtool is asking for trouble. The proper way to use libtool is to include it into the package.
It's recommended to use automake with libtool, but even if they are too automake-averse, there are still some rules how to use libtool properly.
Signature · 2 lines
Regards, Pavel Roskin