SiegeLord / DAllegro5

D binding to the Allegro5 game development library
Other
42 stars 15 forks source link

Turn in to DUB package #13

Closed BitPuffin closed 10 years ago

BitPuffin commented 11 years ago

Oi!

I decided to take action and turn this into a DUB package. However, the work is not done! You still need to go to http://registry.vibed.org and add it yourself. I could do it for you, but I don't want to be seen as the owner of something I do not own.

Cheers!

SiegeLord commented 11 years ago

I tried running dub build on this and I got this output:

$ dub build -v
[7F61F2442061:00000000 dbg] Using dub registry url 'http://registry.vibed.org/'
[7F61F2442061:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F61F2442061:00000000 dbg] Looking for local package map at /home/siege/.dub/packages/
[7F61F2442061:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F61F2442061:00000000 dbg] Looking for local package map at /home/siege/.dub/packages/
[7F61F2442061:00000000 dbg] Looking for local package map at /var/lib/dub/packages/
[7F61F2442061:00000000 dbg] Looking for local package map at /home/siege/.dub/packages/
[7F61F2442061:00000000 dbg] Collecting dependencies for DAllegro5
[7F61F2442061:00000000 INF] Checking dependencies in '/home/siege/Projects/DAllegro5'
[7F61F2442061:00000000 dbg] dub initialized
[7F61F2442061:00000000 dbg] Generating using build
[7F61F2442061:00000000 dbg] Using config library for DAllegro5
[7F61F2442061:00000000 INF] Building configuration "library", build type debug
[7F61F2442061:00000000 dbg] Application output name is '/home/siege/Projects/DAllegro5/libDAllegro5.a'
[7F61F2442061:00000000 dbg] Trying to use pkg-config to resolve library flags for [].
[7F61F2442061:00000000 dbg] pkg-config failed: pkg-config exited with error code 1
[7F61F2442061:00000000 dbg] Falling back to direct -lxyz flags.
[7F61F2442061:00000000 dbg] Trying to use pkg-config to resolve library flags for [].
[7F61F2442061:00000000 dbg] pkg-config failed: pkg-config exited with error code 1
[7F61F2442061:00000000 dbg] Falling back to direct -lxyz flags.
[7F61F2442061:00000000 INF] Running dmd (compile)...
[7F61F2442061:00000000 dbg] dmd -w -g -debug -c -oftemp.o allegro5/display.d allegro5/bitmap.d allegro5/timer.d allegro5/fshook.d allegro5/base.d allegro5/al_debug.d allegro5/allegro_image.d allegro5/bitmap_draw.d allegro5/tls.d allegro5/monitor.d allegro5/allegro_acodec.d allegro5/allegro_native_dialog.d allegro5/allegro_color.d allegro5/bitmap_lock.d allegro5/allegro_color_ret.d allegro5/memory.d allegro5/drawing.d allegro5/keycodes.d allegro5/config.d allegro5/allegro.d allegro5/d_util.d allegro5/path.d allegro5/mouse_cursor.d allegro5/blender.d allegro5/transformations.d allegro5/allegro_memfile.d allegro5/events.d allegro5/allegro_physfs.d allegro5/allegro_ttf.d allegro5/allegro_font.d allegro5/altime.d allegro5/allegro_audio.d allegro5/system.d allegro5/mouse.d allegro5/internal/events.d allegro5/internal/da5.d allegro5/keyboard.d allegro5/allegro_primitives.d allegro5/error.d allegro5/color.d allegro5/file.d allegro5/threads.d allegro5/fullscreen_mode.d allegro5/fixed.d allegro5/bitmap_io.d allegro5/joystick.d allegro5/color_ret.d allegro5/utf8.d
[7F61F2442061:00000000 INF] Linking...
[7F61F2442061:00000000 dbg] dmd -of/home/siege/Projects/DAllegro5/libDAllegro5.a temp.o
temp.o: In function `_D8allegro56bitmap12al_get_pixelFPS8allegro56bitmap14ALLEGRO_BITMAPiiZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/bitmap.d:84: undefined reference to `al_get_pixel'
temp.o: In function `_D8allegro513allegro_color12al_color_yuvFfffZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/allegro_color.d:43: undefined reference to `al_color_yuv'
temp.o: In function `_D8allegro513allegro_color13al_color_cmykFffffZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/allegro_color.d:44: undefined reference to `al_color_cmyk'
temp.o: In function `_D8allegro513allegro_color12al_color_hslFfffZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/allegro_color.d:45: undefined reference to `al_color_hsl'
temp.o: In function `_D8allegro513allegro_color12al_color_hsvFfffZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/allegro_color.d:46: undefined reference to `al_color_hsv'
temp.o: In function `_D8allegro513allegro_color13al_color_nameFxPaZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/allegro_color.d:47: undefined reference to `al_color_name'
temp.o: In function `_D8allegro513allegro_color13al_color_htmlFxPaZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/allegro_color.d:48: undefined reference to `al_color_html'
temp.o: In function `al_malloc':
/home/siege/Projects/DAllegro5/allegro5/memory.d:22: undefined reference to `al_malloc_with_context'
temp.o: In function `al_free':
/home/siege/Projects/DAllegro5/allegro5/memory.d:26: undefined reference to `al_free_with_context'
temp.o: In function `al_realloc':
/home/siege/Projects/DAllegro5/allegro5/memory.d:30: undefined reference to `al_realloc_with_context'
temp.o: In function `al_calloc':
/home/siege/Projects/DAllegro5/allegro5/memory.d:34: undefined reference to `al_calloc_with_context'
temp.o: In function `_D8allegro56d_util12dstr_to_ustrFPS8allegro54utf814_al_tagbstringAxaZPxS8allegro54utf814_al_tagbstring':
/home/siege/Projects/DAllegro5/allegro5/d_util.d:8: undefined reference to `al_ref_buffer'
temp.o: In function `_D8allegro56d_util12ustr_to_dstrFPxS8allegro54utf814_al_tagbstringZAxa':
/home/siege/Projects/DAllegro5/allegro5/d_util.d:13: undefined reference to `al_ustr_size'
/home/siege/Projects/DAllegro5/allegro5/d_util.d:13: undefined reference to `al_cstr'
temp.o: In function `_D8allegro56system14al_run_allegroFMDFZiZi':
/home/siege/Projects/DAllegro5/allegro5/system.d:53: undefined reference to `al_run_main'
temp.o: In function `al_init':
/home/siege/Projects/DAllegro5/allegro5/system.d:67: undefined reference to `al_install_system'
temp.o: In function `_D8allegro55color10al_map_rgbFhhhZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/color.d:75: undefined reference to `al_map_rgb'
temp.o: In function `_D8allegro55color11al_map_rgbaFhhhhZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/color.d:76: undefined reference to `al_map_rgba'
temp.o: In function `_D8allegro55color12al_map_rgb_fFfffZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/color.d:77: undefined reference to `al_map_rgb_f'
temp.o: In function `_D8allegro55color13al_map_rgba_fFffffZS8allegro55color13ALLEGRO_COLOR':
/home/siege/Projects/DAllegro5/allegro5/color.d:78: undefined reference to `al_map_rgba_f'
temp.o: In function `al_ftofix':
/home/siege/Projects/DAllegro5/allegro5/fixed.d:39: undefined reference to `al_set_errno'
/home/siege/Projects/DAllegro5/allegro5/fixed.d:45: undefined reference to `al_set_errno'
temp.o: In function `al_fixadd':
/home/siege/Projects/DAllegro5/allegro5/fixed.d:65: undefined reference to `al_set_errno'
/home/siege/Projects/DAllegro5/allegro5/fixed.d:74: undefined reference to `al_set_errno'
temp.o: In function `al_fixsub':
/home/siege/Projects/DAllegro5/allegro5/fixed.d:91: undefined reference to `al_set_errno'
temp.o:/home/siege/Projects/DAllegro5/allegro5/fixed.d:101: more undefined references to `al_set_errno' follow
/usr/lib/x86_64-linux-gnu/libphobos2.a(thread_1a1_1b8.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread':
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x26): undefined reference to `_tlsend'
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x31): undefined reference to `_tlsstart'
/usr/lib/x86_64-linux-gnu/libphobos2.a(dmain2_47f_1a5.o): In function `main':
src/rt/dmain2.d:(.text.main+0xa): undefined reference to `_Dmain'
/usr/lib/x86_64-linux-gnu/libphobos2.a(thread_18f_1b8.o): In function `_D4core6thread6Thread6__ctorMFPFZvmZC4core6thread6Thread':
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvmZC4core6thread6Thread+0x2b): undefined reference to `_tlsend'
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvmZC4core6thread6Thread+0x36): undefined reference to `_tlsstart'
/usr/lib/x86_64-linux-gnu/libphobos2.a(thread_190_1b8.o): In function `_D4core6thread6Thread6__ctorMFDFZvmZC4core6thread6Thread':
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvmZC4core6thread6Thread+0x37): undefined reference to `_tlsend'
src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvmZC4core6thread6Thread+0x42): undefined reference to `_tlsstart'
/usr/lib/x86_64-linux-gnu/libphobos2.a(deh2_45f_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable':
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xa): undefined reference to `_deh_beg'
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x14): undefined reference to `_deh_beg'
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x1e): undefined reference to `_deh_end'
src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x44): undefined reference to `_deh_end'
/usr/lib/x86_64-linux-gnu/libphobos2.a(thread_18c_713.o): In function `thread_entryPoint':
src/core/thread.d:(.text.thread_entryPoint+0xa5): undefined reference to `_tlsend'
src/core/thread.d:(.text.thread_entryPoint+0xb0): undefined reference to `_tlsstart'
/usr/lib/x86_64-linux-gnu/libphobos2.a(thread_1b1_6e4.o): In function `thread_attachThis':
src/core/thread.d:(.text.thread_attachThis+0x100): undefined reference to `_tlsstart'
src/core/thread.d:(.text.thread_attachThis+0x10b): undefined reference to `_tlsend'
collect2: error: ld returned 1 exit status
--- errorlevel 1
Error: no main function specified
[7F61F2442061:00000000 ERR] Error: Link command failed with exit code 1

