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

Alpine: conflicting declaration of 'void* ruby_nonempty_memcpy despite having icu-dev installed #166

Open
Startouf opened this issue Mar 2, 2023 · 2 comments

Comments

@Startouf
Copy link

Startouf commented Mar 2, 2023

I am installing this gemfile dependency on ruby:3.0.3-alpine and despite having installed the ICU dependency, I'm running into a "conflicting declaration" error while building native extensions

I have installed the following apk libs which should have settled the problem I believe

FROM ruby:3.0.3-alpine

RUN apk add --update --no-cache \
  [...]
  icu-dev \
  ruby-full

Backtrace:

#16 1761.3 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
#16 1761.3
#16 1761.3 current directory:
#16 1761.3 /usr/local/bundle/gems/charlock_holmes-0.7.7/ext/charlock_holmes
#16 1761.3 /usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r
#16 1761.3 ./siteconf20230302-1-wqiwia.rb extconf.rb
#16 1761.3 checking for -licui18n... yes
#16 1761.3 checking for unicode/ucnv.h... yes
#16 1761.3 checking for -lz... yes
#16 1761.3 checking for -licuuc... yes
#16 1761.3 checking for -licudata... yes
#16 1761.3 creating Makefile
#16 1761.3
#16 1761.3 current directory:
#16 1761.3 /usr/local/bundle/gems/charlock_holmes-0.7.7/ext/charlock_holmes
#16 1761.3 make DESTDIR\= clean
#16 1761.3
#16 1761.3 current directory:
#16 1761.3 /usr/local/bundle/gems/charlock_holmes-0.7.7/ext/charlock_holmes
#16 1761.3 make DESTDIR\=
#16 1761.3 compiling converter.c
#16 1761.3 compiling encoding_detector.c
#16 1761.3 compiling ext.c
#16 1761.3 compiling transliterator.cpp
#16 1761.3 In file included from /usr/local/include/ruby-3.0.0/ruby/ruby.h:39,
#16 1761.3                  from /usr/local/include/ruby-3.0.0/ruby.h:38,
#16 1761.3                  from common.h:9,
#16 1761.3                  from transliterator.cpp:1:
#16 1761.3 /usr/local/include/ruby-3.0.0/ruby/internal/memory.h:276:16: error: conflicting
#16 1761.3 declaration of 'void* ruby_nonempty_memcpy(void*, const void*, size_t)' with 'C'
#16 1761.3 linkage
#16 1761.3   276 | #define memcpy ruby_nonempty_memcpy
#16 1761.3       |                ^~~~~~~~~~~~~~~~~~~~
#16 1761.3 /usr/local/include/ruby-3.0.0/ruby/internal/memory.h:266:1: note: previous
#16 1761.3 declaration with 'C++' linkage

Am I maybe missing some other OS dependency ?

@Startouf
Copy link
Author

Startouf commented Mar 2, 2023

It seems to be a bug related to Ruby 3.0.x see https://bugs.ruby-lang.org/issues/17788 and ruby/ruby#4429

Ruby version 3.0.5 does not seem to be affecter and installation was successful on that version

@MuhittinTekin
Copy link

#168

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

2 participants