[PKGBUILD] Need help compiling QuteCom (formerly WengoPhone)

Hey there!
I'm trying to make a new PKGBUILD for QuteCom, the former wengophone-ng. The PKGBUILD currently looks this way:
# Contributor: Julius Bullinger <#####>
pkgname=qutecom-hg
pkgver=105
pkgrel=1
pkgdesc="The latest hg pull of wmii, a lightweight, dynamic window manager for X11"
url="http://wmii.suckless.org"
license='custom'
arch=('i686')
makedepends=('mercurial')
depends=('cmake>=2.4.4' 'qt>=4.2' 'boost>=1.33' 'openssl>=0.9.8a' 'glib2>=2.10.3' \
'gnutls>=1.2.9' 'e2fsprogs>=1.38' 'libxml2>=2.6.24' 'speex>=1.1.12' \
'ffmpeg>=cvs20060823' 'portaudio>=19' 'alsa-lib>=1.0.11' \
'libsndfile>=1.0.12' 'libsamplerate>=0.1.2' 'curl>=7.16.1' 'libosip>=3.0.1')
source=()
_hgroot='http://hg.qutecom.org'
_hgrepo='qutecom-2.2'
build() {
cd ${startdir}/src
if [ -d ${_hgrepo} ]; then
cd ${startdir}/src/${_hgrepo}
hg pull -u
else
hg clone ${_hgroot}${_hgrepo} || return 1
cd ${startdir}/src/${_hgrepo}
fi
msg "Mercurial checkout done or server timeout"
msg "Starting make..."
mkdir ./build
cd ./build
cmake .. \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/quotecom \
-DBUILDID_SUPPORT=OFF -DFFMPEG_INTERNAL=ON \
-DPORTAUDIO_INTERNAL=OFF -DPORTAUDIO_OSS_SUPPORT=OFF \
-DPHAPI_AUDIO_OSS_SUPPORT=OFF -DCOPY_DATA_FILES_ON_CONFIGURE=OFF
make || return 1
make DESTDIR=$pkgdir install
As you can see, it's using mercurial and cmake. Building crashes with just saying
Linking C static library libgaim.a
[ 29%] Built target gaim
make: *** [all] Fehler 2 [=Error 2]
Since I'm no developer, I have no idea what to do. Can anybody help me, e.g. try to build it himself, and give me an hint what to do?
Thank you!
Last edited by kwurzel (2009-11-25 08:17:17)

The following patch allows the build to complete:
--- qutecom-2.2/wifo/netlib/src/netlib.cpp 2008-07-08 13:03:11.386417658 +0100
+++ qutecom-2.2-build/wifo/netlib/src/netlib.cpp 2008-07-08 14:57:38.845728354 +0100
@@ -40,6 +40,7 @@
#include <sys/ioctl.h>
#include <netdb.h>
#include <strings.h>
+ #include <cstring>
#endif //OS_WIN32
#include <stdlib.h>
#include <limits.h>
I've also made some PKGBUILD changes:
# Contributor: Julius Bullinger <[email protected]>
pkgname=qutecom-hg
pkgver=105
pkgrel=1
pkgdesc="Open source softphone, mercurial build"
url="http://www.qutecom.org"
license='custom'
arch=('i686')
makedepends=('mercurial')
depends=('cmake>=2.4.4' 'qt>=4.2' 'boost>=1.33' 'openssl>=0.9.8a' 'glib2>=2.10.3' \
'gnutls>=1.2.9' 'e2fsprogs>=1.38' 'libxml2>=2.6.24' 'speex>=1.1.12' \
'ffmpeg>=cvs20060823' 'portaudio>=19' 'alsa-lib>=1.0.11' \
'libsndfile>=1.0.12' 'libsamplerate>=0.1.2' 'curl>=7.16.1' 'libosip>=3.0.1')
source=(netlib-gcc-4.3.patch)
_hgroot='http://hg.qutecom.org'
_hgrepo='qutecom-2.2'
build() {
cd ${startdir}/src
if [ -d ${_hgrepo} ]; then
cd ${startdir}/src/${_hgrepo}
hg pull -u
else
hg clone ${_hgroot}${_hgrepo} || return 1
cd ${startdir}/src/${_hgrepo}
fi
cp -r ${startdir}/src/${_hgrepo} ${startdir}/src/${_hgrepo}-build
cd ${startdir}/src/${_hgrepo}-build
msg "Mercurial checkout done or server timeout"
msg "Starting make..."
patch -Np1 -i ../netlib-gcc-4.3.patch || return 1
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
-DBUILDID_SUPPORT=OFF -DFFMPEG_INTERNAL=ON \
-DPORTAUDIO_INTERNAL=OFF -DPORTAUDIO_OSS_SUPPORT=OFF \
-DPHAPI_AUDIO_OSS_SUPPORT=OFF -DCOPY_DATA_FILES_ON_CONFIGURE=OFF || return 1
make || return 1
make DESTDIR=$pkgdir install
rm -rf ${startdir}/src/${_hgrepo}-build
The app runs for me, but with most of the interface blank - not too surprising, given that this code is intended for developers only. I'm not interested in working further on this right now, so feel free to do anything you want with the above.

Similar Messages

  • Loemu PKGBUILD, need help with python dependencies [solved]

    I'm having a hard time determining the depends for this python application. It uses gtk and glade, but namcap is unable to determine dependencies for python apps, I think. It complains that I am including not needed depends. I found a requirements list here:
    http://linux.softpedia.com/get/Utilitie … 4855.shtml
    that might give some clues, but I'm still struggling to determine what's needed until I can get home and run the application.
    My PKGBUILD in case you're interested and think you can help. I'm sure I need glade for python in the depends line, but I can't find it in AUR or with pacman.
    # Contributor: robb_force <[email protected]>
    pkgname=loemu
    pkgver=0.1.1
    pkgrel=1
    pkgdesc="A simple frontend for various game emulators, including XMAME, SDLMAME and Snes9x."
    url="http://loemu.pegueroles.com/"
    license="GPL"
    arch=('i686')
    depends=('pygtk>=2.6' 'libglade')
    makedepends=('python>=2.4.0')
    source=(http://loemu.pegueroles.com/dists/${pkgname}-${pkgver}.tar.gz)
    md5sums=('d4cff1ef835ce19a9fd22cdaec47074a')
    build() {
    # Fix the paths in the scripts
    cd ${startdir}/src/${pkgname}-${pkgver}
    sed '/roms/d;/flyers/d;/snaps/d' -i setup.py
    sed 's|share/games|share|g' -i setup.py
    cd ${startdir}/src/${pkgname}-${pkgver}/${pkgname}
    sed 's|share/games|share|g' -i Preferences.py
    sed 's|share/games|share|g' -i Loemu.py
    sed 's|share/games|share|g' -i Config.py
    # Install the application
    cd ${startdir}/src/${pkgname}-${pkgver}
    python setup.py install --prefix=${startdir}/pkg/usr
    Last edited by robb_force (2007-05-18 19:22:02)

    Thanks for the response. I've added the working PKGBUILD to the AUR.
    http://aur.archlinux.org/packages.php?d … 1&ID=11093

  • Need help compiling external jar files into my one jar file from cmd line

    Here is my problem, let me see if I can explain it right:
    I am making a jar file on my development computer that will run my java project. In this java project, it references a couple Java3D jar files. On my development computer, I create the jar file and it runs correctly, but when I move that jar file over to the test computer, the parts of the application needing those Java3D jars are not found in my jar I created. I isolated the problem and it is because those Java3D jar files I needed are not on my test machine. But that is the way I need it to be. I need it so that when I compile all my code on the development machine, I need it to also compile those two Java3D files into my one jar that I move to the test machine. You get what I'm saying? I must do all the compiling from the command line and have only one jar file to put on the test machine that contains all my compiled code and the two Java3D files needed to run some of the applications in the project.
    Here a brief sample of what I'm doing:
    To compile my java files in my project, I simply to this for all my files:
    javac file.java
    javac file2.java... and so on for all my java files.
    Then I create my jar file:
    jar -cfm MyJar.jar manifest.mf file.class
    jar -fmu MyJar.jar manifest.mf file2.class... and so on for all my class files.
    Also when compiling my jar file, I do this thinking that it would include the two Java3D jars into my one jar file:
    jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
    jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
    My manifest file looks something like this:
    Manifest-Version: 1.0
    Main-Class: Main
    Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar
    Do I have to have that Class-Path in there pointing to those jar files? Those jar files will not exist on my test machine because the directory structure will not be the same. I've tried a manifest without specifying my Class-Path to those jar files, but I get the same problem when I run my application on the part that needs the Java3D files.
    The error I am getting is that there is a RasterTextLabel class inside one of those Java3D jar files that my application cannot access because those jar files are not on my test machine.
    So basically what I really need to know is how I get those two Java3D jar files compiled into my one jar file that I move to a test machine and run with the following command:
    java -jar MyJar.jar
    Can anyone help me??
    Thanks.

    Here what you need is to have all the files present in a single jar file, and the classpath is set properly to the required jar files.
    Do the following in steps:
    1)
    Create a custom manifest file,say mymanifest.mf, with the following contenets, put it in current directory:
    Manifest-Version: 1.0
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    main-Class: Main
    Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar <press ENTER key>
    2)
    jar -cfm MyJar.jar manifest.mf file.class
    jar -fmu MyJar.jar manifest.mf file2.class... and so on for all class files.
    3)
    jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
    jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
    (Make sure that j3d-org-images.jar and j3d-org.jar are present in a subdirectory called 'jars')
    Now you would be able to run,
    java -jar myjar.jar

  • Need help compiling v4l cvs

    I just bought myself a new tv card that needs the cvs version of v4l... I've tried to compile it but always fails... I did this:
    cvs -d :pserver:[email protected]:/cvs/video4linux login
    cvs -d :pserver:[email protected]:/cvs/video4linux co video4linux
    cvs -d :pserver:[email protected]:/cvs/linuxtv login
    cvs -z3 -d :pserver:[email protected]:/cvs/linuxtv co -P dvb-kernel
    cd video4linux
    ./scripts/merge-trees.sh
    make
    And as a result I get only errors... Files not being found and errors about incomplete types... I think this is the right way to compile the cvs, according to their wiki, so maybe it's an arch thing? I've never tried to compile any modules before so this is a totally new thing for me... Please help!

    yeah, I know! it was my intension from the start but I had problem cutting and pasting from a terminal into firefox... but I found out a way now!
    make gives this output:
    make -C /lib/modules/2.6.12-ARCH/build SUBDIRS=/root/video4linux modules
    make[1]: Entering directory `/usr/src/linux-2.6.12-ARCH'
    CC [M] /root/video4linux/video-buf.o
    /root/video4linux/video-buf.c:36:29: media/video-buf.h: No such file or directory
    fixdep: /root/video4linux/.video-buf.o.d is empty
    CC [M] /root/video4linux/v4l1-compat.o
    CC [M] /root/video4linux/v4l2-common.o
    CC [M] /root/video4linux/btcx-risc.o
    CC [M] /root/video4linux/ir-common.o
    /root/video4linux/ir-common.c:27:29: media/ir-common.h: No such file or directory
    fixdep: /root/video4linux/.ir-common.o.d is empty
    CC [M] /root/video4linux/bttv-driver.o
    CC [M] /root/video4linux/bttv-cards.o
    CC [M] /root/video4linux/bttv-risc.o
    CC [M] /root/video4linux/bttv-if.o
    In file included from /root/video4linux/bttv-if.c:35:
    /root/video4linux/bttvp.h:52:29: media/video-buf.h: No such file or directory
    /root/video4linux/bttvp.h:53:29: media/audiochip.h: No such file or directory
    /root/video4linux/bttvp.h:54:25: media/tuner.h: No such file or directory
    /root/video4linux/bttvp.h:55:28: media/tveeprom.h: No such file or directory
    /root/video4linux/bttvp.h:56:29: media/ir-common.h: No such file or directory
    fixdep: /root/video4linux/.bttv-if.o.d is empty
    CC [M] /root/video4linux/bttv-vbi.o
    CC [M] /root/video4linux/bttv-i2c.o
    CC [M] /root/video4linux/bttv-gpio.o
    In file included from /root/video4linux/bttv-gpio.c:36:
    /root/video4linux/bttvp.h:52:29: media/video-buf.h: No such file or directory
    /root/video4linux/bttvp.h:53:29: media/audiochip.h: No such file or directory
    /root/video4linux/bttvp.h:54:25: media/tuner.h: No such file or directory
    /root/video4linux/bttvp.h:55:28: media/tveeprom.h: No such file or directory
    /root/video4linux/bttvp.h:56:29: media/ir-common.h: No such file or directory
    fixdep: /root/video4linux/.bttv-gpio.o.d is empty
    CC [M] /root/video4linux/cx88-video.o
    In file included from /root/video4linux/media/video-buf-dvb.h:3,
    from /root/video4linux/cx88.h:33,
    from /root/video4linux/cx88-video.c:37:
    /root/video4linux/dmxdev.h:38:19: demux.h: No such file or directory
    In file included from /root/video4linux/media/video-buf-dvb.h:4,
    from /root/video4linux/cx88.h:33,
    from /root/video4linux/cx88-video.c:37:
    /root/video4linux/dvb_demux.h:46: error: field `filter' has incomplete type
    /root/video4linux/dvb_demux.h:47: error: `DMX_MAX_FILTER_SIZE' undeclared here (not in a function)
    /root/video4linux/dvb_demux.h:65: error: field `ts' has incomplete type
    /root/video4linux/dvb_demux.h:66: error: field `sec' has incomplete type
    /root/video4linux/dvb_demux.h:70: error: parse error before "dmx_ts_cb"
    /root/video4linux/dvb_demux.h:70: warning: no semicolon at end of struct or union
    /root/video4linux/dvb_demux.h:70: warning: no semicolon at end of struct or union
    /root/video4linux/dvb_demux.h:71: warning: type defaults to `int' in declaration of `sec'
    /root/video4linux/dvb_demux.h:71: warning: data definition has no type or storage class
    /root/video4linux/dvb_demux.h:72: warning: type defaults to `int' in declaration of `cb'
    /root/video4linux/dvb_demux.h:72: warning: data definition has no type or storage class
    /root/video4linux/dvb_demux.h:95: error: parse error before '}' token
    /root/video4linux/dvb_demux.h:98: error: field `dmx' has incomplete type
    /root/video4linux/dvb_demux.h:118: error: `DMX_TS_PES_OTHER' undeclared here (not in a function)
    In file included from /root/video4linux/cx88.h:33,
    from /root/video4linux/cx88-video.c:37:
    /root/video4linux/media/video-buf-dvb.h:27: error: field `fe_hw' has incomplete type
    /root/video4linux/media/video-buf-dvb.h:28: error: field `fe_mem' has incomplete type
    /root/video4linux/dvb_demux.h:86: error: storage size of `pes_type' isn't known
    make[2]: *** [/root/video4linux/cx88-video.o] Error 1
    make[1]: *** [_module_/root/video4linux] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.6.12-ARCH'
    make: *** [default] Error 2

  • Need Help Compiling!

    When I compile java using me text editor everything is as smooth as sand but when I go to my ms-dos prompt and type
    javac Root.java
    it turns out to be a bad comand. I have windows 98SE btw and don't understand what the problem is?
    Now my real problem is when I get my java file to compile using my text editor and try to open the class file with ms-dos by doing--
    java Root
    it turns out saying NoClassDefFound, I don't know what this means.
    If anyone could help me on this I'd vary much appreciate it but other then that thanks for your time.

    When I compile java using me text editor everything
    is as smooth as sand but when I go to my ms-dos
    prompt and type
    javac Root.java
    it turns out to be a bad comand. I have windows 98SE
    btw and don't understand what the problem is?You need to add the directory that contains javac.exe to the PATH variable maintained by your computer's operating system. SEE #5 of the installation instructions here:
    http://java.sun.com/j2se/1.5.0/install-windows.html
    Now my real problem is when I get my java file to
    compile using my text editor and try to open the
    class file with ms-dos by doing--
    java Root
    it turns out saying NoClassDefFound, I don't know
    what this means.It means that you don't know how to work with Java's CLASSPATH variable, which is extremely important for you to understand if you plan on writing and running Java code. Read the following documents at this address:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#general
    Setting the Classpath
    How Classes are Found
    javac [tool]
    java [tool]
    >
    If anyone could help me on this I'd vary much
    appreciate it but other then that thanks for your
    time.To run your program, change to the directory that contains Root.class and do a directory listing. Verify that the file exists with that exact name and capitalization. Fix any problem. From the same location, issue the following command:
    java -cp . Root (Mind the period and surrounding spaces.)

  • Need help compiling an EJB with Apache Tomcat 5.5

    Hi everyone, I need some help. I�m writing an EJB that has to run on Apache Tomcat 5.5.
    I�m importing the javax.ejb.* library, but Eclipse can�t find the JAR it needs. Where can I find this JAR? Do I have to download or what?
    Thanks a lot.

    Thanks, I�ve already downloaded the javaee.jar from the Sun webpage. As you can see I�m quite new to EJB developing. I want to create an EJB that will get some information from a database and send it back to a servlet, and then a web page. I've been browsing the JBoss page, and I see there are LOTS of versions. Any suggestion, regarding which version I shoud use for this? Thanks a lot again.

  • [SOLVED]LXAppearance-0.5.5 PKGBUILD - Need Help Creating

    I thought I would teach myself how to do PKGBUILDs by using LXAppearance.
    I used this as my sources: http://downloads.sourceforge.net/projec … tlayer-ams
    I extracted it to /home/tyler/Development/lxappearance-0.5.5/
    Then I copied and modified this PKGBUILD and put it in the correct directory.
    #$Id: PKGBUILD 103634 2014-01-08 14:31:20Z bpiotrowski $
    # Maintainer: Bartłomiej Piotrowski <[email protected]>
    # Contributor: Angel Velasquez <[email protected]>
    # Contributor: Geoffroy Carrier <[email protected]>
    pkgname=lxappearance
    pkgver=0.5.5
    pkgrel=1
    pkgdesc='Feature-rich GTK+ theme switcher of the LXDE Desktop'
    arch=('i686' 'x86_64')
    license=('GPL2')
    url='http://lxde.org/'
    groups=('lxde')
    depends=('gtk2' 'dbus-glib')
    makedepends=('intltool')
    #source=(http://downloads.sourceforge.net/sourceforge/lxde/$pkgname-$pkgver.tar.xz)
    #md5sums=('a67113681d9d0a6d936289909aed5782')
    build() {
    cd /home/tyler/Development/lxappearance-0.5.5/
    ./configure --sysconfdir=/etc --prefix=/usr \
    --enable-dbus
    make
    package() {
    cd /home/tyler/Development/lxappearance-0.5.5/
    make DESTDIR="$pkgdir/" install
    Finally, I ran makepkg -s and pacman -U lxappearance-0.5.5-1-x86_64.pkg.tar.xz
    When pacman installs the lxappearance package it says the total install size is 0.09 MiB. When I install it from the repos I get a .39 MiB package. Also, when I go to run lxappearance nothing happens. I can see it in /usr/bin, but it simply doesn't run.
    Any tips to get this to work?
    Last edited by tdrusk (2014-03-08 14:33:09)

    Thank you! I was making it too complicated!
    Arch provides 1.5.5, so I just copied the PKGBUILD to /home/tyler/Development/lxappearance.
    Then I edited the PKGBUILD like so:
    #$Id: PKGBUILD 103634 2014-01-08 14:31:20Z bpiotrowski $
    # Maintainer: Bartłomiej Piotrowski <[email protected]>
    # Contributor: Angel Velasquez <[email protected]>
    # Contributor: Geoffroy Carrier <[email protected]>
    pkgname=lxappearance
    pkgver=0.5.5
    pkgrel=1
    pkgdesc='Feature-rich GTK+ theme switcher of the LXDE Desktop'
    arch=('i686' 'x86_64')
    license=('GPL2')
    url='http://lxde.org/'
    groups=('lxde')
    depends=('gtk2' 'dbus-glib')
    makedepends=('intltool')
    source=(http://downloads.sourceforge.net/sourceforge/lxde/$pkgname-$pkgver.tar.xz)
    md5sums=('a67113681d9d0a6d936289909aed5782')
    build() {
    cd /home/tyler/Development/lxappearance/src/lxappearance-0.5.5/
    ./configure --sysconfdir=/etc --prefix=/usr \
    --enable-dbus
    make
    package() {
    cd /home/tyler/Development/lxappearance/src/lxappearance-0.5.5/
    make DESTDIR="$pkgdir" install
    After that, I was able to run makepkg -s and pacman -U lxappearance-0.5.5-1-x86_64.pkg.tar.xz to get it installed and running. Thanks for your help!

  • NEED HELP COMPILING AN APPLET AND FIXING AN ERROR

    Hi this is my applet that i am having a problem compiling.
    import java.applet.*;
    import java.awt.*;
    public class Texts2 extends Applet
         TextArea source;
         TextArea destination;
         Button copy;
         public void init()
              source = new TextArea(10,30);
              add(source);
              copy = new Button("Copy ->");
              add(copy);
              destination = new TextArea(10,30);
              add(destination);
              validate();
         public boolean action(Event evt, Object arg)
              String temp;
              if(evt.target == copy)
                   temp = source.getSelectedText();
                   if (destination.getText() =="")
                        destination.setText(temp);
                   else
                        destination.append(temp);
    }Here is the full error message after i have typed javac Texts2.java in the command prompt:
    Texts2.java:34: missing return statement.
    Note: Texts2.java uses or overides a deprecated API.
    Note: Recompile with -Xlint deprecation for details.
    1 error
    What is the missing return statement?
    What does Recompile with -Xlint deprecation for details mean?
    How do i do this?
    Rafeeq
    Edited by: rafeeq on Jan 9, 2008 1:42 PM

    duffymo wrote:
    you've got three notes, all with the caps lock on, asking for the same lame advice.Actually it was four notes.
    @rafeeq
    Here's another tutorial
    http://java.sun.com/docs/books/tutorial/reallybigindex.html
    comeback when you learn the basics.

  • Urgent: Need Help (compilation)

    I have problems to compile my classes.
    I would like to know if it is possible to make header files like in C language ?
    Because i have this problem
    ---------- --------> ----------
    + Classe 1 + + Classe 2 +
    ---------- <-------- ----------
    (--> meens call method.)
    For the moment i must comment method calls, compile, uncomment and compile again
    Thank You

    That will be fine then, as long as the methods you're calling actually exist in the other class. If it doesn't compile, it means there's a bug...

  • JAVAC: Need help compiling!!

    I'm really new to Java and everything else, so please bare with me. This is what it says when I try to use: "Javac rs.java" to compile it and create the class file "rs.class" to work with the html file "rs.html". I think I'm saying all of this right, I hope. Here are the errors:
    rs.java:114: not a statement
            ioexception;
            ^
    rs.java:122: not a statement
            runtimeexception;
            ^
    rs.java:146: not a statement
            obj;
            ^
    rs.java:148: not a statement
            obj;
            ^
    rs.java:234: not a statement
            obj;
            ^
    rs.java:252: not a statement
            obj;
            ^
    rs.java:321: not a statement
            runtimeexception;
            ^
    rs.java:333: not a statement
            obj;
            ^
    rs.java:336: not a statement
            obj;
            ^
    rs.java:405: not a statement
            obj;
            ^
    rs.java:413: not a statement
            obj;
            ^
    11 errors

    I'm really new to Java and everything else, so please bare with me. Bare with you? Hey buddy, it's not that kind of forum. 8)
    But I can bear with you.
    This is what it says when I try to use:
    "Javac rs.java" to compile it and create the class
    file "rs.class" to work with the html file "rs.html".rs.html is input to that .class file?
    I think I'm saying all of this right, I hope. Here are the errors:Each of these errors tells you the .java file in which it occurred (e.g., rs.java), the line number (e.g., 114) and the problem. You should open that .java file in your favorite editor with line number display turned on, navigate to that line, and stare at the code and the error until you realize what you've done wrong. If you're still not sure, cut & paste the error text into Google and see what it comes back with.
    %

  • Need help determining compiling error

    Good morning,
    I need help finding the cause of a compiling error I receive. I have reviewed my code numerous times without any luck. I hope you guys might see something I am not! The entire file exceeds the limit I can post, so I am attaching it in 2 posts. Sorry for the inconvenience. The error and my code are posted below. Thank you for your help!
    C:\StockTrackerDB.java:382: cannot find symbol
    symbol : method add(java.lang.Boolean)
    location: class java.util.ArrayList<java.lang.String>
                   aList.add(new Boolean(rs.getBoolean("admin")));
    ^
    1 error
    Tool completed with exit code 1
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class StockTrackerDB
         private Connection con = null;
         //Constructor; makes database connection
         public StockTrackerDB() throws ClassNotFoundException,SQLException
              if(con == null)
                   String url = "jdbc:odbc:StockTracker";
                   try
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   catch(ClassNotFoundException ex)
                        throw new ClassNotFoundException(ex.getMessage() +
                                    "\nCannot locate sun.jdbc.odbc.JdbcOdbcDriver");
                   try
                        con = DriverManager.getConnection(url);
                   catch(SQLException ex)
                        throw new SQLException(ex.getMessage()+
                                    "\nCannot open database connection for "+url);
         // Close makes database connection; null reference to connection
         public void close() throws SQLException,IOException,ClassNotFoundException
              con.close();
              con = null;
         // Method to serialize object to byte array
         private byte[] serializeObj(Object obj) throws IOException
              ByteArrayOutputStream baOStream = new ByteArrayOutputStream();
              ObjectOutputStream objOStream = new ObjectOutputStream(baOStream);
              objOStream.writeObject(obj); // object must be Serializable
              objOStream.flush();
              objOStream.close();
              return baOStream.toByteArray(); // returns stream as byte array
         // Method to deserialize bytes from a byte array into an object
         private Object deserializeObj(byte[] buf) throws IOException, ClassNotFoundException
              Object obj = null;
              if(buf != null)
                   ObjectInputStream objIStream = new ObjectInputStream(new ByteArrayInputStream(buf));
                   obj = objIStream.readObject(); //IOException, ClassNotFoundException
              return obj;
         // Methods for adding a record to a table
         // add to the Stocks Table
         public void addStock(String stockSymbol, String stockDesc) throws SQLException, IOException, ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("INSERT INTO Stocks VALUES ('"
                                    +stockSymbol+"'"
                                    +",'"+stockDesc+"')");
              stmt.close();
         // add to the Users table
         public boolean addUser(User user) throws SQLException,IOException,ClassNotFoundException
              boolean result = false;
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              dbUserID = user.getUserID();
              if(getUser(dbUserID) == null)
                   dbLastName = user.getLastName();
                   dbFirstName = user.getFirstName();
                   Password pswd = user.getPassword();
                   isAdmin = user.isAdmin();
                   PreparedStatement pStmt = con.prepareStatement("INSERT INTO Users VALUES (?,?,?,?,?)");
                   pStmt.setString(1, dbUserID);
                   pStmt.setString(2, dbLastName);
                   pStmt.setString(3, dbFirstName);
                   pStmt.setBytes(4, serializeObj(pswd));
                   pStmt.setBoolean(5, isAdmin);
                   pStmt.executeUpdate();
                   pStmt.close();
                   result = true;
              else
                   throw new IOException("User exists - cannot add.");
              return result;
         // add to the UserStocks table
         public void addUserStocks(String userID, String stockSymbol)
                        throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("INSERT INTO UserStocks VALUES ('"
                                    +userID+"'"
                                    +",'"+stockSymbol+"')");
              stmt.close();
         // Methods for updating a record in a table
         // updating the Users table
         public boolean updUser(User user) throws SQLException, IOException, ClassNotFoundException
              boolean result = false;
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              dbUserID = user.getUserID();
              if(getUser(dbUserID) != null)
                   dbLastName = user.getLastName();
                   dbFirstName = user.getFirstName();
                   Password pswd = user.getPassword();
                   isAdmin = user.isAdmin();
                   PreparedStatement pStmt = con.prepareStatement("UPDATE Users SET lastName = ?," + " firstName = ?, pswd = ?, admin = ? WHERE userID = ?");
                   pStmt.setString(1, dbLastName);
                   pStmt.setString(2, dbFirstName);
                   pStmt.setBytes(3, serializeObj(pswd));
                   pStmt.setBoolean(4, isAdmin);
                   pStmt.setString(5, dbUserID);
                   pStmt.executeUpdate();
                   pStmt.close();
                   result = true;
              else
                   throw new IOException("User does not exist - cannot update.");
              return result;
         }

         // Methods for deleting a record from a table
         // delete a record from the Stocks table
         private void delStock(String stockSymbol) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("DELETE FROM Stocks WHERE "
                                    +"symbol = '"+stockSymbol+"'");
              stmt.close();
         // delete a record from the Users table
         public void delUser(User user) throws SQLException,IOException,ClassNotFoundException
              String dbUserID;
              String stockSymbol;
              Statement stmt = con.createStatement();
              try
                   con.setAutoCommit(false);
                   dbUserID = user.getUserID();
                   if(getUser(dbUserID) != null) // verify user exists in database
                        ResultSet rs1 = stmt.executeQuery("SELECT userID, symbol "
                                              +"FROM UserStocks WHERE userID = '"+dbUserID+"'");
                        while(rs1.next())
                             try
                                  stockSymbol = rs1.getString("symbol");
                                  delUserStocks(dbUserID, stockSymbol);
                             catch(SQLException ex)
                                  throw new SQLException("Deletion of user stock holding failed: " +ex.getMessage());
                        } // end of loop thru UserStocks
                        try
                        {  // holdings deleted, now delete user
                             stmt.executeUpdate("DELETE FROM Users WHERE "
                                              +"userID = '"+dbUserID+"'");
                        catch(SQLException ex)
                             throw new SQLException("User deletion failed: "+ex.getMessage());
                   else
                        throw new IOException("User not found in database - cannot delete.");
                   try
                        con.commit();
                   catch(SQLException ex)
                        throw new SQLException("Transaction commit failed: "+ex.getMessage());
              catch (SQLException ex)
                   try
                        con.rollback();
                   catch (SQLException sqx)
                        throw new SQLException("Transaction failed then rollback failed: " +sqx.getMessage());
                   // Transaction failed, was rolled back
                   throw new SQLException("Transaction failed; was rolled back: " +ex.getMessage());
              stmt.close();
         // delete a record from the UserStocks table
         public void delUserStocks(String userID, String stockSymbol) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              ResultSet rs;
              stmt.executeUpdate("DELETE FROM UserStocks WHERE "
                                    +"userID = '"+userID+"'"
                                    +"AND symbol = '"+stockSymbol+"'");
              rs = stmt.executeQuery("SELECT symbol FROM UserStocks "
                                         +"WHERE symbol = '"+stockSymbol+"'");
              if(!rs.next()) // no users have this stock
                   delStock(stockSymbol);
              stmt.close();
         // Methods for listing record data from a table
         // Ordered by:
         //          methods that obtain individual field(s),
         //          methods that obtain a complete record, and
         //          methods that obtain multiple records
         // Methods to access one or more individual fields
         // get a stock description from the Stocks table
         public String getStockDesc(String stockSymbol) throws SQLException, IOException, ClassNotFoundException
              Statement stmt = con.createStatement();
              String stockDesc = null;
              ResultSet rs = stmt.executeQuery("SELECT symbol, name FROM Stocks "
                                                      +"WHERE symbol = '"+stockSymbol+"'");
              if(rs.next())
                   stockDesc = rs.getString("name");
              rs.close();
              stmt.close();
              return stockDesc;
         // Methods to access a complete record
         // get User data from the Users table
         public User getUser(String userID) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              byte[] buf = null;
              User user = null;
              ResultSet rs = stmt.executeQuery("SELECT * FROM Users WHERE userID = '" +userID+"'");
              if(rs.next())
                   dbUserID = rs.getString("userID");
                   dbLastName = rs.getString("lastName");
                   dbFirstName = rs.getString("firstName");
                   // Do NOT use with JDK 1.2.2 using JDBC-ODBC bridge as
                   // SQL NULL data value is not handled correctly.
                   buf = rs.getBytes("pswd");
                   dbPswd=(Password)deserializeObj(buf);
                   isAdmin = rs.getBoolean("admin");
                   user = new User(dbUserID,dbFirstName,dbLastName,dbPswd,isAdmin);
              rs.close();
              stmt.close();
              return user; // User object created for userID
         // Methods to access a list of records
         // get a list of selected fields for all records from the Users Table
         public ArrayList listUsers() throws SQLException,IOException,ClassNotFoundException
              ArrayList<String> aList = new ArrayList<String>();
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT userID, firstName, lastName, admin "
                                                 +"FROM Users ORDER BY userID");
              while(rs.next())
                   aList.add(rs.getString("userID"));
                   aList.add(rs.getString("firstName"));
                   aList.add(rs.getString("lastName"));
                   aList.add(new Boolean(rs.getBoolean("admin")));
              rs.close();
              stmt.close();
              return aList;
         // get all fields in all records for a given user from the UserStocks table
         public ArrayList listUserStocks(String userID) throws SQLException, IOException, ClassNotFoundException
              ArrayList<String> aList = new ArrayList<String>();
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT * FROM UserStocks "
                                                      +"WHERE userID = '"+userID+"' ORDER BY symbol");
              while(rs.next())
                   aList.add(rs.getString("symbol"));
              rs.close();
              stmt.close();
              return aList;
    }

  • A PKGBUILD that helps you compile kernel from local source tree

    I don't know if someone did this beofore. Hours ago I wrote a PKGBUILD file for compiling kernel,
    it is different than the one from abs. It allows you
    compile a kernel from a exiting kernel source tree and leave it clean.
    honor the Archway, this means you have a clean filesystem
    It is acutally because I'm currently playing with The Eudyptula Challenge.
    and I'm tied our compress/decompress a kernel tree all the time. If you are kernel developer, you
    may also find it useful.
    The PKGBUILD file worked on my machine, I will add headers and docs later.
    Oh, almost forgot: here is my PKGBUILD:
    #So we will have a clean src tree
    pkgbase=linux-test
    _kernel_bin=kernel_build
    #the variable you have to provide
    _builddir=kernel_build
    kernel_src_dir='/home/developer/Courses/kernel-base'
    _srcname=kernel_tree
    #end the variable you have to provide
    pkgver=3.8.1
    pkgrel=1
    pkgdesc="The Linux kernel and modules"
    depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
    makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
    optdepends=('crda: to set the correct wireless channels of your country')
    provides=("kernel26${_kernelname}=${pkgver}")
    conflicts=("kernel26${_kernelname}")
    replaces=("kernel26${_kernelname}")
    arch=('i686' 'x86_64')
    url="http://www.kernel.org/"
    license=('GPL2')
    source=(#if we provide this, means kernel compile progress is already done
    "${_kernel_bin}.tar.xz"
    'linux.preset'
    sha256sums=('65847bc847344434657db729d2dde4a408e303ea29ae1409520cecee8da6fc3d'
    '2c2e8428e2281babcaf542e246c2b63dea599abb7ae086fa482081580f108a98')
    #this one strip the linux off
    _kernelname=${pkgbase#linux}
    prepare() {
    #XXX:checked
    #build dir has to be the same as kernel_bin files, then builddir is created
    #automatically by tar
    if [ "${kernel_src_dir}" == "" ];then
    return 1
    fi
    #provide kernel source tree for compile and move modules
    ln -s ${kernel_src_dir} ${srcdir}/${_srcname}
    mkdir -p "${srcdir}/${_srcname}"
    #we need to check here if there exist kernel bin files
    if [ "${_kernel_bin}" == "" ]; then
    make O="${srcdir}/${_builddir}" menuconfig
    fi
    build() {
    #XXX:checked
    cd "${srcdir}/${_srcname}"
    #we need to check here if there exist kernel bin files
    if [ "${_kernel_bin}" == "" ]; then
    #return 1
    make O="${srcdir}/${_builddir}" bzImage modules
    fi
    #otherwise this step is done already done
    _package() {
    #we dont need to worry about mkinitcpio, depmod thing, They are done by
    #install script, we need to provide a preset and install file instead.
    #we build kernel objs on _builddir, and install them in pkgdir
    #install binary files, this means we have a compiled binary tree
    cd "${srcdir}/${_srcname}"
    #echo "$(pwd)"
    KARCH=x86
    install=linux.install
    # get kernel version
    _kernver="$(make O="${srcdir}/${_builddir}" kernelrelease)"
    _kernver=$(echo "${_kernver}" | sed -n 2p -)
    #strip the -dirty away
    _kernver=${_kernver%-*}
    _basekernel=${_kernver%%-*}
    _basekernel=${_basekernel%.*}
    mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
    make O="${srcdir}/${_builddir}" INSTALL_MOD_PATH="${pkgdir}" modules_install
    cp "${srcdir}/${_builddir}"/arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
    # set correct depmod command for install
    cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
    true && install=${install}.pkg
    sed -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" -i "${startdir}/${install}"
    sed "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" -i "${startdir}/${install}"
    # install mkinitcpio preset file for kernel
    install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
    sed \
    -e "1s|'linux.*'|'${pkgbase}'|" \
    -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
    -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
    -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
    # remove build and source links
    rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
    # remove the firmware
    rm -rf "${pkgdir}/lib/firmware"
    # gzip -9 all modules to save 100MB of space
    find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
    # make room for external modules
    ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
    # add real version for building modules and running depmod from post_install/upgrade
    mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
    echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
    # Now we call depmod...
    #echo "Call Depmod"
    cp "${srcdir}/${_builddir}/System.map" System.map
    depmod -b "${pkgdir}" -F System.map "${_kernver}"
    #echo "Called Depmod"
    # move module tree /lib -> /usr/lib
    mkdir -p "${pkgdir}/usr"
    mv "${pkgdir}/lib" "${pkgdir}/usr/"
    # add vmlinux
    install -D -m644 "${srcdir}/${_builddir}/"vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
    pkgname=("${pkgbase}")
    for _p in ${pkgname[@]}; do
    eval "package_${_p}() {
    _package${_p#${pkgbase}}
    done
    and here is the address of it on github
    Last edited by xedchou (2014-12-23 12:41:55)

    Based on the title alone I almost reflexively binned this thread.  Please rename this thread to *something* relating to what you're actually posting.

  • Error when compiling AppleScript for CS2, need help

    I've recently started learning AppleScript, and while I'm no stranger to programming I'm a little lost when it comes to errors like this one. I have both InDesign CS2 and InDesign CS3 installed so I'm not sure if my problem is caused by that, they were installed before I started working on this mac. I've also been recently upgraded from Tiger to Leopard, in case that might be a probable cause.
    Basically, my problem stems from this:
    tell application "Adobe InDesign CS2"
        get active document
    end tell
    When I try to compile this I get a Syntax Error that says "Expected end of line but found class name." and highlights "document". I've also had problems trying to use things like "page 1" or "view preferences" with similar errors. With the case of things like "page 1" I've had to replace it with "item 1 of pages" to get it to compile.
    If I change it to "Adobe InDesign CS3" it works fine, but I need to compile for CS2 for backwards compatability. Strangely, this method works:
    set indesign to application "Adobe InDesign CS2"
    tell indesign
        using terms from application "Adobe InDesign CS3"
            get active document
        end using terms from
    end tell
    Does this mean my CS2 dictionary is broken? I can view it fine from the Script Editor, and I've seen things like "active document" used in example scripts, so this syntax error is confusing me.

    I'm not sure why you're getting that error, but a couple of things:
    Using "document 1" instead of "active document" is not a bad habit,
    because there are cases where active document doesn't work.
    When you compile the scripts, the version is somewhat irrelevant -- when
    you go to run them, they look for a running application of the same creator
    code, and use that. It's a bit like when you double-click on a document in
    the Finder -- it doesn't matter what version of ID you made it in, it will
    try to open in whatever version is running first.
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro

  • Urgent help please - What files needed to compile servlets

    I am trying to compile some servlets but can't. I recently reformatted and forgot how I had configured Tomcat previously.
    What files do I need to compile servlets, and where do I have to save them etc.
    Thanks

    u will require jsdk.jar..
    put this in classpath and then compile ..it will surely compile
    and for compiling ...there is no configuration reqd in tomcat

  • Need help with Math related operations...

    I'm learning JAVA for more than 3 weeks and I really need help...
    I'm using SDK1.4 with Elixir IDE Lite (+patch installed).
    In the following screenshot <http://www.geocities.com/jonny_fyy/pics/java1.png>, I've got this error (when I right-click -> Compile) . Do you know what it means & how can I solve it?
    Here's how it should look if correct (pic scan from lab worksheet)... <http://www.geocities.com/jonny_fyy/pics/lab.jpg>
    Here's my java file... <http://www.geocities.com/jonny_fyy/FahToCeltxt.java>
    Thanks for helping :>

    Hi jonny
    One step ahead:
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class FahToCeltxt extends Applet implements ActionListener {
         TextField msgField ;
         String msg = null;
         int msgValue;
         Label title;
         Button b;
         public void init() {
              title = new Label("Enter degrees in Fahrenheit: ");
              add(title);
              msgField = new TextField (10);
              add(msgField);
    //          msgField.addTextListener(this);
              b = new Button("Convert");
              b.addActionListener(this);
              add(b);
    //     public void textValueChanged(TextEvent event) {
    //          msgValue = Integer.parseInt(msgField.getText());
    //          repaint();
         public void paint (Graphics g) {
              int result = (msgValue - 32) * 5/9 ;
              g.drawString("Degree Centigrade is " + result , 50, 50);
      public void actionPerformed(ActionEvent e) {
              msgValue = Integer.parseInt(msgField.getText());
              repaint();
    }Regards.

Maybe you are looking for