Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Fix newer GCC compile errors #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

atyndall
Copy link

@atyndall atyndall commented Sep 7, 2018

In newer versions of GCC, compiling this gem fails with errors like;

Building native extensions. This could take a while...
ERROR:  Error installing cld2-1.0.3.gem:
  ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/cld2-1.0.3/ext/cld
/usr/bin/ruby2.5 -r ./siteconf20180907-25240-hhk5um.rb extconf.rb
checking for -lstdc++... yes
creating Makefile

current directory: /var/lib/gems/2.5.0/gems/cld2-1.0.3/ext/cld
make "DESTDIR=" clean

current directory: /var/lib/gems/2.5.0/gems/cld2-1.0.3/ext/cld
make "DESTDIR="
compiling internal/cld2_generated_cjk_compatible.cc
compiling internal/cld2_generated_deltaoctachrome0122.cc
compiling internal/cld2_generated_distinctoctachrome0122.cc
compiling internal/cld2_generated_quadchrome0122_2.cc
compiling internal/cld_generated_cjk_delta_bi_4.cc
compiling internal/cld_generated_cjk_uni_prop_80.cc
internal/cld_generated_cjk_uni_prop_80.cc:7089:1: error: narrowing conversion of ‘-14’ from ‘int’ to ‘CLD2::uint8 {aka unsigned char}’ inside { } [-Wnarrowing]
 };
 ^
internal/cld_generated_cjk_uni_prop_80.cc:7089:1: error: narrowing conversion of ‘-14’ from ‘int’ to ‘CLD2::uint8 {aka unsigned char}’ inside { } [-Wnarrowing]
internal/cld_generated_cjk_uni_prop_80.cc:7089:1: error: narrowing conversion of ‘-14’ from ‘int’ to ‘CLD2::uint8 {aka unsigned char}’ inside { } [-Wnarrowing]
[omitted]
Makefile:210: recipe for target 'internal/cld_generated_cjk_uni_prop_80.o' failed
make: *** [internal/cld_generated_cjk_uni_prop_80.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.5.0/gems/cld2-1.0.3 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/cld2-1.0.3/gem_make.out

As per the recommendation in CLD2Owners/cld2#47 (comment) I have added the necessary flag to prevent these errors. The gem now compiles for me on Ubuntu 18.04 with gcc 7.3.0.

@craig-day
Copy link

@alessandrobanjo (does that user even exist anymore?)

@craig-day
Copy link

@codenothing @girak @Wolfcrush can someone merge this and release a new gem version?

@mariozaizar
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants