-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I'd love to see if I can use redshift for simulating a smart grid with EV chargers. I'm intrigued of the DSL you created compared to other tools that have a hard to understand syntax.
However, I'm running into this issue that's probably because the project is a bit older and ruby is now at version above 2.6.1 (my particular instance is at ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin18]).
git clone https://github.com/vjoel/redshift.git
cd redshift/examples
ruby thermostat.rb
I got this result:
Traceback (most recent call last):
17: from thermostat.rb:29:in `<main>'
16: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/redshift-1.3.29/lib/redshift/world.rb:70:in `new'
15: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/redshift-1.3.29/lib/redshift/target/c/world-gen.rb:150:in `new'
14: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cshadow.rb:363:in `commit'
13: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/redshift-1.3.29/lib/redshift/target/c/library.rb:66:in `commit'
12: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:646:in `use_work_dir'
11: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:646:in `chdir'
10: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:647:in `block in use_work_dir'
9: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/redshift-1.3.29/lib/redshift/target/c/library.rb:69:in `block in commit'
8: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:744:in `commit'
7: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:784:in `show_times'
6: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:744:in `block in commit'
5: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/redshift-1.3.29/lib/redshift/target/c/library.rb:58:in `make'
4: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:982:in `make'
3: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:1025:in `build_wrapper'
2: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:1025:in `chdir'
1: from /Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:1025:in `block in build_wrapper'
/Users/erik/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cgen-0.16.12/lib/cgen/cgen.rb:984:in `block in make': (CGenerator::Library::CommitError)
Make failed for thermostat_clib_261.
Transcript is saved in thermostat_clib_261/make.log and follows:
____________________________________________________________
| creating Makefile
| linking shared-object thermostat_clib_261.bundle
| duplicate symbol '_dummy' in:
| Component.o
| Thermostat.o
| duplicate symbol '_dummy' in:
| Component.o
| flow_Thermostat_temp_Heat.o
| duplicate symbol '_dummy' in:
| Component.o
| flow_Thermostat_temp_Off.o
| duplicate symbol '_dummy' in:
| Component.o
| guard_Thermostat_1.o
| duplicate symbol '_dummy' in:
| Component.o
| guard_Thermostat_0.o
| duplicate symbol '_dummy' in:
| Component.o
| World.o
| duplicate symbol '_dummy' in:
| Component.o
| libmain.o
| ld: 7 duplicate symbols for architecture x86_64
| clang: error: linker command failed with exit code 1 (use -v to see invocation)
| make: *** [thermostat_clib_261.bundle] Error 1
____________________________________________________________
➜ examples git:(master) clang
make.log has the following contents:
creating Makefile
linking shared-object thermostat_clib_261.bundle
duplicate symbol '_dummy' in:
Component.o
Thermostat.o
duplicate symbol '_dummy' in:
Component.o
flow_Thermostat_temp_Heat.o
duplicate symbol '_dummy' in:
Component.o
flow_Thermostat_temp_Off.o
duplicate symbol '_dummy' in:
Component.o
guard_Thermostat_1.o
duplicate symbol '_dummy' in:
Component.o
guard_Thermostat_0.o
duplicate symbol '_dummy' in:
Component.o
World.o
duplicate symbol '_dummy' in:
Component.o
libmain.o
ld: 7 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [thermostat_clib_261.bundle] Error 1
I looked at the thermostat_clib_261 directory that was generated and I didn't know where to look to see if I could fix something.
I'm curious to know if you have any pointers of what to try next to get this working. Let me know if you need additional info. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels