Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-26 Thread Bob Friesenhahn
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

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-26 Thread Roumen Petrov
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

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-25 Thread John W. Eaton
On 6/23/19 2:56 PM, Yuri wrote: On FreeBSD libtool can't find operator new[] because it is in C mode: libtool: link: cc -fno-strict-aliasing -fopenmp -ftree-vectorize -pthread -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-strict-aliasing

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-24 Thread Bob Friesenhahn
On Mon, 24 Jun 2019, Roumen Petrov wrote: Reporter still does not provide feedback with information from configuration time (requested in a previous post) => resolution is - broken build environment. I think the problem is an unreasonable expectation which is becoming more unreasonable as

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-24 Thread Yuri
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) =>

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-24 Thread Roumen Petrov
Dunno what is wrong in Yuri's FreeBSD environment Bob Friesenhahn wrote: On Sun, 23 Jun 2019, Yuri wrote: So is there an easy way to override this and always use C++ way of linking? To do this you might need to set LD or CC to your C++ compiler.  A better way is to make your main program

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Bob Friesenhahn
On Sun, 23 Jun 2019, Yuri wrote: So is there an easy way to override this and always use C++ way of linking? To do this you might need to set LD or CC to your C++ compiler. A better way is to make your main program be C++ since that assures it can work. Consider that C++ exceptions can

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Yuri
On 2019-06-23 17:29, Bob Friesenhahn wrote: I doubt that libtool can be smart enough to intuit when the C++ compiler needs to be used for linking when the program being linked is C.  The only way it could tell this is via library dependencies.  Just supplying the library dependencies is

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Bob Friesenhahn
On Sun, 23 Jun 2019, Yuri wrote: Those variables could be used to tune build process. For instance CXX=my-c++ ./configure ... could be used to change C++ compiler. It seems to know that c++ is the C++ compiler, but then uses cc anyway: I doubt that libtool can be smart enough to intuit

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Yuri
On 2019-06-23 12:45, Roumen Petrov wrote: If clang is default OS compiler is expected symbolic link c++ to clang++ or similar. May be some OS setup commands could set such links. Remark: At end ./configure --help outputs environment variables . Those variables could be used to tune build

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Roumen Petrov
Yuri wrote: On 2019-06-23 12:19, Roumen Petrov wrote: cc ? I'm not sure which compiler suite is used on FreeBSD but it seems to me C++ compiler is not installed. clang8 is used. cc is a C compiler, c++ is a C++ compiler. Ok. Dunno why is not detected c++ at configure time. I'm not

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Yuri
On 2019-06-23 12:19, Roumen Petrov wrote: cc ? I'm not sure which compiler suite is used on FreeBSD but it seems to me C++ compiler is not installed. clang8 is used. cc is a C compiler, c++ is a C++ compiler. Yuri ___

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Roumen Petrov
Yuri wrote: On FreeBSD libtool can't find operator new[] because it is in C mode: libtool: link: cc -fno-strict-aliasing -fopenmp -ftree-vectorize -pthread -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-strict-aliasing -fstack-protector-strong -o

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Yuri
On 2019-06-23 12:06, Bob Friesenhahn wrote: Are you using expected file extensions for C++ code?  Is your main program a C++ module or a C module? C++ code uses .cpp extension. main programs are all in .c files. Yuri ___

Re: libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Bob Friesenhahn
On Sun, 23 Jun 2019, Yuri wrote: On FreeBSD libtool can't find operator new[] because it is in C mode: How to switch libtool to the C++ mode? Are you using expected file extensions for C++ code? Is your main program a C++ module or a C module? Bob -- Bob Friesenhahn

libtool uses cc to link a mixed C/C++ project and fails to find operator new

2019-06-23 Thread Yuri
On FreeBSD libtool can't find operator new[] because it is in C mode: libtool: link: cc -fno-strict-aliasing -fopenmp -ftree-vectorize -pthread -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-strict-aliasing -fstack-protector-strong -o RNALfold