dom96/Aporia

Cannot compile on FreeBSD

Peter2121 opened this issue · 9 comments

I cloned the Github repo but I cannot compile Aporia - glib2 is not found:

[peter@pcbsd-peter ~/nim/Aporia]$ nim c aporia
config/nim.cfg(53, 3) Hint: added path: '/usr/home/peter/.babel/pkgs/' [Path]
config/nim.cfg(54, 3) Hint: added path: '/usr/home/peter/.nimble/pkgs/' [Path]
Hint: used config file '/usr/home/peter/nim/Nim/config/nim.cfg' [Conf]
Warning: aporia.nimrod.cfg is deprecated [Deprecated]
Hint: used config file 'aporia.nimrod.cfg' [Conf]
Hint: system [Processing]
Hint: aporia [Processing]
usr/home/peter/nim/Aporia/aporia.nim(11, 8) Error: cannot open 'glib2'

I can compile the examples from Nim repo without problem, gtk2 is installed in the system. What did I miss?

dom96 commented

did you install the GTK wrappers? nimble install gtk2@#head.

Sorry, I did not see any instruction about it.

Trying to install gtk2:

[peter@pcbsd-peter ~]$ nimble install gtk2@#head
Downloading git://github.com/nim-lang/gtk2 into /tmp/nimble_78553/githubcom_nimlanggtk2_head using git...
Initialized empty Git repository in /tmp/nimble_78553/githubcom_nimlanggtk2_head/.git/
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 29 (delta 3), reused 6 (delta 0), pack-reused 0
Unpacking objects: 100% (29/29), done.
From git://github.com/nim-lang/gtk2

  • branch master -> FETCH_HEAD
  • [new branch] master -> origin/master
    HEAD is now at 06a8e1d Merge pull request #17 from glurp/master
    Switched to a new branch 'origin/master'
    Looking for cairo (any version)...
    None found, installing...
    Downloading git://github.com/nim-lang/cairo into /tmp/nimble_78553/githubcom_nimlangcairo using git...
    Traceback (most recent call last)
    nimble.nim(952) nimble
    nimble.nim(924) doAction
    nimble.nim(666) install
    nimble.nim(521) installFromDir
    nimble.nim(431) processDeps
    nimble.nim(664) install
    nimble.nim(625) downloadPkg
    download.nim(197) doDownload
    download.nim(102) getTagsListRemote
    Error: unhandled exception: Unable to query remote tags for git://github.com/nim-lang/cairo. Git returned: [OSError]

Idem for installing cairo directly:

[peter@pcbsd-peter ~]$ nimble install cairo
Downloading git://github.com/nim-lang/cairo into /tmp/nimble_79185/githubcom_nimlangcairo using git...
Traceback (most recent call last)
nimble.nim(952) nimble
nimble.nim(924) doAction
nimble.nim(664) install
nimble.nim(625) downloadPkg
download.nim(197) doDownload
download.nim(102) getTagsListRemote
Error: unhandled exception: Unable to query remote tags for git://github.com/nim-lang/cairo. Git returned: [OSError]

Trying with git directly:

[peter@pcbsd-peter ~]$ git ls-remote --tags git://github.com/nim-lang/cairo
[peter@pcbsd-peter ~]$ git ls-remote --tags git://github.com/nim-lang/nimble
04b6655e1c577095a3ccd580f71d0246263cee4f refs/tags/v0.2
64164e93cdf31d853cffa011b3873127353f2f98 refs/tags/v0.2^{}
341559f948adb3018f701df6195a54c1020a631d refs/tags/v0.4
05ac7d5bcd2edb95dda8cdd9d4213433976d72af refs/tags/v0.4^{}
f881d8795541de824a8edfceb5ee945c378d9456 refs/tags/v0.6
875786d34fc4e342eb2fdc849d6d84718c615e84 refs/tags/v0.6^{}

dom96 commented

Looks like a Nim bug with osproc on BSD.

Yes, commenting lines 101, 102, 103 in download.nim from nimble I can get it working:

if exitCode != QuitSuccess:

raise newException(OSError, "Unable to query remote tags for " & url &

". Git returned: " & output)

Aporia is compiled successfully now, I can run it without problems. Thank you!

Probably something needs to be adjusted in osproc to catch exit code on FreeBSD...

I've just installed nim 0.12 and nimble 0.6.4 - the error is still here, I cannot install any package using nimble.
Please, fix!

dom96 commented

Report it in the Nim repo please.

dom96 commented

Closing as it is Nim-stdlib-specific.