* sparse (cgcc) vs lintool
@ 2008-06-06 12:34 Christoph Hellwig
2008-06-06 12:47 ` Balbir Singh
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Christoph Hellwig @ 2008-06-06 12:34 UTC (permalink / raw)
To: linux-sparse
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?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 12:34 sparse (cgcc) vs lintool Christoph Hellwig
@ 2008-06-06 12:47 ` Balbir Singh
2008-06-06 12:49 ` Ralf Wildenhues
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Balbir Singh @ 2008-06-06 12:47 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-sparse
On Fri, Jun 6, 2008 at 6:04 PM, Christoph Hellwig <hch@lst.de> wrote:
> 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?
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 12:34 sparse (cgcc) vs lintool Christoph Hellwig
2008-06-06 12:47 ` Balbir Singh
@ 2008-06-06 12:49 ` Ralf Wildenhues
2008-06-06 13:07 ` Christoph Hellwig
2008-06-06 18:15 ` Uwe Kleine-König
2008-06-06 19:39 ` Pavel Roskin
3 siblings, 1 reply; 8+ messages in thread
From: Ralf Wildenhues @ 2008-06-06 12:49 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-sparse
Hello Christoph,
* Christoph Hellwig wrote on Fri, Jun 06, 2008 at 02:34:34PM CEST:
>
> /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?
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 12:49 ` Ralf Wildenhues
@ 2008-06-06 13:07 ` Christoph Hellwig
2008-06-06 13:21 ` Ralf Wildenhues
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2008-06-06 13:07 UTC (permalink / raw)
To: Christoph Hellwig, linux-sparse
On Fri, Jun 06, 2008 at 02:49:55PM +0200, Ralf Wildenhues wrote:
> > 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 13:07 ` Christoph Hellwig
@ 2008-06-06 13:21 ` Ralf Wildenhues
2008-06-06 13:25 ` Christoph Hellwig
0 siblings, 1 reply; 8+ messages in thread
From: Ralf Wildenhues @ 2008-06-06 13:21 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-sparse
* Christoph Hellwig wrote on Fri, Jun 06, 2008 at 03:07:56PM CEST:
>
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 13:21 ` Ralf Wildenhues
@ 2008-06-06 13:25 ` Christoph Hellwig
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2008-06-06 13:25 UTC (permalink / raw)
To: Christoph Hellwig, linux-sparse
On Fri, Jun 06, 2008 at 03:21:23PM +0200, Ralf Wildenhues wrote:
> 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).
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 12:34 sparse (cgcc) vs lintool Christoph Hellwig
2008-06-06 12:47 ` Balbir Singh
2008-06-06 12:49 ` Ralf Wildenhues
@ 2008-06-06 18:15 ` Uwe Kleine-König
2008-06-06 19:39 ` Pavel Roskin
3 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2008-06-06 18:15 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-sparse
Christoph Hellwig wrote:
> 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
--
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sparse (cgcc) vs lintool
2008-06-06 12:34 sparse (cgcc) vs lintool Christoph Hellwig
` (2 preceding siblings ...)
2008-06-06 18:15 ` Uwe Kleine-König
@ 2008-06-06 19:39 ` Pavel Roskin
3 siblings, 0 replies; 8+ messages in thread
From: Pavel Roskin @ 2008-06-06 19:39 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-sparse
On Fri, 2008-06-06 at 14:34 +0200, Christoph Hellwig wrote:
> 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?
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.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-06 19:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06 12:34 sparse (cgcc) vs lintool Christoph Hellwig
2008-06-06 12:47 ` Balbir Singh
2008-06-06 12:49 ` Ralf Wildenhues
2008-06-06 13:07 ` Christoph Hellwig
2008-06-06 13:21 ` Ralf Wildenhues
2008-06-06 13:25 ` Christoph Hellwig
2008-06-06 18:15 ` Uwe Kleine-König
2008-06-06 19:39 ` Pavel Roskin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.