Skip Menu |

This queue is for tickets about the Text-Hunspell CPAN distribution.

Report information
The Basics
Id: 99810
Status: resolved
Priority: 0/
Queue: Text-Hunspell

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

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



Subject: Does not compile on non-gcc systems (e.g. clang)
FreeBSD 10.0 (and possible other operating systems) does not ship gcc/g++ anymore, but instead clang/clang++. So compiling this distribution fails: g++ -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O -DVERSION=\"2.09\" -DXS_VERSION=\"2.09\" -DPIC -fPIC "-I/usr/perl5.18.2/lib/5.18.2/amd64-freebsd/CORE" Hunspell.c g++: not found Probabably it's best to not hardcode "g++" here, but use instead "c++", which is understood by both gcc and clang based systems. Or check perl's config for the correct c/c++ compiler.
Il Dom 26 Ott 2014 05:41:42, SREZIC ha scritto: Show quoted text
> FreeBSD 10.0 (and possible other operating systems) does not ship > gcc/g++ anymore, but instead clang/clang++. So compiling this > distribution fails: > > g++ -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing > -pipe -fstack-protector -I/usr/local/include -O -DVERSION=\"2.09\" > -DXS_VERSION=\"2.09\" -DPIC -fPIC "-I/usr/perl5.18.2/lib/5.18.2/amd64- > freebsd/CORE" Hunspell.c > g++: not found > > Probabably it's best to not hardcode "g++" here, but use instead > "c++", which is understood by both gcc and clang based systems. Or > check perl's config for the correct c/c++ compiler.
Thanks for the report. What do you think of: use Config; my $CC = $ENV{'CXX'} || $Config{cpp} || 'c++'; Actually I'm not sure why of $ENV{'CXX'}, that predates my maintainership.
Il Mar 12 Maggio 2015 05:00:47, COSIMO ha scritto: Show quoted text
> Il Dom 26 Ott 2014 05:41:42, SREZIC ha scritto:
> > FreeBSD 10.0 (and possible other operating systems) does not ship > > gcc/g++ anymore, but instead clang/clang++. So compiling this > > distribution fails: > > > > g++ -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing > > -pipe -fstack-protector -I/usr/local/include -O -DVERSION=\"2.09\" > > -DXS_VERSION=\"2.09\" -DPIC -fPIC "-I/usr/perl5.18.2/lib/5.18.2/amd64- > > freebsd/CORE" Hunspell.c > > g++: not found > > > > Probabably it's best to not hardcode "g++" here, but use instead > > "c++", which is understood by both gcc and clang based systems. Or > > check perl's config for the correct c/c++ compiler.
> > Thanks for the report. > > What do you think of: > > use Config; > my $CC = $ENV{'CXX'} || $Config{cpp} || 'c++'; > > Actually I'm not sure why of $ENV{'CXX'}, that predates my maintainership. >
Take it back... $Config{cpp} doesn't do what I want (preprocessor vs compiler). So I'll just push 2.11 out to CPAN with 'c++' instead of 'g++' like you suggested. Another idea, suggested here: https://github.com/cosimo/perl5-text-hunspell/pull/7 is to use ExtUtils::CppGuess.
On 2015-05-12 08:22:12, COSIMO wrote: Show quoted text
> Il Mar 12 Maggio 2015 05:00:47, COSIMO ha scritto:
> > Il Dom 26 Ott 2014 05:41:42, SREZIC ha scritto:
> > > FreeBSD 10.0 (and possible other operating systems) does not ship > > > gcc/g++ anymore, but instead clang/clang++. So compiling this > > > distribution fails: > > > > > > g++ -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict- > > > aliasing > > > -pipe -fstack-protector -I/usr/local/include -O > > > -DVERSION=\"2.09\" > > > -DXS_VERSION=\"2.09\" -DPIC -fPIC "- > > > I/usr/perl5.18.2/lib/5.18.2/amd64- > > > freebsd/CORE" Hunspell.c > > > g++: not found > > > > > > Probabably it's best to not hardcode "g++" here, but use instead > > > "c++", which is understood by both gcc and clang based systems. Or > > > check perl's config for the correct c/c++ compiler.
> > > > Thanks for the report. > > > > What do you think of: > > > > use Config; > > my $CC = $ENV{'CXX'} || $Config{cpp} || 'c++'; > > > > Actually I'm not sure why of $ENV{'CXX'}, that predates my > > maintainership. > >
> > Take it back... $Config{cpp} doesn't do what I want (preprocessor vs > compiler). > So I'll just push 2.11 out to CPAN with 'c++' instead of 'g++' like > you suggested.
This works great --- the module now compiles on all my FreeBSD and Linux systems. Show quoted text
> > Another idea, suggested here: > > https://github.com/cosimo/perl5-text-hunspell/pull/7 > > is to use ExtUtils::CppGuess.
We're good then :-)