lovebrew / bundler-old

LÖVE Potion Game Distribution Helper
10 stars 4 forks source link

[Bug]: Failure to build lovebrew tool on macOS. #16

Closed tomlister closed 2 years ago

tomlister commented 2 years ago

Software Version

0.5.3 (Latest)

What Happened?

tom.lister@tomlister lovebrew-main % nimble build              
  Verifying dependencies for lovebrew@0.5.3
      Info: Dependency on zippy@any version already satisfied
  Verifying dependencies for zippy@0.7.3
      Info: Dependency on parsetoml@any version already satisfied
  Verifying dependencies for parsetoml@0.6.0
      Info: Dependency on cligen@any version already satisfied
  Verifying dependencies for cligen@1.5.19
      Info: Dependency on https://github.com/yglukhov/iface@any version already satisfied
  Verifying dependencies for iface@0.1.0
   Building lovebrew/lovebrew using c backend
/Users/tom.lister/Downloads/lovebrew-main/src/types/console.nim(18, 8) Error: undeclared identifier: 'Console'
candidates (edit distance, scope distance); see '--spellSuggest': 
 (1, 2): 'console' [module declared in /Users/tom.lister/Downloads/lovebrew-main/src/types/console.nim(1, 2)]
       Tip: 9 messages have been suppressed, use --verbose to show them.
     Error: Build failed for package: lovebrew
        ... Execution failed with exit code 256
        ... Command: /Users/tom.lister/.nimble/bin/nim c --colors:on --noNimblePath -d:NimblePkgVersion=0.5.3 --path:/Users/tom.lister/.nimble/pkgs/zippy-0.7.3 --path:/Users/tom.lister/.nimble/pkgs/parsetoml-0.6.0 --path:/Users/tom.lister/.nimble/pkgs/cligen-1.5.19 --path:/Users/tom.lister/.nimble/pkgs/iface-0.1.0 --hints:off -o:/Users/tom.lister/Downloads/lovebrew-main/dist/lovebrew /Users/tom.lister/Downloads/lovebrew-main/src/lovebrew.nim

What was Expected?

For it to build.

Operating System

macOS

Operating System Version

macOS Big Sur

Code of Conduct

TurtleP commented 2 years ago

I think I know why this happens. Try removing -passL:"static" from nim.cfg and try building it again from the root directory. Not sure if you were in the right directory when building before. If this doesn't fix it I'll reach out to the nim community and see what's going on.

tomlister commented 2 years ago

I think I know why this happens. Try removing -passL:"static" from nim.cfg and try building it again from the root directory. Not sure if you were in the right directory when building before. If this doesn't fix it I'll reach out to the nim community and see what's going on.

Hi, thanks for the suggestion. It still doesn't work. Here are some errors from the language server. Screen Shot 2021-11-30 at 12 13 14 pm

Screen Shot 2021-11-30 at 12 15 04 pm

Screen Shot 2021-11-30 at 12 16 02 pm

Screen Shot 2021-11-30 at 12 17 02 pm

TurtleP commented 2 years ago

Odd.. I haven't updated nim in some time, so I'm not sure what the latest version is. Perhaps @ajusa knows something about this?

ajusa commented 2 years ago

Well it looks like it isn't picking up iface for some reason... I'll try and take a look sometime soon (tonight or tomorrow). There might have been a change from Nim 1.4 to 1.6 causing this somehow? If it's mac only I won't be much help.

tomlister commented 2 years ago

For context nimble: nimble v0.13.1 compiled at 2021-11-29 03:26:59 nim: Nim Compiler Version 1.6.0 [MacOSX: amd64]

ajusa commented 2 years ago

I can reproduce Linux, so that's something. Must be an issue with iface on 1.6, I'll open an issue in iface if the Nim Discord can't debug it.

For now, if you can choosenim 1.4.8 and then run nimble install that should let you at least build it using the older version of Nim.

EDIT: Here's the iface issue: https://github.com/yglukhov/iface/issues/13 It's not a super active project for yglukhov so we may also want to consider moving back to dynamic dispatch/method. If that's the case, I'll make a PR @TurtleP, since I was the one to move to iface in the first place :sweat_smile:

tomlister commented 2 years ago

I see. iface is like interface in golang I switched to 1.4.8, seems to work

ajusa commented 2 years ago

Alright, with the latest iface (nimble uninstall iface then do a nimble install this issue has been fixed for Nim 1.6. I verified that I could compile everything on my machine as well. @TurtleP you can close this now.