Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.7.2 fails to build on arm with gcc6 (i.e. C++14) #15

Closed
mtasaka opened this issue Feb 5, 2016 · 17 comments
Closed

0.0.7.2 fails to build on arm with gcc6 (i.e. C++14) #15

mtasaka opened this issue Feb 5, 2016 · 17 comments

Comments

@mtasaka
Copy link

mtasaka commented Feb 5, 2016

0.0.7.2 fails to build on armv7hl with gcc 6 development version on Fedora 24 as https://kojipkgs.fedoraproject.org//work/tasks/6081/12886081/build.log

In file included from unf/normalizer.hh:10:0,
                 from unf.cc:1:
unf/table.hh:13539:25: error: narrowing conversion of '-27' from 'int' to 'char' inside { } [-Wnarrowing]
  -77, -39,-124, -39,-123};
                         ^
unf/table.hh:13539:25: error: narrowing conversion of '-113' from 'int' to 'char' inside { } [-Wnarrowing]
unf/table.hh:13539:25: error: narrowing conversion of '-81' from 'int' to 'char' inside { } [-Wnarrowing]
unf/table.hh:13539:25: error: narrowing conversion of '-27' from 'int' to 'char' inside { } [-Wnarrowing]
(and many others)

Note that gcc6 faults to -std=gnu++14, and "char" on arm is "unsigned" by default. So converting -113 (for example) to char on arm is narrowing conversion and C++11 prohibits this on initializer.

@mrohnstock
Copy link

Same here with Arch Linux ARM (armv7hl, too). gcc got updated to 6.1.1 and this error-messages occurred.

@Darkhogg
Copy link

Seems like there are multiple fixes for this issue, but the bug is still there. Any news?

@zatherz
Copy link

zatherz commented Oct 8, 2016

Bump. Same here on Raspberry Pi running Arch ARM.

@zatherz
Copy link

zatherz commented Oct 8, 2016

Nevermind. Turns out the fix is just not in the official release on rubygems yet, so the version you install through gem install doesn't have the fix. You have to build it from git.

@vielmetti
Copy link

Same problem on ARMv8, I'll try the install from git.

@vielmetti
Copy link

vielmetti commented Apr 4, 2017

What will it take to get this change pushed into the official rubygems?

This comes up in the context of mastodon/mastodon#802 (port of Mastodon to ARM) with a Docker build.

@knu
Copy link
Owner

knu commented Apr 4, 2017

I'll look into this later today.

@mtasaka
Copy link
Author

mtasaka commented Apr 4, 2017

For now Fedora (me) has applied the following patch:
http://pkgs.fedoraproject.org/cgit/rpms/rubygem-unf_ext.git/tree/unf_ext-0.0.7.2-char-signness.patch

@vielmetti
Copy link

Thanks @knu @mtasaka . My target for this is a Packet 2A ARMv8 server running Docker, Alpine 3.5, and Ruby for Mastodon.

@ss89
Copy link

ss89 commented Apr 9, 2017

This also affects building gitlab ce on armhf.

@vielmetti
Copy link

@ss89 - is there an upstream issue for the gitlab build problem?

There was a report from the Mastodon project that this can be worked around by pulling the gem from git as a temporary measure pending a new release. I don't have the precise invocation necessary but it should be a simple and compatible one-liner.

@ss89
Copy link

ss89 commented Apr 10, 2017

@vielmetti i couldn't find any issue about it in their gitlab instance which they use for hosting the gitlab ce repo.

@ss89
Copy link

ss89 commented Apr 11, 2017

@knu I have a strange problem that might or might not be related to this one.
If you see this gist:
https://gist.github.com/ss89/14d1e90663dbac285b84cabaf60efeab
you will see that unf_ext was successfully built, but later when build crack it fails with the same error seen in the issue creators first post.
Should i create a new Issue for this?

@marcust
Copy link

marcust commented Apr 12, 2017

@knu (/cc @vielmetti)
I was trying today to build that on arm64, but I got somehow the same build problems that used to be there before fee5abd was merged because d0947ba reintroduced the old typing, which is as far as I can see also in v0.0.7.3.

Or did I get something wrong?

@nomoon
Copy link
Contributor

nomoon commented Apr 12, 2017

@marcust It looks like the ARM-fixed const signed char STRINGS[] in table.hh reverted to const char STRINGS[] in the Unicode 9.0 update. If I'm reading it correctly, the other types are still the same between both versions.

@nomoon
Copy link
Contributor

nomoon commented Apr 12, 2017

I think #30 should be all that's necessary to fix it. @marcust are you able to test it via git?

opnfv-github pushed a commit to opnfv/functest that referenced this issue Jan 11, 2018
The root cause of the problem was the installation
of unf_ext packet. The Gemfile.lock in
https://github.com/boucherv-orange/clearwater-live-test
asked for version 0.0.6 and this version was not found for arm.
When it tried to build the package, the conversion from int
to char error was thrown (issue reported here
knu/ruby-unf_ext#15).

As now version 0.0.7.4 is selected, then the vnf docker
images are built without any other errors.

Gemfile.lock was updated in the original repo,
this fix enables vnf and restapi containers build for ARM.

JIRA: FUNCTEST-899

Change-Id: Id2c5fe82cb3705f58a8175fcf0a17f443e9b7d9d
Signed-off-by: Delia Popescu <delia.popescu@enea.com>
opnfv-github pushed a commit to opnfv/opnfvdocs that referenced this issue Jan 11, 2018
* Update docs/submodules/functest from branch 'master'
  - Merge "Build vnf and restapi containers for ARM"
  - Build vnf and restapi containers for ARM
    
    The root cause of the problem was the installation
    of unf_ext packet. The Gemfile.lock in
    https://github.com/boucherv-orange/clearwater-live-test
    asked for version 0.0.6 and this version was not found for arm.
    When it tried to build the package, the conversion from int
    to char error was thrown (issue reported here
    knu/ruby-unf_ext#15).
    
    As now version 0.0.7.4 is selected, then the vnf docker
    images are built without any other errors.
    
    Gemfile.lock was updated in the original repo,
    this fix enables vnf and restapi containers build for ARM.
    
    JIRA: FUNCTEST-899
    
    Change-Id: Id2c5fe82cb3705f58a8175fcf0a17f443e9b7d9d
    Signed-off-by: Delia Popescu <delia.popescu@enea.com>
collivier pushed a commit to collivier/functest that referenced this issue Jan 12, 2018
The root cause of the problem was the installation
of unf_ext packet. The Gemfile.lock in
https://github.com/boucherv-orange/clearwater-live-test
asked for version 0.0.6 and this version was not found for arm.
When it tried to build the package, the conversion from int
to char error was thrown (issue reported here
knu/ruby-unf_ext#15).

As now version 0.0.7.4 is selected, then the vnf docker
images are built without any other errors.

Gemfile.lock was updated in the original repo,
this fix enables vnf and restapi containers build for ARM.

JIRA: FUNCTEST-899

Change-Id: Id2c5fe82cb3705f58a8175fcf0a17f443e9b7d9d
Signed-off-by: Delia Popescu <delia.popescu@enea.com>
(cherry picked from commit 63ec3c3)
opnfv-github pushed a commit to opnfv/opnfvdocs that referenced this issue Jan 12, 2018
* Update docs/submodules/functest from branch 'stable/euphrates'
  - Build vnf and restapi containers for ARM
    
    The root cause of the problem was the installation
    of unf_ext packet. The Gemfile.lock in
    https://github.com/boucherv-orange/clearwater-live-test
    asked for version 0.0.6 and this version was not found for arm.
    When it tried to build the package, the conversion from int
    to char error was thrown (issue reported here
    knu/ruby-unf_ext#15).
    
    As now version 0.0.7.4 is selected, then the vnf docker
    images are built without any other errors.
    
    Gemfile.lock was updated in the original repo,
    this fix enables vnf and restapi containers build for ARM.
    
    JIRA: FUNCTEST-899
    
    Change-Id: Id2c5fe82cb3705f58a8175fcf0a17f443e9b7d9d
    Signed-off-by: Delia Popescu <delia.popescu@enea.com>
    (cherry picked from commit 63ec3c39ef720d265fe5a6c9d3a7c5665c2624d2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants