View previous topic :: View next topic |
Author |
Message |
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Tue May 15, 2007 11:10 pm Post subject: |
|
|
Thanks for the praise!
We've not tried compiling ArcLib with GDC yet, so I guess the issues arise from the differing compilers.
Quote: | arc/text/format.d:51: function std.format.doFormat (void delegate(dchar),TypeInfo[],ubyte[24][1],void*) does not match parameter types (void delegate(dchar),TypeInfo[],void*) |
This looks like GDC has a problem with the way varargs are used in this function.
Quote: | arc/internals/input/constants.d:37: Error: undefined identifier ARC_UNKNOWN
|
This seems like a simple forward-referencing error (ARC_UNKNOWN is defined a few lines below).
Quote: | arc/camera.d:46: Error: undefined identifier package arc.input
|
And here there was an import statement missing; I wonder why it compiled for me. Be aware that arc.camera is (probably) going to be deprecated/removed soon.
I've fixed the second and the third problem; the first probably needs a closer look. Maybe you can take a look at the offending function and see if you can make it work? Otherwise I'll install GDC and try later.
EDIT:
I installed GDC and committed a fix to arc.text.format: it should compile now. Can you try building the asteroids example? I was too lazy to recompile derelict for gdc... |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Wed May 16, 2007 11:51 am Post subject: |
|
|
Do you have derelict installed via DSSS? On my box a 'dsss build' in the asteroids subfolder links to the derelict libs (that's also why libdl isn't in the build file - it's a derelict dependency, not an arc one). Try running 'dsss net deps' in the arc or asteroids folders.
By the way: DSSS always links statically by default, so that's why you wouldn't see arc or derelict in the ldd output.
Does ~/prj/arclib/examples/asteroids have the astbin subfolder with graphics and sounds in it?
I have the exact same package versions and only differ in use-flags, so I doubt that's the issue here. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Thu May 17, 2007 12:55 am Post subject: |
|
|
Quote: | sttillmann@scaleot ~/prj/arclib/arc $ ls /usr/include/d/derelict/
opengl sdl util |
That is odd, you should have more than that:
Code: |
$ dsss net depslist
derelictal
derelictgl
derelictglu
derelictogg
derelictsdl
derelictsdlimage
derelictsdlttf
derelictutil
derelictvorbis
|
Please try 'dsss installed' and if some of these derelict dependencies are missing, install them. To be sure dsss is not using the copy of derelict that ships with arc (for people not using dsss), try removing the ~/prj/arclib/derelict folder.
You do use dsss 0.64? |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Thu May 17, 2007 5:34 am Post subject: |
|
|
Okay, thanks for your help! I can now reproduce the bug:
Code: | (gdb) run
Starting program: /home/sequoh/eigenes/projekte/arc-svn/examples/asteroids/asteroids
[Thread debugging using libthread_db enabled]
[New Thread -1210120528 (LWP 5319)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210120528 (LWP 5319)]
0x082719d5 in SDL_ClearError ()
(gdb) backtrace
#0 0x082719d5 in SDL_ClearError ()
#1 0xb7950fff in SDL_Init () from /usr/lib/libSDL.so
#2 0x0816e2ff in arc.window.initializeSDL() () at ../../arc/window.d:307
#3 0x0816ddaa in arc.window.open(char[], int, int, bit) (argTitle={length = 9, ptr = 0x8202208 "Asteroids"}, argWidth=800,
argHeight=600, argFullscreen=false) at ../../arc/window.d:108
#4 0x0815de4d in D main () at asteroids.d:38 |
See http://www.dsource.org/forums/viewtopic.php?t=2445&highlight=rdynamic . Removing the -q,-rdynamic from "<dssdir>/etc/rebuild/gdc-posix" resolved this issue.
I had to add another workaround for GDC, so I recommend that you:
* update arclib to the newest revision
* alter gdc-posix
* dsss build
It worked for me, so I hope you'll finally get it compiled. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Fri May 18, 2007 2:16 am Post subject: |
|
|
Thanks for working this out!
Quote: | I've arrive at the decision that error occurs in file arc/log.d at line 106 |
I'll look into it, but can't reproduce the issue. Probably still the 'formatString' function causing trouble.
Quote: | because there are images missing |
Can you be more specific? What's missing exactly?
By the way, are you compiling 64 bit code with GDC? (does it actually support that already?) |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Fri May 18, 2007 7:26 am Post subject: |
|
|
The gui unittest not running was a bug. I also made all image file name's extensions lowercase.
I'll look into the text unittest later. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Sun May 20, 2007 11:27 am Post subject: |
|
|
Okay then, I think I fixed arc.text.format. Will you try things again to verify that they work?
Now that things compile and run (hopefully), what do you think about arclib? Clay and me'd be highly interested to hear what you're up to, what you like and what you don't like.
If you choose to use arclib, always feel free to post questions, bugs or anything arclib-related here. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Mon May 21, 2007 2:42 pm Post subject: |
|
|
Quote: | Thanks again for the friendly assistance! Everything works fine now |
No problem, I'm glad it does. Fixing all these problems made sure that arclib does indeed work with GDC and on 64 bit, so it was really useful.
Quote: | I'm looking forward to see a networking library integrated in ArcLib |
This is something I definitely want to see myself since my game ideas usually involve networking.
Quote: | IRC client, command line parser |
I think these are better suited for seperate libraries. As far as I remember there is at least one (probably more) command line parsing library. If you're looking for the basics of an irc client, davidb posted something like that recently. I'm not sure if he meant it to be used though, so you better ask him. |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Tue May 22, 2007 11:38 am Post subject: |
|
|
If the dnet project gets anywhere, we could simply supply dnet with arclib and integrate dnet with our lib. Networking is a complicated subject that I currently do not have any experience with, so I'm very curious to see how successful dnet is. http://www.dsource.org/projects/dnet
For IRC lib, see http://www.dprogramming.com/dirclib.php |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed May 30, 2007 8:53 pm Post subject: |
|
|
those are development pains...
I recently made a change so that removed the
drawMulti
function, and instead just use the draw function to replace it, to simplify the API. I never tested the scenegraph stuff with it.
the union complains have to do with the Point struct I've been messing with, the duplicate initialization happens from code like
Point p = [2,3] instead of Point p = [x:2, y:3]
You can either fix these yourself or wait for the svn to fix itself, which it will as we get closer to release. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Thu May 31, 2007 4:26 am Post subject: |
|
|
Quote: | the union complains have to do with the Point struct I've been messing with, the duplicate initialization happens from code like
Point p = [2,3] instead of Point p = [x:2, y:3] |
You meant {2,3}, of course. Can we fix this by declaring
Code: | struct Point
{
float x,y;
alias x w;
alias y h;
} |
instead of using unions? I only did some very quick tests, but it seemed to work. |
|
Back to top |
|
|
|