Menu

how to compile sqlb2.4.6 under freebsd4.6?

Help
2002-07-29
2002-07-30
  • Nobody/Anonymous

    Hi !

    I use sqlb for mysql, it seems work fine under redhat7.3, but i can't compile it under freebsd4.6,  it cause something wrong as following

    -----------------------------------------------------------------
    In file included from sqlb.c:8:
    sqlb.h:22: popt.h: No such file or directory
    *** Error code 1
    ----------------------------------------------------------------------

    I had installed "popt" in bsd and I could find the file popt.h in /usr/local/include directory.

    Any sugesstion. Thanks!

     
    • Frédéric RUAUDEL

      OK, sorry for the pain !

      The problem comes from a miss in the configure.ac file. I will try to fix it for the next version.

      In the meantime, here is a little hack so that you can compile sqlb :

      Modify each header file that report this error by replacing :

      #include <popt.h>

      by

      #include "/usr/local/include/popt.h"

      But you must check that the ./configure script have found the lib during the check otherwise you may have an error at link time.

      I know it's a nasty solution but it must works fine ;)

      If you have other problems, don't hesitate to post a reply !!

      good luck and thanks for using SQLB !

      GrumZ

       
    • Nobody/Anonymous

      Thanks for reply. But i still get something wrong when make files. The error as following

      ------------------------------------------------------------------------------
      Making all in sqlb
      source='sqlb.c' object='sqlb.o' libtool=no  depfile='.deps/sqlb.Po' tmpdepfile='.deps/sqlb.TPo'  depmode=gcc /usr/local/bin/bash ../../depcomp  gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../libpconf -I../libsqlblog   -INONE/include  -O2 -Wall -c `test -f 'sqlb.c' || echo './'`sqlb.c

      In file included from sqlb.h:33,
                       from sqlb.c:8:
      ../include/sqlb_common.h:202: redefinition of `union semun'
      sqlb.c: In function `main':
      sqlb.c:124: warning: assignment discards qualifiers from pointer target type
      *** Error code 1

      -------------------------------------------------------------------------------

       
    • Frédéric RUAUDEL

      This problem comes from an incompatibility between freebsd and other unixes.

      under freedsb, the function semctl() in declared as the following :

      semctl (int, int, int, union semun)

      and on other unixes it is declared like this :

      semctl (int, int, int, ...)

      So under other unixes, the "union semun" is not declared in system header file contrary to Freebsd.

      So I can prepare you a fix but I need the declaration of this union on your system.

      It must be declared in /usr/include/sys/sem.h or in /usr/include/sys/ipc.h and must look like the following :

      union semun {
           int     val;  
           struct  semid_ds *buf;
           u_short *array;
      };

      GrumZ

       

Log in to post a comment.

Auth0 Logo