Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new
uri wrote: > On 2019-06-24 09:55, Roumen Petrov wrote: >> >> And projects builds just fine! >> Conclusion - there is no defect neither in libtool nor in automake nor >> in project autotool files. >> >> Reporter still does not provide feedback with information from >> configuration time (requested in a previous post) => resolution is - >> broken build environment. > > > configure and Makefile.in contain -lstdc++. These could be different > between systems. On FreeBSD it should be -lc++. Both configure and Makefile.in are generated . You cannot blame configure for -lstdc++ as more or less is expected. It depend from so many things. For instance is normal a autoconf based project to check for function or libraries. Next is Makefile.in. It is generated from Makefile.am. Please check again ;). > > It worked when I patched these lines, Dunno why you shut in the dark. but this is error-prone because > some other toolchains might use a different C++ library. Yes , and instead to update generated scripts you could help project ViennaRNA to improve build with correct report. > > > Once the error-prone -lstdc++ are removed, libtool fails because it > links with the C compiler. Ha-ha. Interesting. Now I have idea how broke your build system . Please avoid to update randomly some scripts. One again ViennaRNA build fine in my environment. Build system uses proper compiler. NO ISSUE WITH LIBTOOL! > Yuri Regards, Roumen ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new
On Wed, 26 Jun 2019, Roumen Petrov wrote: but this is error-prone because some other toolchains might use a different C++ library. Oracle Solaris 11 with the Solaris Studio 12 compiler supports a large number of C++ runtime libraries as described at https://docs.oracle.com/cd/E37069_01/html/E37075/bkaje.html When dealing with C++, one must know what one is doing. The only portable way to link with C++ is by assuring that the main() function is in a C++ module. If the C++ compiler is intentionally used to link using the other options supplied to the compiler, then the correct libraries will be automatically selected by the compiler. On a typical GNU Linux or FreeBSD system, all C++ software is built using the same C++ runtime libraries (at some specified C++ standard level). This is accomplished through brute force by the OS package maintainers. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt ___ https://lists.gnu.org/mailman/listinfo/libtool