FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Installing / configuring modules from SVN via DSSS?

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
deadimp



Joined: 22 Oct 2008
Posts: 28

PostPosted: Tue Nov 04, 2008 12:17 am    Post subject: Installing / configuring modules from SVN via DSSS? Reply with quote

Is there any specific way we should do this?

I've checked out the arclib core, scenegraph, freetype, and a few other modules into one directory [ arclib/{arc, freetype, scenegraph, ...} ].
I just did a fresh reinstall of the core from SVN source, and it works like a charm.
However, when I do dsss build/install with freetype, it installs the modules directly to $INCLUDE/freetype, and so "import arc.font" does not work (even though that is what it is what the module is defined to be in the source). Changing it to "import freetype.font" lets it compile, but then there is a linker error, apparently trying to look for symbols under the module "arc.font".

If there is no specific fix, what's the easiest way to fix this?
_________________
deadimp.org
> MegaMan X Crossfire - MegaMan X fan game

Beginning D; Basic experience in PHP, C++, Java, C#, MySQL, HTML, CSS, JavaScript, VB
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Nov 04, 2008 1:01 pm    Post subject: Reply with quote

I just fixed a module name error bug in freetype. Try again and let me know the result.
Back to top
View user's profile Send private message AIM Address
deadimp



Joined: 22 Oct 2008
Posts: 28

PostPosted: Wed Nov 05, 2008 12:26 am    Post subject: Reply with quote

I tried it, but oddly I'm still getting linker errors:

Code:
--- Snippet removed since forum seems to be having problems ---


The symbols seem to be pointing to the "freetype.font" module, and I'm fairly certain that rebuild is linking libfreetype.a as it has already done with tango and arclib.
I updated my working copy of freetype, uninstall'ed "freetype", then used dsss to distclean / build / install.

One question, though: Shouldn't the extension modules be placed in the scope of Arc? For the freetype extension, wouldn't it be better that the font module is confined to "arc.freetype.font" or "arc.font" instead of a 'global' "freetype.font" that might conflict with other packages?

Also tried doing `dsss net install arclib-freetype`, but it said that the package did not exist.

NOTE: The problem I got when trying to sumbit the output from rebuild:
Code:
Could not insert new word

DEBUG MODE

INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('[this was a cleaned mangled name from freetype.font.font]', 0)


Line : 209
File : functions_search.php

It did work when Preview'ing.
_________________
deadimp.org
> MegaMan X Crossfire - MegaMan X fan game

Beginning D; Basic experience in PHP, C++, Java, C#, MySQL, HTML, CSS, JavaScript, VB
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Wed Nov 05, 2008 12:48 pm    Post subject: Reply with quote

Hrm,... I can't see the stuff you pasted. Can you try pasting here?

http://arclib.pastebin.com/

Are you getting freetype from here?

http://www.dsource.org/projects/arclib/browser/trunk/arclib/freetype

Also, make sure you ...

dsss uninstall freetype
dsss build
dsss install

And try compiling this example

http://www.dsource.org/projects/arclib/browser/trunk/examples/freetype

I just updated it a tiny bit so I could compile it myself.

================

As for putting it under the "arc." module name space, I can't do that unless I make it a part of the arclib core library. The "extensions" are like add-on libraries that are designed to work with arclib core. I like to keep them separate so I can feel free to rewrite the API for it and not have to worry about legacy code breaking, or not having to worry about including the kitchen sink in arclib and making it overly complicated. Some things, like Sprite for instance, can also be made obsolete by the scenegraph. Having add on libraries let people use whatever tools they need to write a game, and to ignore the rest.

================

As for DSSS net install not working, I'm not sure what is up with that. I'll email Gregor.
Back to top
View user's profile Send private message AIM Address
deadimp



Joined: 22 Oct 2008
Posts: 28

PostPosted: Wed Nov 05, 2008 9:27 pm    Post subject: Reply with quote

Output: when trying to
> Building my program with freetype: http://arclib.pastebin.com/m5ebafc0f
> Building /trunk/examples/freetype: http://arclib.pastebin.com/m25846269

I tried reinstalling freetype once more, just to see, but it didn't work. I even went so far as to uninstall freetype, delete my working copy, and then re-checkout freetype from SVN. Same results as posted above.

However, I did try out the other examples, installing sprite and openal for the sprite example, and it worked - though I couldn't hear the sound since I woke my computer for sleep, and sound does not work after sleep / hibernation in Ubuntu Sad [Mebbe FoxConn's fault? Don't know if that's my processor... This little stint is kinda off-topic...]

I'm thinking that maybe it has something to do with the library name. The file /usr/lib/libfreetype.a does exist on my system, and I'm guessing (for some reason) dsss is deciding to link that one instead of the one in local DSSS (which does exist as lib/libfreetype.a), which would explain why it doesn't complain about not finding -lfreetype.
Perhaps a bug with DSSS, rebuild, or DMD - something with the order of library search directories.

I'm using DMD v1.033, DSSS 0.78 on Ubuntu 8.04.1 i386.


I think that some sort of extended qualification for the modules would help with problems like this - collision. Maybe not under arc, but maybe something like "arcext" (unless you can specify directory name with "arc.extension" and have the compiler still work with it...).
Global modules with names like "sprite" and "openal" are too general and don't really show any dependency on arclib. I don't know how this could factor into the DSSS package repository.
_________________
deadimp.org
> MegaMan X Crossfire - MegaMan X fan game

Beginning D; Basic experience in PHP, C++, Java, C#, MySQL, HTML, CSS, JavaScript, VB


Last edited by deadimp on Wed Nov 05, 2008 10:23 pm; edited 2 times in total
Back to top
View user's profile Send private message
deadimp



Joined: 22 Oct 2008
Posts: 28

PostPosted: Wed Nov 05, 2008 9:42 pm    Post subject: Reply with quote

The zinger was the name conflict.
I guess the environment's default linker search path took precedence over whatever rebuild supplied...

Solved the problem by editing dsss.conf and changing the target to something else. I changed it to "arclib-freetype" and it generated executable. My own code didn't work Sad 'cause it apparently doesn't search the system's font directories, but I compiled and ran the example with no problem.

I'm gonna play around with naming the directories and see if I can find a convenient way to organize these arclib extensions in DSSS.

EDIT: Tried using directories such as "arc.freetype", but can't really make it transparent since "import arc.freetype.x" will just resolve to arc/freetype/x.d. Worth a try.
Still, something
I'm going to look at how derelict handles this type of stuff.

EDIT 2: Yeah, found it out. Wasn't that hard.
I've made a request in the Patches / New Extensions sticky.
_________________
deadimp.org
> MegaMan X Crossfire - MegaMan X fan game

Beginning D; Basic experience in PHP, C++, Java, C#, MySQL, HTML, CSS, JavaScript, VB
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group