Re: linking a C program with a C++ library on Solaris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 2/25/2008 11:58 PM: | I believe that backward compatability has been mostly respected. | | Yes, but just running libtoolize has never been enough. Running aclocal | (with Libtool 2.2's macro files visible to aclocal) to get the new macro | definitions is also needed; autoreconf -vf takes care of both. Although when upgrading m4 to a newer version of libtool, we noticed that autoreconf runs aclocal prior to libtoolize, which is probably the wrong order. We still need to investigate whether autoconf should switch that order. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHxA5F84KuGfSFAYARApRpAJ9CnHD52M7j6q4D/9rDcRvNSrcx/wCgjAf1 yCIHq+W/XhBt2kTissBpimc= =g9Gz -END PGP SIGNATURE- ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: linking a C program with a C++ library on Solaris
Hi Eric, * Eric Blake wrote on Tue, Feb 26, 2008 at 02:04:05PM CET: According to Ralf Wildenhues on 2/25/2008 11:58 PM: | I believe that backward compatability has been mostly respected. | | Yes, but just running libtoolize has never been enough. Running aclocal | (with Libtool 2.2's macro files visible to aclocal) to get the new macro | definitions is also needed; autoreconf -vf takes care of both. Although when upgrading m4 to a newer version of libtool, we noticed that autoreconf runs aclocal prior to libtoolize, which is probably the wrong order. We still need to investigate whether autoconf should switch that order. autoreconf should run aclocal both before and after libtoolize. It does a certain amount of short-cutting, though. If there is a bug you can reproduce (time stamps are important!) I'm all ears. Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: linking a C program with a C++ library on Solaris
In regard to: Re: linking a C program with a C++ library on Solaris, Ralf...: Hello Bob, Tim, * Bob Friesenhahn wrote on Tue, Feb 26, 2008 at 03:11:44AM CET: On Mon, 25 Feb 2008, Tim Mooney wrote: I don't see anything in 2.1b's info files or README or NEWS for updating a project from 1.5.x to 2.2. I assume that means that there's nothing a project maintainer needs to do other than to re-libtoolize his or her project? I believe that backward compatability has been mostly respected. Yes, but just running libtoolize has never been enough. Absolutely -- I guess I was just implying the aclocal run too, though I should have been more explicit. My main question was whether any new macros needed to be called, or old ones needed to change how they're called, and it looks like that's generally not needed, which is great news. Running aclocal (with Libtool 2.2's macro files visible to aclocal) to get the new macro definitions is also needed; autoreconf -vf takes care of both. As a subsequent poster has mentioned, I've also noticed that autoreconf typically only runs aclocal *before* libtoolize, which struck me as odd when I noticed it. I'm not saying that autoreconf's behavior is broken, since I've only used it a few times and have never noticed a problem because of this unexpected order in which it runs the commands. I was just surprised at the order it has used on the few occasions that I've used it. Tim -- Tim Mooney [EMAIL PROTECTED] Information Technology Services (701) 231-1076 (Voice) Room 242-J6, IACC Building (701) 231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 ___ http://lists.gnu.org/mailman/listinfo/libtool
linking a C program with a C++ library on Solaris
I've been building and packaging a lot of software in the past couple weeks on my x86_64-sun-solaris2.10 workstation. I've been using the Sun Workshop 12 C and C++ compilers for the builds. I've run into several situations in the past week where I'm building a package that's mainly written in C (nautilus, tracker, faac, et. al.) that wants to link with a C++ library (exempi, mpeg4ip). In all the permutations I've encountered so far, both the C++ library and the C package are using libtool, and I've always updated both to use 1.5.26. On Solaris, if you are linking against any C++ objects, you must use the C++ compiler to link. I don't know if that's common to other platforms or not, as I don't have access to the plethora of UNIX platforms I used to. In any case, the packages I've encountered don't seem to expect that, so the (libtool) link stage for the C project doesn't know to use C++, and the link fails. Is this something that libtool could be (should be?) handling automatically? Even if it can't be handled automatically, is there something that libtool could be doing to help make it easier for packages that are primarily C (but link against C++ libraries/objects) to know that they need to switch to C++ for linking in their C project? Tim -- Tim Mooney [EMAIL PROTECTED] Information Technology Services (701) 231-1076 (Voice) Room 242-J6, IACC Building (701) 231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: linking a C program with a C++ library on Solaris
On Mon, 25 Feb 2008, Tim Mooney wrote: On Solaris, if you are linking against any C++ objects, you must use the C++ compiler to link. I don't know if that's common to other platforms or not, as I don't have access to the plethora of UNIX platforms I used to. In any case, the packages I've encountered don't seem to expect that, so the (libtool) link stage for the C project doesn't know to use C++, and the link fails. Libtool 2.2 does not have this problem. It should be released as soon as someone is available to create the release package since the consensus is that it is ready. Since it did not appear to happen this past weekend, maybe we will be lucky and it will pop out this next weekend. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: linking a C program with a C++ library on Solaris
On Mon, 25 Feb 2008, Tim Mooney wrote: Thanks Bob, that's great news! I don't see anything in 2.1b's info files or README or NEWS for updating a project from 1.5.x to 2.2. I assume that means that there's nothing a project maintainer needs to do other than to re-libtoolize his or her project? I believe that backward compatability has been mostly respected. One thing I am aware of is that there is now a requirement that libtool be initialized before libltdl is initialized. There is some newer syntax now. This is what I am using for my nonrecursive project which also configures and builds libltdl nonrecursively. # Configure libtool AC_LIBTOOL_DLOPEN LT_INIT([disable-shared win32-dll]) LT_LANG([C++]) AC_SUBST(LIBTOOL_DEPS) # Configure libltdl LT_CONFIG_LTDL_DIR([ltdl]) LTDL_INIT([convenience nonrecursive]) Building libltdl nonrecursively saves a lot of configure time, and it makes the package smaller. I hope it is nice and warm in North Dakota. :-) Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: linking a C program with a C++ library on Solaris
Hello Bob, Tim, * Bob Friesenhahn wrote on Tue, Feb 26, 2008 at 03:11:44AM CET: On Mon, 25 Feb 2008, Tim Mooney wrote: I don't see anything in 2.1b's info files or README or NEWS for updating a project from 1.5.x to 2.2. I assume that means that there's nothing a project maintainer needs to do other than to re-libtoolize his or her project? I believe that backward compatability has been mostly respected. Yes, but just running libtoolize has never been enough. Running aclocal (with Libtool 2.2's macro files visible to aclocal) to get the new macro definitions is also needed; autoreconf -vf takes care of both. Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool