Skip Menu |

This queue is for tickets about the Inline-CPP CPAN distribution.

Report information
The Basics
Id: 92595
Status: resolved
Priority: 0/
Queue: Inline-CPP

People
Owner: Nobody in particular
Requestors: PLICEASE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: FreeBSD 10.0 or better should use clang++
FreeBSD 10 comes with clang as the default C++ compiler instead of g++. The attached patch will default to clang and -lc++ for FreeBSD 10 or better.
Subject: patch.diff
index eaa5de9..29c8d04 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -113,6 +113,11 @@ elsif ( $Config{osname} eq 'mirbsd' ) { $libs_guess = "-L$stdcpp -lstdc++ -lc -lgcc_s"; } +elsif ( $Config{osname} eq 'freebsd' && $Config{osvers} =~ /^(\d+)/ && $1 >= 10 ) { + $cc_guess = 'clang++'; + $libs_guess = '-lc++'; +} + # Sane defaults for other (probably unix-like) operating systems else { $cc_guess = 'g++';
On Thu Jan 30 16:01:57 2014, PLICEASE wrote: Show quoted text
> FreeBSD 10 comes with clang as the default C++ compiler instead of > g++. The attached patch will default to clang and -lc++ for FreeBSD > 10 or better.
Thanks. The patch looks fine, and has been applied to Inline::CPP v0.47.
Subject: Re: [rt.cpan.org #92595] FreeBSD 10.0 or better should use clang++
Date: Fri, 31 Jan 2014 13:53:44 -0700
To: bug-Inline-CPP [...] rt.cpan.org
From: David Oswald <daoswald [...] gmail.com>
Graham: I don't have any FreeBSD systems running. Are you able to look at the FreeBSD "FAIL" reports that showed up after I applied your patch, and render an opinion as to what's the matter? I appreciate it, if you find the time. Dave On Thu, Jan 30, 2014 at 5:01 PM, Graham Ollis via RT <bug-Inline-CPP@rt.cpan.org> wrote: Show quoted text
> Thu Jan 30 19:01:57 2014: Request 92595 was acted upon. > Transaction: Ticket created by PLICEASE > Queue: Inline-CPP > Subject: FreeBSD 10.0 or better should use clang++ > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: PLICEASE@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=92595 > > > > FreeBSD 10 comes with clang as the default C++ compiler instead of g++. The attached patch will default to clang and -lc++ for FreeBSD 10 or better. > > > > index eaa5de9..29c8d04 100644 > --- a/Makefile.PL > +++ b/Makefile.PL > @@ -113,6 +113,11 @@ elsif ( $Config{osname} eq 'mirbsd' ) { > $libs_guess = "-L$stdcpp -lstdc++ -lc -lgcc_s"; > } > > +elsif ( $Config{osname} eq 'freebsd' && $Config{osvers} =~ /^(\d+)/ && $1 >= 10 ) { > + $cc_guess = 'clang++'; > + $libs_guess = '-lc++'; > +} > + > # Sane defaults for other (probably unix-like) operating systems > else { > $cc_guess = 'g++'; >
-- David Oswald daoswald@gmail.com
I am able to reproduce the errors with what is on CPAN. I think -lc++ got changed to -ls++ somewhere along the way. The attached patch should fix it. On Fri Jan 31 15:54:12 2014, daoswald wrote: Show quoted text
> Graham: I don't have any FreeBSD systems running. Are you able to > look at the FreeBSD "FAIL" reports that showed up after I applied your > patch, and render an opinion as to what's the matter? > > I appreciate it, if you find the time. > > Dave > > On Thu, Jan 30, 2014 at 5:01 PM, Graham Ollis via RT > <bug-Inline-CPP@rt.cpan.org> wrote:
> > Thu Jan 30 19:01:57 2014: Request 92595 was acted upon. > > Transaction: Ticket created by PLICEASE > > Queue: Inline-CPP > > Subject: FreeBSD 10.0 or better should use clang++ > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: PLICEASE@cpan.org > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=92595 > > > > > > > FreeBSD 10 comes with clang as the default C++ compiler instead of > > g++. The attached patch will default to clang and -lc++ for FreeBSD > > 10 or better. > > > > > > > > index eaa5de9..29c8d04 100644 > > --- a/Makefile.PL > > +++ b/Makefile.PL > > @@ -113,6 +113,11 @@ elsif ( $Config{osname} eq 'mirbsd' ) { > > $libs_guess = "-L$stdcpp -lstdc++ -lc -lgcc_s"; > > } > > > > +elsif ( $Config{osname} eq 'freebsd' && $Config{osvers} =~ /^(\d+)/ > > && $1 >= 10 ) { > > + $cc_guess = 'clang++'; > > + $libs_guess = '-lc++'; > > +} > > + > > # Sane defaults for other (probably unix-like) operating systems > > else { > > $cc_guess = 'g++'; > >
Subject: patch2.patch
index 7ead91a..10ae297 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -115,7 +115,7 @@ elsif ( $Config{osname} eq 'mirbsd' ) { elsif( $Config{osname} eq 'freebsd' && $Config{osvers} =~ /^(\d+)/ && $1 >= 10 ){ $cc_guess = 'clang++'; - $libs_guess = '-ls++'; + $libs_guess = '-lc++'; } # Sane defaults for other (probably unix-like) operating systems
On Fri Jan 31 18:29:45 2014, PLICEASE wrote: Show quoted text
> I am able to reproduce the errors with what is on CPAN. I think -lc++ > got changed to -ls++ somewhere along the way. The attached patch > should fix it.
Thanks. Applied again (correctly this time).
On 2014-02-01 01:26:42, DAVIDO wrote: Show quoted text
> On Fri Jan 31 18:29:45 2014, PLICEASE wrote:
> > I am able to reproduce the errors with what is on CPAN. I think -lc++ > > got changed to -ls++ somewhere along the way. The attached patch > > should fix it.
> > Thanks. Applied again (correctly this time).
Reopened - in 0.58 in the test suite g++ is used instead of clang++ or c++. Fail reports should be visible in a few hours at http://matrix.cpantesters.org/?dist=Inline-CPP
On Mon Aug 11 22:48:29 2014, SREZIC wrote: Show quoted text
> On 2014-02-01 01:26:42, DAVIDO wrote:
> > On Fri Jan 31 18:29:45 2014, PLICEASE wrote:
> > > I am able to reproduce the errors with what is on CPAN. I think > > > -lc++ > > > got changed to -ls++ somewhere along the way. The attached patch > > > should fix it.
> > > > Thanks. Applied again (correctly this time).
> > Reopened - in 0.58 in the test suite g++ is used instead of clang++ or > c++. Fail reports should be visible in a few hours at > http://matrix.cpantesters.org/?dist=Inline-CPP
Thanks for the head's up. Compiler detection logic has been moved out of Inline::CPP; we now rely on ExtUtils::CppGuess. I'm a comaint for EU::CG, so I'm opening an issue there, and will work on it within a day or so. https://github.com/tsee/extutils-cppguess/issues/1 It should be simple enough to adapt the Inline::CPP-specific patch to EU::CG, but if you want to get a head start on it, pull-requests are welcome for https://github.com/tsee/extutils-cppguess
Should be fixed in Inline::CPP v0.59.