Dominik Kriegner | 15 Aug 2011 11:27
Picon

./data directory needed during startup

Hello all,

I tried to build the latest commit from launchpad in António Lima's
development branch. However I have problems executing the resulting
referencer binary.

So what I did is

fetch the sources from launchpad 
bzr branch lp:~referencer-devs/referencer/amrlima_gio_port

configure, build and install them
cd amrlima_gio_port/
./devconfigure
make
make install

the build works fine. when I try to run referencer this only works when
in the working directory a folder "data" exists. Otherwise I get

$ bin/referencer
int main(int, char**):
	setting pythonPath
to :/home/dominik/apps/lib/python:./plugins:/home/dominik/.referencer/plugins:/home/dominik/devel/referencer/amrlima_gio_port/dist/lib/referencer:
terminate called after throwing an instance of 'Gio::Error'
Aborted

if I do
mkdir data
bin/referencer
(Continue reading)

Mads Chr. Olesen | 15 Aug 2011 11:38
Picon

Re: ./data directory needed during startup

man, 15 08 2011 kl. 11:27 +0200, skrev Dominik Kriegner:
> $ bin/referencer
> int main(int, char**):
>         setting pythonPath
> to :/home/dominik/apps/lib/python:./plugins:/home/dominik/.referencer/plugins:/home/dominik/devel/referencer/amrlima_gio_port/dist/lib/referencer:
> terminate called after throwing an instance of 'Gio::Error'
> Aborted

I see the same behaviour, however if you use ./src/referencer it works
for me

   
> A subsequent start of referencer fails because of those 4 emtpy files.
> Did I do something wrong or should I file a bug report on launchpad? 

Does installing as non-devconfigure work?
./configure
make
make install

--

-- 
Mads Chr. Olesen <mads <at> mchro.dk>

_______________________________________________
referencer mailing list
referencer <at> icculus.org
http://icculus.org/mailman/listinfo/referencer

Dominik Kriegner | 15 Aug 2011 12:44
Picon

./data directory needed during startup

hi

> man, 15 08 2011 kl. 11:27 +0200, skrev Dominik Kriegner:
> > $ bin/referencer
> > int main(int, char**):
> >         setting pythonPath
> > to :/home/dominik/apps/lib/python:./plugins:/home/dominik/.referencer/plugins:/home/dominik/devel/referencer/amrlima_gio_port/dist/lib/referencer:
> > terminate called after throwing an instance of 'Gio::Error'
> > Aborted
> 
> I see the same behaviour, however if you use ./src/referencer it works
> for me

You are right it works with ./src/referencer but only When I execute it
from the root directory of the branch! If I do 

cd src
./referencer 

it fails with the same error again. I guess your case works only since
a data directory and the needed files exist in the root directory.
Since the files already exist there also subsequent startups work as
expected.

>    
> > A subsequent start of referencer fails because of those 4 emtpy files.
> > Did I do something wrong or should I file a bug report on launchpad? 
> 
> Does installing as non-devconfigure work?
> ./configure
(Continue reading)

Dominik Kriegner | 15 Aug 2011 18:14
Picon

Re: ./data directory needed during startup

I think the main problem is in the Utility::findDataFile function. I
could fix the problem with

=== modified file 'src/Utility.C'
--- old/src/Utility.C	2011-03-24 16:55:22 +0000
+++ new/src/Utility.C	2011-08-15 15:39:32 +0000
 <at>  <at>  -213,9 +213,7  <at>  <at> 
 		localfile = filename;
 	} else {
 		localfile = Glib::build_filename (
-			Glib::get_current_dir (), "data");
-		localfile = Glib::build_filename (
-			localfile, filename);
+		    DATADIR, filename);
 	}

 	Glib::RefPtr<Gio::File> uri =

I am however not sure if this is what the findDataFile function is
intended for. I also attached the patch file. Please have a look!

kind regards

Dominik

On Mon, 2011-08-15 at 12:44 +0200, Dominik Kriegner wrote:
> hi
> 
> > man, 15 08 2011 kl. 11:27 +0200, skrev Dominik Kriegner:
> > > $ bin/referencer
(Continue reading)

António Lima | 16 Aug 2011 01:02
Picon
Gravatar

Re: ./data directory needed during startup

Seg, 2011-08-15 às 18:14 +0200, Dominik Kriegner escreveu:
> 
> 
> Dominik Kriegner
> 

Hi Dominik,

I'll look at you patch in the next days and commit to my gio_port
branch. I hope I'll be able to work on referencer in the next month.
Been really busy :( .

Thank you for reporting and fixing this!

António Lima

_______________________________________________
referencer mailing list
referencer <at> icculus.org
http://icculus.org/mailman/listinfo/referencer
António Lima | 27 Aug 2011 02:14
Picon
Gravatar

Re: ./data directory needed during startup

Em 15-08-2011 16:14, Dominik Kriegner escreveu:
I think the main problem is in the Utility::findDataFile function. I could fix the problem with === modified file 'src/Utility.C' --- old/src/Utility.C 2011-03-24 16:55:22 +0000 +++ new/src/Utility.C 2011-08-15 15:39:32 +0000 <at> <at> -213,9 +213,7 <at> <at> localfile = filename; } else { localfile = Glib::build_filename ( - Glib::get_current_dir (), "data"); - localfile = Glib::build_filename ( - localfile, filename); + DATADIR, filename); } Glib::RefPtr<Gio::File> uri = I am however not sure if this is what the findDataFile function is intended for. I also attached the patch file. Please have a look!

Hi,

This is fixed in my branch http://bazaar.launchpad.net/~referencer-devs/referencer/amrlima_gio_port/revision/876

The problem was introduced by a change due to the gio port. Thanks Dominik for reporting!

Regards,
António Lima

kind regards Dominik On Mon, 2011-08-15 at 12:44 +0200, Dominik Kriegner wrote:
hi
man, 15 08 2011 kl. 11:27 +0200, skrev Dominik Kriegner:
$ bin/referencer int main(int, char**): setting pythonPath to :/home/dominik/apps/lib/python:./plugins:/home/dominik/.referencer/plugins:/home/dominik/devel/referencer/amrlima_gio_port/dist/lib/referencer: terminate called after throwing an instance of 'Gio::Error' Aborted
I see the same behaviour, however if you use ./src/referencer it works for me
You are right it works with ./src/referencer but only When I execute it from the root directory of the branch! If I do cd src ./referencer it fails with the same error again. I guess your case works only since a data directory and the needed files exist in the root directory. Since the files already exist there also subsequent startups work as expected.
A subsequent start of referencer fails because of those 4 emtpy files. Did I do something wrong or should I file a bug report on launchpad?
Does installing as non-devconfigure work? ./configure make make install
fails for me too if executed outside the build directory where the data folder is located! somehow the current directory is important when referencer is started! kind regards dominik


_______________________________________________ referencer mailing list referencer <at> icculus.org http://icculus.org/mailman/listinfo/referencer

_______________________________________________
referencer mailing list
referencer <at> icculus.org
http://icculus.org/mailman/listinfo/referencer

Gmane