Giter VIP home page Giter VIP logo

sdl6's Introduction

This module provides access to the Simple DirectMedia Layer (www.libsdl.org) to Perl6.

It makes use of NativeCall, so a C compiler is not needed in order to install this module.

Dependencies

  • libSDL, libSDL-mixer, libSDL-image

To aid NativeCall locating the libaries you should just do:

sudo apt install libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev

sdl6's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdl6's Issues

Can't use Inline::C together with NativeCall

Test files:

https://gist.github.com/4321746

Merging global symbols does not work for multi trait_mods.

So if you try to import two trait_mods with different signatures, the program dies rather than add the signatures to the dispatcher list.

First step is to comment out the line 269 in rakudo/src/Perl6/World.pm:

# XXX TODO: Merge handling.
nqp::push(@clash, $_.key);

After that your test script wont die anymore, but you get the trait_mods from perl core and the module you importet last. But you obviously should get the trait_mods from core and both modules.

Broken on Christmas Perl

There seems to be an array of issues and I didn't manage to get to the bottom of it:

First, it seems the lib prefix in library names should be omited now, as I'm getting this error:

==> Fetching SDL
==> Building SDL
==> Testing SDL
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(libSDL, v1)
Cannot locate native library 'liblibSDL.so': liblibSDL.so: cannot open shared object file: No such file or directory
  in method setup at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/A108F52F4C782AC76DD2B7028673DF3494A8EA0B line 230
  in method CALL-ME at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/A108F52F4C782AC76DD2B7028673DF3494A8EA0B line 241
  in block <unit> at t/core.t line 9

I cloned the repo and ran find lib -type f | xargs sed -i 's/libSDL/SDL/g' and tried the install again, but... along with a wall of warnings about specifying the API version in NativeCall, I get a failing test.

$ panda --force install .
==> Installing SDL from a local directory '.'
==> Fetching SDL
==> Building SDL
==> Testing SDL
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)

# Failed test 'SDL::init_subsystem'
# at t/core.t line 11
# expected: '0'
#      got: '-5395615750079643648'
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
# Looks like you failed 1 test of 11
t/core.t ............ 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/11 subtests 
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(SDL_mixer, v1)
t/mixer-channels.t .. ok
t/rect.t ............ ok

Test Summary Report
-------------------
t/core.t          (Wstat: 256 Tests: 11 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=3, Tests=43, 23 wallclock secs ( 0.02 usr  0.01 sys + 22.00 cusr  0.53 csys = 22.56 CPU)
Result: FAIL
The spawned process exited unsuccessfully (exit code: 1)

So I ran panda --force --notests install to skip the tests, but the install failed with issues due to wrong provides paths in the META file (#8 fixes that).

So I fixed the provides section and ran the install again, but now I'm getting this weird error and I've no idea how to proceed next:

==> Installing SDL from a local directory '.'
==> Fetching SDL
==> Building SDL
==> Installing SDL
===SORRY!=== Error while compiling /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/C363FB1342BDE6F2F80C8FA8D47DFB1A7A937E31
An exception occurred while parameterizing CArray
at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/C363FB1342BDE6F2F80C8FA8D47DFB1A7A937E31:31
Exception details:
  Could not find symbol '&Color'
    in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/C363FB1342BDE6F2F80C8FA8D47DFB1A7A937E31 line 31
    in any  at src/Perl6/World.nqp line 1996
    in any compile_time_evaluate at src/Perl6/World.nqp line 1889
    in any parameterize_type at src/Perl6/World.nqp line 2689

AB61213009B9DA6BD99091A4F89F5371CD90B039 /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/AB61213009B9DA6BD99091A4F89F5371CD90B039 AB61213009B9DA6BD99091A4F89F5371CD90B039 /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/AB61213009B9DA6BD99091A4F89F5371CD90B039 AB3C444B2CE6E1BAA76FEEE3752E4B0264C2453B /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/AB3C444B2CE6E1BAA76FEEE3752E4B0264C2453B AB61213009B9DA6BD99091A4F89F5371CD90B039 /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/AB61213009B9DA6BD99091A4F89F5371CD90B039 EA45D345179E4ED9F32810750C6C98CEB9EE62EB /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/EA45D345179E4ED9F32810750C6C98CEB9EE62EB A108F52F4C782AC76DD2B7028673DF3494A8EA0B /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/A108F52F4C782AC76DD2B7028673DF3494A8EA0B Return status 256

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.