Menu

My experience installing Whitebeam.

2007-05-29
2013-05-20
  • John Jorgensen

    John Jorgensen - 2007-05-29

    I've had good results installing the CVS (updated yesterday) version of whitebeam on a fedora core 6 system with stock apache (2.2.4) and apr. There were some things in the instructions which I stumbled over.

    In the GETSTARTED doc, it doesn't mention the (possibly obvious) fact that an OS user whitebeam needs to be created or the pg_hba.conf file has to be adjusted to allow a whitebam user.

    It was unclear from the docs which sql I should use to initialize the database. templates/pgsql/schema_file2.sql turns out to be the right init file I think.

    Other then those two issues, the installation was simple and now I'm porting a php application to whitebeam to see how it goes.

     
    • Peter Wilson

      Peter Wilson - 2007-05-30

      Thanks for that - much appreciated. I'm currently writing and more complete installation instructions - including how to install from RPM so your feedback is very timely. In the RPM installation the correct sql definition file to be installed in /var/whitebeam/docs - that's the one that'll be referenced from the documentation. The one you used is however the right one!

      Operating system user : you shouldn't need to do that (although I haven't checked the default pg_hba.conf file. You do need to make Postgres listen for TCP connections (set the listen_addresses parameter in postgresql.conf). You then run the templates with :

         {template} -Dwhitebeam -Uwhitebeam -o :portnum

      eg for contact template
         /var/whitebeam/bin/contacts-pgsql -Dwhitebeam -Uwhitebeam -o :9502

       
    • pablo

      pablo - 2007-06-03

      Hi.

      After a few attempts to configure/install whitebeam, I finally got it when I tried the CVS version.

      I'm looking for a server-side JS solution. I'm interested in the JS part of Whitebem, without the templates or PSQL part.Is this possible?

      I've installed the Apache module to give it a try, but my server keeps logging this, over and over:

        terminate called after throwing an instance of 'CrbLogException*'
        terminate called after throwing an instance of 'CrbLogException*'
        terminate called after throwing an instance of 'CrbLogException*'
        terminate called after throwing an instance of 'CrbLogException*'
        ...

      followed by:

        [Sun Jun 03 13:09:46 2007] [notice] child pid 4572 exit signal Aborted (6)
        [Sun Jun 03 13:09:46 2007] [notice] child pid 4573 exit signal Aborted (6)
        [Sun Jun 03 13:09:46 2007] [notice] child pid 4574 exit signal Aborted (6)
        [Sun Jun 03 13:09:46 2007] [notice] child pid 4575 exit signal Aborted (6)
        ...

      My Apache configuration bit for WB is:

      <IfDefine WBJS>
              LoadModule whitebeam_module /usr/lib/libwhitebeam2.so

              AddHandler whitebeam-handler .rhtm
              AddHandler whitebeam-handler .whtm

              # Whitebeam can segregate data based on Virtual-Server
              # The following line specifies a mandatory default value.
              # RBClient $Whitebeam$ 1

              # Whitebeam almost always needs a context server to operate.
              # The following line indicates that it will be started running on
              # port 9501 of the local machine.
              # RBTemplate context   tcp "localhost:9501"

              DirectoryIndex   index.html index.rhtm index.whtm
      </IfDefine>

      (I installed it with --prefix=/usr ). I also tried to uncomment the RBCLient and RBTemplate lines with the same result. Anyway I'd like to have the pure JS interpreter without the database or template server (or have it as an option)

      Help would be very much appreciated...

      Thanks

      Pablo.

       
      • John Jorgensen

        John Jorgensen - 2007-06-03

        I tried to separate out the js part of this module at first, but because I'm too lazy (and possibly not bright enough) to learn the guts of the system, I decided to just install all of the components and use the pieces that I needed. It turns out that the templates save a lot of work for things like authentication and session management. You could use the same strategy (assuming you have access to postgresql) and prune away the stuff you don't need later.

         
      • rick sunix

        rick sunix - 2008-04-29

        Hi

        I am trying to install whitebeam , every version of it is giving error. I have tried latest whitebeam_1_1_5.tar.gz package.
        I get an error :

        XmlPageGen/XmlPostgresCore.cxx: In member function `void
           CrbPgsqlConnection::Close(unsigned char)':
        XmlPageGen/XmlPostgresCore.cxx:499: `PGTransactionStatusType' undeclared (first
           use this function)
        XmlPageGen/XmlPostgresCore.cxx:499: (Each undeclared identifier is reported
           only once for each function it appears in.)
        XmlPageGen/XmlPostgresCore.cxx:499: parse error before `=' token
        XmlPageGen/XmlPostgresCore.cxx:500: `status' undeclared (first use this
           function)
        XmlPageGen/XmlPostgresCore.cxx:500: `PQTRANS_ACTIVE' undeclared (first use this
           function)
        XmlPageGen/XmlPostgresCore.cxx:500: `PQTRANS_INTRANS' undeclared (first use
           this function)
        XmlPageGen/XmlPostgresCore.cxx:500: `PQTRANS_INERROR' undeclared (first use
           this function)
        XmlPageGen/XmlPostgresCore.cxx: In member function `CrbPgsqlResult*
           CrbPgsqlConnection::ExecuteParams(const char*, int, const char**, const
           int*, const int*)':
        XmlPageGen/XmlPostgresCore.cxx:578: `PQexecParams' undeclared (first use this
           function)
        make[2]: *** [XmlPageGen/XmlPostgresCore.o] Error 1
        make[1]: *** [subdirs] Error 1
        make[1]: Leaving directory `/test/whitebeam'

        can`t go ahead with the installation .
        I am not a expert on linux and is in need of help from someone.

        I am using SUSE-8.2 SLES , apache 1.3 and pgsql 7.3 & pgsql 8.1.9 .

        Thanks in Advance.

         
    • Peter Wilson

      Peter Wilson - 2008-04-29

      I'd guess that the build is finding the header files for Postgres 7.3 rather than 8.1.9.

      In your other message you say you have three versions of Apache installed as well as the two versions of Postgres. If you do that you have to be very careful that when you build new applications they see the right headers.

      When you run configure while building Whitebeam you'll probably need to use the following switches :
      --with-pgsql : to point to the standard postgres user header files and
      --with-pgsql_server : to point to the server files.

      If you have multiple versions of Apache you should also make sure the Whitebeam build finds the headers for the version of Apache you want to use.

      There's a very good chance Whitebeam will fail to build for versions of Postgres earlier than version 8. It's a long time since I've tried to build against anything earlier than version 8 - which was released over 3 years ago now. 7.3 is positively ancient.

      Pete

       
    • rick sunix

      rick sunix - 2008-04-30

      OK Thanks

      I have done that
      Now i tried on a different machine having apache1.3 and postgresql 8.3.0
      I used --enable-pgsql , --with-http_headers=/.../apache-1.3/include , --with-pgsql=/..../pgsql(posgresdirectory)
      Now it is finding all the headers for apache & pgsql
      but , its giving a another error :

      #########################################################################################################################

      ===> shell

      make[1]: Leaving directory `/home/test/CVS/whitebeam'
      make[1]: Entering directory `/home/test/CVS/whitebeam'
      ===> js
      make[2]: Nothing to be done for `bin'.

      ===> common
      ===> tgen
      g++    -c TempCompiler.cxx -o TempCompiler.o
      g++    -c -g -O2 -I/home/test/CVS/whitebeam/include -DHAVE_CONFIG_H  -I/home/test/pgsql8.3/include -I/home/test/pgsql8.3/include/server -I/home/test/postgresql-8.3.0/src/include -I/home/test/CVS/whitebeam/common -I/home/test/CVS/whitebeam/presentation -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include -I/usr/include/openssl -I/home/test/CVS/whitebeam/include  TempCompiler.cxx -o TempCompiler.o
      g++    -c XmlApacheContextStub.cxx -o XmlApacheContextStub.o
      g++    -c -g -O2 -I/home/test/CVS/whitebeam/include -DHAVE_CONFIG_H  -I/home/test/pgsql8.3/include -I/home/test/pgsql8.3/include/server -I/home/test/postgresql-8.3.0/src/include -I/home/test/CVS/whitebeam/common -I/home/test/CVS/whitebeam/presentation -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include -I/usr/include/openssl -I/home/test/CVS/whitebeam/include  XmlApacheContextStub.cxx -o XmlApacheContextStub.o
      g++ TempCompiler.o XmlApacheContextStub.o -lRBpres_pic  -lpq -lcrbembsql_pic -lRBcommon_pic -lm -lcrypto -ldb1  -L/home/test/CVS/whitebeam/lib -L/home/test/pgsql8.3/lib -L/usr/local/ssl/lib -ljs -ljs  -o tgen
      /home/test/pgsql8.3/lib/libpq.so: undefined reference to `dlerror'
      /home/test/pgsql8.3/lib/libpq.so: undefined reference to `dlclose'
      /home/test/pgsql8.3/lib/libpq.so: undefined reference to `dlopen'
      /home/test/pgsql8.3/lib/libpq.so: undefined reference to `dlsym'
      collect2: ld returned 1 exit status
      make[3]: *** [tgen] Error 1
      make[2]: *** [subdirs] Error 1
      make[1]: *** [subdirs] Error 1
      make[1]: Leaving directory `/home/test/CVS/whitebeam'
      make: *** [all] Error 2

      #################################################################################################################################

      above : /home/test/CVS/whitebeam is the package
              /home/test/pgsql8.3 is the pgsql directory
      Basically , the error starts after the "tgen" part

      Is there some dependency ?

       
    • Peter Wilson

      Peter Wilson - 2008-04-30

      Those are calls to the Posix dynamic linking API. We don't use those directly in Whitebeam.

      The error references the unresolved symbol in libpq.so - so it's something in Postgres that causes the problem.

      I assume the error shows up in tgen because it's the first executable in the build that's linked.

      Does postgres run OK on the system? Have you successfully initialised a database (initdb), started the postmaster and attached using 'psql'? If so then I guess there may be another library to which we may need to link on Suse.

      I've just successfully build Whitebeam on SUSE 10.3 (first time I've installed SUSE) after building Postgres 8.3.1 from sources.

      Doing some Google shows people having similar problems with mySQL, openSSL builds and others. There *may* be a need to link with '-ldl' - although if Postgres has been build successfully I have no idea why we'd need to explicitly link with a separate library. You could try adding that to the 'Makefile' in whitebeam/commom/tgen and see what happens.

      Pete

       
    • rick sunix

      rick sunix - 2008-05-02

      Thanks Again,

      I got it installed by using -ldl in Makefile.

      But now there seems to be an error whenever i try to run the templates.
      Whitebeam[2532]: Syntax Table Error in  ===============> XML '' line 4294967295:Can't open specified filename : ''

      And when i tried to start the apache with whitebeam configurations added to that httpd.conf file , i got many errors . It was like watching a the output using "tail -f " command. I was unable to stop them. so, i was left with only one option i.e. to restart the server. It was displaying the error output on all the termials .I cannot afford to restart the server again & again , so i cannot try to start the apache to again with whitebeam.
      Sorry i was unable to take that error output for apache at that time .

      Is there some problem between PGSQL & whitebeam ?

      Thanks in Advance

      Ricky

       
      • Peter Wilson

        Peter Wilson - 2008-05-09

        We've tweaked the configure scripts now to check for the need for the Posix dynamic linking library (libdl).

        Whitebeam 'configure' will now test for the dynamic link calls first without - then with -ldl. If required (which at least some releases of SUSE do) it will include the library in the Whitebeam make files.

        Pete

         
    • Peter Wilson

      Peter Wilson - 2008-05-02

      It's not a problem with Postgres/Whitebeam.

      Whitebeam loads a number of configuration files at run-time. It looks like it's complaining that it can't open those files. They either don't exist (at least where Whitebeam is looking) or the access permissions are such that it can't open them.

      Assuming you didn't change any configuration parameters and you have run "make install" - Whitebeam will have been installed in '/var/whitebeam'. The configuration files it's trying to load should then be in :
          /var/whitebeam/conf
      and sub-directories thereof.

      There are two main sets of files loaded :
         *.syn in '/var/whitebeam/conf' - these define XML and HTML syntax rules
         *.tmpl in '/var/whitebeam/conf/templates' - which define the XML service API to the templates.

      Check they exist and are accessible to the user you're using to run Apache (which is configured in the Apache configuration files).

      A better way to test Apache configurations is to start a single process. Use httpd -X (or httpd2 -X or whatever your Apache installation uses).

      Pete

       
    • rick sunix

      rick sunix - 2008-05-05

      Hi Pete ,

      Thanks a lot,
      I was able to installed and run with apache using module.
      I was using the prefix and installing in other directory then default ( /var )directory, that was biggest problem during installation.

      Thanks a again for your support & help

      ricky

       
    • rick sunix

      rick sunix - 2008-05-08

      Hi ,

      One of my developer has ask me to recompile whitebeam with GD option.
      I downloaded the gd and installed it too. but while compiling with whitebeam it gives errors , that i have pasted below :
      ##############################################################################################################################
      g++    -c -g -O2 -I/home/test/CVS/whitebeam/include -DHAVE_CONFIG_H  -I/test/pgsql8.3/include -I/test/pgsql8.3/include/server -I/home/test/postgresql-8.3.0/src/include -I/home/test/CVS/whitebeam/common -I/home/test/CVS/whitebeam/presentation -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include -I/usr/include/openssl -DRB_XMLIF_DEBUG=1 -I /home/test/CVS/whitebeam/include  XmlPageGen/XmlGdImage.cxx -o XmlPageGen/XmlGdImage.o
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL CrbGdImage::Create(long
         int, long int, unsigned char)':
      XmlPageGen/XmlGdImage.cxx:129: `gdImageCreateTrueColor' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:129: (Each undeclared identifier is reported only
         once for each function it appears in.)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::MakeFromData(const UINT_8*, unsigned int, int)':
      XmlPageGen/XmlGdImage.cxx:174: `gdImageCreateFromGifPtr' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:177: `gdImageCreateFromJpegPtr' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:180: `gdImageCreateFromPngPtr' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:183: `gdImageCreateFromGdPtr' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:186: `gdImageCreateFromGd2Ptr' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:189: `gdImageCreateFromWBMPPtr' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::MakeFromFile(FILE*, int)':
      XmlPageGen/XmlGdImage.cxx:212: `gdImageCreateFromGif' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx: In member function `void*
         CrbGdImage::GetRawImage(int, int&, int)':
      XmlPageGen/XmlGdImage.cxx:246: `gdImageGifPtr' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::CopyRect(CrbGdImage*, long int, long int, long int, long int,
         long int, long int, long int, long int, long int)':
      XmlPageGen/XmlGdImage.cxx:290: `gdImageCopyResampled' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::CopyRectRotate(CrbGdImage*, long int, long int, long int, long
         int, double, double, long int)':
      XmlPageGen/XmlGdImage.cxx:315: `gdImageCopyRotated' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL CrbGdImage::Sharpen(long
         int)':
      XmlPageGen/XmlGdImage.cxx:328: `gdImageSharpen' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `INT_32
         CrbGdImage::AllocColour(unsigned char, long int, long int, long int, long
         int)':
      XmlPageGen/XmlGdImage.cxx:359: `gdImageColorResolveAlpha' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:365: `gdImageColorAllocateAlpha' undeclared (first
         use this function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL CrbGdImage::SetClip(long
         int, long int, long int, long int)':
      XmlPageGen/XmlGdImage.cxx:379: `gdImageSetClip' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::DrawLine(long int, long int, long int, long int, long int,
         unsigned char)':
      XmlPageGen/XmlGdImage.cxx:442: `gdImageSetAntiAliased' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:443: `gdAntiAliased' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::DrawPolygon(gdPoint*, int, long int, unsigned char, unsigned
         char, unsigned char)':
      XmlPageGen/XmlGdImage.cxx:496: `gdImageOpenPolygon' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL CrbGdImage::DrawArc(long
         int, long int, long int, long int, long int, long int, long int, long int,
         unsigned char)':
      XmlPageGen/XmlGdImage.cxx:521: `gdNoFill' undeclared (first use this function)
      XmlPageGen/XmlGdImage.cxx:523: `gdArc' undeclared (first use this function)
      XmlPageGen/XmlGdImage.cxx:525: `gdChord' undeclared (first use this function)
      XmlPageGen/XmlGdImage.cxx:529: `gdEdged' undeclared (first use this function)
      XmlPageGen/XmlGdImage.cxx:533: `gdImageFilledEllipse' undeclared (first use
         this function)
      XmlPageGen/XmlGdImage.cxx:535: `gdImageFilledArc' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `RB_BOOL
         CrbGdImage::SetThickness(int)':
      XmlPageGen/XmlGdImage.cxx:567: `gdImageSetThickness' undeclared (first use this
         function)
      XmlPageGen/XmlGdImage.cxx: In member function `int CrbGdImage::CountColours()
         const':
      XmlPageGen/XmlGdImage.cxx:594: `gdImageTrueColor' undeclared (first use this
         function)
      make[2]: *** [XmlPageGen/XmlGdImage.o] Error 1
      make[1]: *** [subdirs] Error 1
      make[1]: Leaving directory `/home/test/CVS/whitebeam'
      make: *** [all] Error 2
      #######################################################################################

      i have tried many possibilities but can`t make whats wrong !!!
      Also the problem for whitebeam is that, there is not much help available than in this forum.

      Thanks in advance

       
      • Peter Wilson

        Peter Wilson - 2008-05-08

        Also :
        > Also the problem for whitebeam is that, there is not much help available than in this forum.

        If you have suggestions for alternative forms of help then please do let us know. I assume you've also found the Whitebeam web-site (http://www.whitebeam.org) that has a lot of information about Whitebeam.

        Pete

         
      • Peter Wilson

        Peter Wilson - 2008-05-08

        This looks similar to your previous problems with Whitebeam picking up the wrong version of 'gd.h'. If it couldn't find gd.h at all then that would report an error.

        I've just downloaded and build libgd on SUSE 10.3. I downloaded gd-2.0.35.tar.gz from http://www.libgd.org/releases/

        and installed in the default location ;
        ./configure
        make
        make install

        Which installed 'gd.h' in /usr/local/include

        I then configured Whitebeam with --enable-gd and built

        This gave no errors at all.

        If you're picking up a very early version of libgd (eg 1.x) I think they changed the API.

        Try :
        find /usr -name "gd.h" -print

        And see whether there are other versions installed on your system.

        Pete

         
    • Peter Wilson

      Peter Wilson - 2008-05-08

      This looks similar to your previous problems with Whitebeam picking up the wrong version of 'gd.h'. If it couldn't find gd.h at all then that would report an error.

      I've just downloaded and build libgd on SUSE 10.3. I downloaded gd-2.0.35.tar.gz from http://www.libgd.org/releases/

      and installed in the default location ;
        ./configure
        make
        make install

      Which installed 'gd.h' in /usr/local/include

      I then configured Whitebeam with --enable-gd and built

      This gave no errors at all.

      If you're picking up a very early version of libgd (eg 1.x) I think they changed the API.

      Try :
         find /usr -name "gd.h" -print

      And see whether there are other versions installed on your system.

      Pete

       

Log in to post a comment.