Re: multi-language-branch: --tag=CXX not specified
On Sep 15, 2000, Ossama Othman <[EMAIL PROTECTED]> wrote: > Robert sent me his generated libtool script. Part of the CXX > configuration is listed below. It appears that ltconfig wasn't > invoked properly. Then I'll re-iterate the question of what version of the libtool scripts and libtool.m4 he's using. Also, what are the libtool-related macros called in configure.in? Is AC_LIBTOOL_CXX being called explicitly (it shouldn't), or is it called implicitly by the AC_PROG_CXX hook? -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: multi-language-branch: --tag=CXX not specified
Hi Alexandre, On Fri, Sep 15, 2000 at 06:58:02PM -0300, Alexandre Oliva wrote: > On Sep 15, 2000, Robert Boehne <[EMAIL PROTECTED]> wrote: > > > % ../../libtool --tag=CXX --config | grep '^CC=' | tail -1 > > CC="cc" > > That's the problem. It should be 'g++', in the CXX configuration. > Remove the `tail -1' and make sure you get two lines, one for the > default configuration and one overrider for CXX. > > Then go figure why ltconfig got the wrong value when creating the CXX > configuration. Search for `TAG CONFIG: CXX' to see the configuration > variables passed to ltconfig. Also check what version of libtool > you're using. Robert sent me his generated libtool script. Part of the CXX configuration is listed below. It appears that ltconfig wasn't invoked properly. The C++ compiler was not set when configuring the C++ tagged configuration. ### BEGIN LIBTOOL TAG CONFIG: CXX # Libtool was configured as follows, on host boreas: # # AR="" AR_FLAGS="" LTCC="gcc" CC="" \ # CFLAGS="" CPPFLAGS="" \ # MAGIC="" LD="" LDFLAGS="" LIBS="" \ # LN_S="ln -s" NM="/bin/nm -B" RANLIB="ranlib" STRIP="strip" \ # AS="" DLLTOOL="" OBJDUMP="" \ # objext="" exeext="" reload_flag=" -r" \ # deplibs_check_method="pass_all" \ # file_magic_cmd="\${MAGIC}" \ # make/ltconfig -o libtool --cache-file=/dev/null --with-gcc --build=powerpc-ibm-aix4.3.3.0 --add-tag=CXX make/ltcf-cxx.sh powerpc-ibm-aix4.3.3.0 # BTW, Robert thanks so much for working on the AIX port! I've been aching to get that port completed but since I don't have access to an AIX box I've been waiting for someone to come along to help out. :-) -Ossama -- Ossama Othman <[EMAIL PROTECTED]> Distributed Object Computing Laboratory, Univ. of California at Irvine 1024D/F7A394A8 - 84ED AA0B 1203 99E4 1068 70E6 5EB7 5E71 F7A3 94A8
Re: multi-language-branch: --tag=CXX not specified
On Sep 15, 2000, Robert Boehne <[EMAIL PROTECTED]> wrote: > % ../../libtool --tag=CXX --config | grep '^CC=' | tail -1 > CC="cc" That's the problem. It should be 'g++', in the CXX configuration. Remove the `tail -1' and make sure you get two lines, one for the default configuration and one overrider for CXX. Then go figure why ltconfig got the wrong value when creating the CXX configuration. Search for `TAG CONFIG: CXX' to see the configuration variables passed to ltconfig. Also check what version of libtool you're using. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: multi-language-branch: --tag=CXX not specified
% ../../libtool --tag=CXX --config | grep '^CC=' | tail -1 CC="cc" -- Robert Boehne Software Engineer Ricardo Software Chicago Technical Center TEL: (630)789-0003 x. 238 FAX: (630)789-0127 email: [EMAIL PROTECTED]
Re: multi-language-branch: --tag=CXX not specified
On Sep 15, 2000, Robert Boehne <[EMAIL PROTECTED]> wrote: > When I take the Makefile's that result from running > automake, and autoconf, and add --tag=CXX to the C++ > variable definitions, the error message goes away and > it complies a shared library. > This tag should be > automaticly put into the Makefile but it is not being done. It doesn't have to be. libtool should be able to infer the tag from the command line. What do you get if you run: ../../libtool --tag=CXX --config | grep '^CC=' | tail -1 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: multi-language-branch: --tag=CXX not specified
Yes, it seemed to work when I had Makefiles only one directory deep, when I created my Makefiles three directories deep, it suddenly broke. -- Robert Boehne Software Engineer Ricardo Software Chicago Technical Center TEL: (630)789-0003 x. 238 FAX: (630)789-0127 email: [EMAIL PROTECTED]
Re: multi-language-branch: --tag=CXX not specified
Hi Robert, I only noticed the following after I posted my last message: On Fri, Sep 15, 2000 at 03:37:37PM -0500, Robert Boehne wrote: > libtool: compile: unable to infer tagged configuration > libtool: compile: specify a tag with `--tag' Are you using a C++ compiler different (even if only by name) from the one libtool was configured with? Specifically, is the "CXX" tagged configuration set up to use "c++" or "g++?" The above message implies that the libtool configured compiler and the compiler passed by automake are different. Is this the case? BTW, the above message is coming from the automatic tagged configuration selection code I mentioned in my last message. Thanks, -Ossama -- Ossama Othman <[EMAIL PROTECTED]> Distributed Object Computing Laboratory, Univ. of California at Irvine 1024D/F7A394A8 - 84ED AA0B 1203 99E4 1068 70E6 5EB7 5E71 F7A3 94A8
Re: multi-language-branch: --tag=CXX not specified
Hi Robert, On Fri, Sep 15, 2000 at 03:37:37PM -0500, Robert Boehne wrote: > I can now run "make" from the top level and the library will be built. > Perhaps there is some confustion using libtool with CXX and CC for > files in the same Makefile? This should be transparent. A couple of months ago I added a feature to libtool that automatically selects which tagged configuration to use, even without the "--tag" argument, to specifically handle the situation you describe above. I'll try to reproduce the problem you're getting but I'm fairly certain that this feature was working a few months ago. -Ossama -- Ossama Othman <[EMAIL PROTECTED]> Distributed Object Computing Laboratory, Univ. of California at Irvine 1024D/F7A394A8 - 84ED AA0B 1203 99E4 1068 70E6 5EB7 5E71 F7A3 94A8
Re: multi-language-branch: --tag=CXX not specified
OK, I don't think I was very clear about what exactly my problem is, When I take the Makefile's that result from running automake, and autoconf, and add --tag=CXX to the C++ variable definitions, the error message goes away and it complies a shared library. This tag should be automaticly put into the Makefile but it is not being done. Now I also have some C source files in the project so it needs to which to use C or C++. Here is what happens: creating ./config.status creating Makefile creating src/Makefile creating src/TKernel/Makefile creating src/TKMath/Makefile creating src/TKG2d/Makefile creating src/TKG3d/Makefile creating src/TKGeomBase/Makefile creating src/TKBRep/Makefile creating config.h boreas::/boreas/rbo/new/OCC/OCC (145)% make make all-recursive make[1]: Entering directory `/boreas/rbo/new/OCC/OCC' Making all in src make[2]: Entering directory `/boreas/rbo/new/OCC/OCC/src' Making all in TKernel make[3]: Entering directory `/boreas/rbo/new/OCC/OCC/src/TKernel' /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../inc -I../../drv/FSD -I../../drv/GraphDS -I../../drv/GraphTools -I../../drv/MMgt -I../../drv/OSD -I../../drv/Plugin -I../../drv/Quantity -I../../drv/Resource -I../../drv/SortTools -I../../drv/Standard -I../../drv/StdFail -I../../drv/Storage -I../../drv/TColQuantity -I../../drv/TColStd -I../../drv/TCollection -I../../drv/TShort -I../../drv/Units -I../../drv/UnitsAPI -I../../drv/Dynamic -I../../drv/Materials -I../../drv/Dico-g -O2 -c -o FSD_Archive.lo `test -f ../../src/FSD/FSD_Archive.cxx || echo './'`../../src/FSD/FSD_Archive.cxx libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' make[3]: *** [FSD_Archive.lo] Error 1 make[3]: Leaving directory `/boreas/rbo/new/OCC/OCC/src/TKernel' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/boreas/rbo/new/OCC/OCC/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/boreas/rbo/new/OCC/OCC' make: *** [all-recursive-am] Error 2 boreas::/boreas/rbo/new/OCC/OCC (146)% Now let's go down to the Makefile that is dying, and we'll see what's wrong: COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CFLAGS = -g -O2 CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXX FLAGS) $(CXXFLAGS) CXXFLAGS = -g -O2 CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ Now if I go through and add "--tag=CXX" to the C++ lines, LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ I can now run "make" from the top level and the library will be built. Perhaps there is some confustion using libtool with CXX and CC for files in the same Makefile? Robert Boehne Software Engineer Ricardo Software Chicago Technical Center TEL: (630)789-0003 x. 238 FAX: (630)789-0127 email: [EMAIL PROTECTED]
Re: multi-language-branch: --tag=CXX not specified
On Sep 14, 2000, Robert Boehne <[EMAIL PROTECTED]> wrote: > /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. [snip] > libtool: compile: unable to infer tagged configuration > libtool: compile: specify a tag with `--tag' libtool.m4, that should be part of aclocal.m4, hooks into AC_PROG_CXX some code to automatically add a CXX tag to libtool. If you don't use AC_PROG_CXX or you're using an incompatible libtool.m4, you will get an error like this. > Also, I read the documentation on how to port libtool, however > it doesn't cover (as far as I could find) porting of C++ support. It's highly outdated, at this point. Basically, you have to modify ltcf-cxx.sh. Take a look at it and see if it makes any sense for you :-) -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me