blurhash icon indicating copy to clipboard operation
blurhash copied to clipboard

Install fails on windows: Init_encode: symbol not defined [Ruby 3.0.4p208; bundle 2.2.33; MAKE 4.3; GCC(mingw) 8.1.0; GNU ld 2.30;]

Open kartonrad opened this issue 2 years ago • 0 comments

gem install blurhash fails to complete the native compilation step. While linking (makefile line 262), blurhash can't find symbol Init_encode (because it doesn't exist eanywhere in the repository)

I must confess that i know very little about make/rake, so i have no idea wheather this is an issue with generating "encode-x64-mingw32.def", or if the linker somehow misunderstands what it's supposed to be doing.

Files: (no encode.so, wich is specified in Makefile as variable DLLIB) image

Generated contents of encode-x64-mingw32.de

EXPORTS
Init_encode

Contents of makefile Makefile.txt

Logs:

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/blurhash-0.1.6/ext/blurhash
C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20220519-11088-6nj65z.rb extconf.rb
creating Makefile

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/blurhash-0.1.6/ext/blurhash
make DESTDIR\= clean

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/blurhash-0.1.6/ext/blurhash
make DESTDIR\=
generating encode-x64-mingw32.def
compiling encode.c
linking shared-object encode.so
C:/Ruby30-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export Init_encode: symbol not defined
collect2.exe: error:
 ld returned 1 exit status
make: *** [Makefile:262: encode.so] Error 1

make failed, exit code 2

kartonrad avatar May 19 '22 13:05 kartonrad