yglukhov / nimx

GUI library
MIT License
1.1k stars 75 forks source link

nimx samples don't run #273

Closed bkerin closed 7 years ago

bkerin commented 7 years ago

on install there are a lot of complaints about extra files in the packages, with hints where to copy them etc

when I try cd $(nimble path nimx | tail -n 1)/test && nake I get this:

[snip many Hints that I think are normal]

/home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(34, 34) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(191, 21) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(256, 17) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(259, 27) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(278, 44) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(289, 21) Warning: SpriteSheet is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(289, 49) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(295, 56) Warning: SpriteImage is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(157, 10) Hint: 'image.initWithStream(i: SelfContainedImage, s: Stream)[declared in /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/image.nim(157, 9)]' is declared but not used [XDeclaredButNotUsed] Hint: glsl_codegen [Processing] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/context.nim(71, 6) Hint: 'context.newShaderProgram(gl: GL, vs: string, fs: string)[declared in /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/context.nim(71, 5)]' is declared but not used [XDeclaredButNotUsed] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/context.nim(209, 10) Hint: 'setFillColorUniform' is declared but not used [XDeclaredButNotUsed] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/class_registry.nim(14, 6) Hint: 'class_registry.*(s: string, i: int)[declared in /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/class_registry.nim(14, 5)]' is declared but not used [XDeclaredButNotUsed] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/gesture_detector.nim(326, 69) Warning: use 'untyped' parameters instead; immediate is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/gesture_detector.nim(326, 64) Warning: stmt is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/gesture_detector.nim(329, 24) Warning: handleGesEvent is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/gesture_detector.nim(331, 16) Warning: handleGesEvent is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/popup_button.nim(101, 24) Warning: Menu is deprecated [Deprecated] sample03_image.nim(26, 12) Warning: draw is deprecated [Deprecated] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(55, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(121, 13) Hint: 'index' is declared but not used [XDeclaredButNotUsed] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(110, 6) Hint: 'expanding_view.startDrag(v: ExpandingView, e: Event)[declared in /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(110, 5)]' is declared but not used [XDeclaredButNotUsed] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(115, 6) Hint: 'expanding_view.processDrag(v: ExpandingView, e: Event)[declared in /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(115, 5)]' is declared but not used [XDeclaredButNotUsed] /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(119, 6) Hint: 'expanding_view.stopDrag(v: ExpandingView, e: Event)[declared in /home/bkerin/.nimble/pkgs/nimx-0.1/nimx/expanding_view.nim(119, 5)]' is declared but not used [XDeclaredButNotUsed] sample11_expanded_views.nim(40, 17) Hint: 'closeBttn' is declared but not used [XDeclaredButNotUsed] could not import: SDL_CaptureMouse Error: execution of an external program failed: './build/linux/NimxApp '

bkerin commented 7 years ago

Looks like NimxApp is somehow built badly:

$ /home/bkerin/.nimble/pkgs/nimx-0.1/test/build/linux/NimxApp --help could not import: SDL_CaptureMouse

I'm noob to nim generally sorry

Tormund commented 7 years ago

You might didn't install sdl2 libs

apt list --installed | grep sdl

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libsdl2-2.0-0/zesty,now 2.0.5+dfsg1-2ubuntu3 amd64 [installed]
libsdl2-dev/zesty,now 2.0.5+dfsg1-2ubuntu3 amd64 [installed]
bkerin commented 7 years ago

On 10/4/17, Volodymyr Melnychuk notifications@github.com wrote:

You might didn't install sdl2 libs

I had the 2.0.2 version (IIRC) from debian package which apparently doesn't have that fctn.

I build 2.0.4 (IIRC) in my home dir and that one works.

The trouble is that nake doesn't seem to pay attention to LD_RUN_PATH (or probably LIBRARY_PATH or CPATH) either, so I used patchelf --set-rpath to make NimxApp runnable, as I described in some other reports or maybe forum posts.

apt list --installed | grep sdl

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

libsdl2-2.0-0/zesty,now 2.0.5+dfsg1-2ubuntu3 amd64 [installed]
libsdl2-dev/zesty,now 2.0.5+dfsg1-2ubuntu3 amd64 [installed]

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/yglukhov/nimx/issues/273#issuecomment-334296158

yglukhov commented 7 years ago

Closing this since not a nimx issue.

yglukhov commented 7 years ago

To summarize: use SDL 2.0.4 or later.

bkerin commented 7 years ago

On 10/5/17, Yuriy Glukhov notifications@github.com wrote:

To summarize: use SDL 2.0.4 or later.

Would be nice if nimx or nake or nimble or something detected that it was a library version problem rather than failing to find the missing function

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/yglukhov/nimx/issues/273#issuecomment-334675212