Error compiling crsfml (read before assignment to local variable)
reiswindy opened this issue · comments
When trying to compile crsfml (Approach 1) I keep getting the following error:
-- Found SFML 2.5.0 in /usr/lib64/cmake/SFML
-- Found SFML 2.5.0 in /usr/lib64/cmake/SFML
-- Configuring done
-- Generating done
-- Build files have been written to: /home/reiswindy/Documents/proyectos/crystal/crsfml
[ 8%] Generating voidcsfml/include/voidcsfml/system.h, voidcsfml/src/voidcsfml/system.cpp, voidcsfml/include/voidcsfml/window.h, voidcsfml/src/voidcsfml/window.cpp, voidcsfml/include/voidcsfml/graphics.h, voidcsfml/src/voidcsfml/graphics.cpp, voidcsfml/include/voidcsfml/audio.h, voidcsfml/src/voidcsfml/audio.cpp, voidcsfml/include/voidcsfml/network.h, voidcsfml/src/voidcsfml/network.cpp, src/system/lib.cr, src/system/obj.cr, src/window/lib.cr, src/window/obj.cr, src/graphics/lib.cr, src/graphics/obj.cr, src/audio/lib.cr, src/audio/obj.cr, src/network/lib.cr, src/network/obj.cr
Error in generate.cr:1895: instantiating 'CModule.class#new(String)'
modules = %w[System Window Graphics Audio Network].map { |m| CModule.new(m) }
^~~
in generate.cr:1579: instantiating 'process_file(String)'
process_file "#{name}.hpp"
^~~~~~~~~~~~
in generate.cr:1668: instantiating 'File.class#each_line(String)'
File.each_line("#{SFML_PATH}/#{file_name}") do |line|
^~~~~~~~~
in /usr/lib/crystal/file.cr:659: instantiating 'open(String, String)'
open(filename, "r", encoding: encoding, invalid: invalid) do |file|
^~~~
in /usr/lib/crystal/file.cr:659: instantiating 'open(String, String)'
open(filename, "r", encoding: encoding, invalid: invalid) do |file|
^~~~
in /usr/lib/crystal/file.cr:660: instantiating 'File#each_line()'
file.each_line(chomp: chomp) do |line|
^~~~~~~~~
in /usr/lib/crystal/file.cr:660: instantiating 'File#each_line()'
file.each_line(chomp: chomp) do |line|
^~~~~~~~~
in generate.cr:1668: instantiating 'File.class#each_line(String)'
File.each_line("#{SFML_PATH}/#{file_name}") do |line|
^~~~~~~~~
in generate.cr:1784: read before assignment to local variable '__temp_496'
func = CFunction.new(**common_info,
^~~
make[2]: *** [CMakeFiles/c-sources.dir/build.make:75: voidcsfml/include/voidcsfml/system.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/c-sources.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Tried to compile on Manjaro Linux
Crystal 0.26
SFML version 2.5
Not really sure what other details I should provide 😨
Yep, seems like Crystal 0.26 is broken. I have no clue what it wants from me.
You can try using pre-generated sources from the other branch, though.