Compilation error in crystal 0.35.1

I get this compilation error after upgrading to Crystal 0.35.1. The code compiles on v0.35.0

S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o: In function `to_s':
/usr/share/crystal/src/string.cr:4789: undefined reference to `*String::Builder@IO#write_utf8<Slice(UInt8)>:Int64'
S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o:/usr/share/crystal/src/string.cr:5039: more undefined references to `*String::Builder#write<Slice(UInt8)>:Int64' follow
S-tring.o: In function `to_s':
/usr/share/crystal/src/string.cr:4789: undefined reference to `*IO::FileDescriptor@IO#write_utf8<Slice(UInt8)>:Int64'
S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o: In function `to_s':
/usr/share/crystal/src/string.cr:4789: undefined reference to `*IO+@IO#write_utf8<Slice(UInt8)>:Int64'
S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o:/usr/share/crystal/src/string.cr:5039: more undefined references to `*String::Builder#write<Slice(UInt8)>:Int64' follow
S-tring.o: In function `to_s':
/usr/share/crystal/src/string.cr:4789: undefined reference to `*MySql::WritePacket@IO#write_utf8<Slice(UInt8)>:Int64'
S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o:/usr/share/crystal/src/string.cr:5039: more undefined references to `*String::Builder#write<Slice(UInt8)>:Int64' follow
S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder@IO#<<<(DB::ExecResult.class | DB::ResultSet+.class | Nil.class)>:String::Builder'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o:/usr/share/crystal/src/string.cr:5039: more undefined references to `*String::Builder#write<Slice(UInt8)>:Int64' follow
S-tring.o: In function `to_s':
/usr/share/crystal/src/string.cr:4789: undefined reference to `*HTTP::Server::Response@IO#write_utf8<Slice(UInt8)>:Int64'
S-tring.o: In function `interpolation':
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
/usr/share/crystal/src/string.cr:5039: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o: In function `gsub':
/usr/share/crystal/src/string.cr:2393: undefined reference to `*String::Builder#write<Slice(UInt8)>:Int64'
S-tring.o:/usr/share/crystal/src/string.cr:2408: more undefined references to `*String::Builder#write<Slice(UInt8)>:Int64' follow
M-agicI-D-_db.o: In function `all':
/home/code/lib/crecto/src/crecto/repo.cr:69: undefined reference to `*String::interpolation<String, (DB::ExecResult.class | DB::ResultSet+.class), String>:String'
/home/code/lib/crecto/src/crecto/repo.cr:69: undefined reference to `*String::interpolation<String, (DB::ExecResult.class | DB::ResultSet+.class), String>:String'
/usr/bin/ld: /home/code/bin/ No symbol version section for versioned symbol `*MySql::WritePacket@IO#write_utf8<Slice(UInt8)>:Int64'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1:

Try clearing the cache: rm -rf ~/.cache/crystal.

3 Likes

That works! Thanks a lot :)