how to run GNUmake

spako

Joined: 2005-07-02
Posts: 10
Posted: Sat, 2006-03-18 19:42

hi there

i'm a newbie(ish) to linux and gallery2. i've got a general idea about the structure of gallery 2 but am having trouble running the GUNmake files that create sql statements.

i've built my new class files in the classes folder of a new module and added all the @g2 syntax and xml for the new table. i copied over a GalleryStorage folder from another module and the GUNmakefile and put it into my classes folder. when i first ran it (by typing "make" while in the classes folder, is this right?) i got an error saying i needed the rxp command. so i got that installed and ran it again. i now got an error saying there was some sort of error on line 1 of my class. and no errors when i ran it a second time. but there is not the correct sql file in the folders for each of the different database platforms.

can you please tell me the proper procedure to run the GUNmakefile to see if i am doing it correctly. and any other suggestions will be appreciated!

 
spako

Joined: 2005-07-02
Posts: 10
Posted: Sun, 2006-03-19 22:03

i've tried a number of things and am getting closer to getting the script to run correctly, but not totally there yet.

the GNUmakefile script is now running and creating the correct xml file in the schema/xml-src/tmp directory. it is also making an Tag.xml file in the xml-out directory but that file is empty and that is where the problem starts.

here's the output i get when running make:

Quote:
trancekop@spako:/var/www/httpdocs/gallery2/modules/tag/classes$ sudo make
cd interfaces && make -
make[1]: Entering directory `/var/www/httpdocs/gallery2/modules/tag/classes/interfaces'
make[1]: Nothing to be done for `inc'.
make[1]: Leaving directory `/var/www/httpdocs/gallery2/modules/tag/classes/interfaces'
cd GalleryStorage/DatabaseStorage/schema && make -
make[1]: Entering directory `/var/www/httpdocs/gallery2/modules/tag/classes/GalleryStorage/DatabaseStorage/schema'
cd xml-src && make -w xml
make[2]: Entering directory `/var/www/httpdocs/gallery2/modules/tag/classes/GalleryStorage/DatabaseStorage/schema/xml-src'
perl ../../../../../../../lib/tools/bin/extractClassXml.pl \
--dtd=../../../../../../../../lib/tools/dtd/GalleryClass2.0.dtd ../../../../Tag.class \
--out=tmp/Tag.xml
if [ -f tmp/Tag.xml ]; then rxp -s -V tmp/Tag.xml; fi
if [ -f tmp/Tag.xml ]; then \
java -classpath :../../../../../../../lib/tools/CRC32.jar com.icl.saxon.StyleSheet tmp/Tag.xml ../../../../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/xml-src/DbXml.xsl > ../xml-out/Tag.xml; \
rxp -s -V ../xml-out/Tag.xml; \
fi
Exception in thread "main" java.lang.NoClassDefFoundError: com.icl.saxon.StyleSheet
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: com.icl.saxon.StyleSheet not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:../../../../../../../lib/tools/CRC32.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Error: Document ends too soon
in unnamed entity at line 1 char 1 of file:///var/www/httpdocs/gallery2/modules/tag/classes/GalleryStorage/DatabaseStorage/schema/xml-out/Tag.xml
make[2]: *** [../xml-out/Tag.xml] Error 1
make[2]: Leaving directory `/var/www/httpdocs/gallery2/modules/tag/classes/GalleryStorage/DatabaseStorage/schema/xml-src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/www/httpdocs/gallery2/modules/tag/classes/GalleryStorage/DatabaseStorage/schema'
make: *** [all] Error 2

Looks like the script is expecting there to be something in the xml-out/Tag.xml file, could this be a permissions problem? i'm using ubuntu and have to run scripts with sudo to get it to run as root. i tried to change the permissions for the GalleryStorage and interfaces directories to 777 (recursively).

I've attatched my class file. At the moment i'm jsut trying to get the sql created so there are just testing fields in the class.

Any assitance will be much appreciated!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-03-22 01:07

(from chat in IRC.. I suggested developing for G2.1)