[7F61F2442061:00000000 dbg] Full exception: object.Exception@source/dub/compilers/dmd.d(126): Link command failed with exit code 1
----------------
dub(pure @safe bool std.exception.enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong)+0x6b) [0x58c33f]
dub(void dub.compilers.dmd.DmdCompiler.invokeLinker(const(dub.compilers.compiler.BuildSettings), const(dub.compilers.compiler.BuildPlatform), immutable(char)[][])+0x389) [0x60c8c5]
dub(void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings)+0x1370) [0x55c0a4]
dub(void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings)+0xa7) [0x60d92b]
dub(_Dmain+0x17bf) [0x54ba73]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x18) [0x618324]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x617e62]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x3b) [0x61836b]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x617e62]
dub(_d_run_main+0x1a8) [0x617e1c]
dub(main+0x17) [0x617c6f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f61f163876d]
[7F61F2442061:00000000 INF] Run 'dub help' for usage information.

Is this a configuration issue or a dub bug?

Also, is there any way to get it to generated libdallegro5.a instead of libDAllegro5.a?

BitPuffin commented 11 years ago

@SiegeLord Hmm, try adding

"libs": ["allegro"]

to package.json

I tried making it output libdallegro5 using the "targetName" rule. But it seems to be a bug in dub or something! Gotta post it to dub issues

rcorre commented 10 years ago

I know its been awhile, but is there still any interest in doing this? @BitPuffin's fork seems to build now, and the resulting target is called libdallegro5.a.

SiegeLord commented 10 years ago

Ok, I'll investigate this a bit when I get a moment. I'll also set up some tags, since I know dub likes those.

SiegeLord commented 10 years ago

Alright, package added: http://code.dlang.org/packages/allegro