Re: FreeBSD: Asterisk compile error: sql.h not found

From: Erik Norgaard (none@norgaard--locolomo.org.lh.bsd-dk.dk)
Date: Fri 11 Jun 2004 - 16:58:58 CEST


Date: Fri, 11 Jun 2004 16:58:58 +0200 (CEST)
From: Erik Norgaard <none@norgaard--locolomo.org.lh.bsd-dk.dk>
To: bsd-dk@bsd-dk.dk
Subject: Re: FreeBSD: Asterisk compile error: sql.h not found

On Fri, 11 Jun 2004, Phil Regnauld wrote:

> On Fri, Jun 11, 2004 at 02:21:33PM +0200, Erik Norgaard wrote:
> > Jeg har forsøgt at installere asterisk fra ports, men det fejler
> > med følgende:
> >
> > cdr_odbc.c:31:17: sql.h: No such file or directory
> > cdr_odbc.c:32:20: sqlext.h: No such file or directory
> > cdr_odbc.c:33:22: sqltypes.h: No such file or directory
>
> Hvilken version ? Har du aktiveret SQL ?

Sorry,

FreeBSD 5.2-CURRENT
ports opdateret idag (- jeg har tidligere prøvet men da var
   asterisk makeret "broken" pga. bug i OpenH323).
unixODBC 2.2.8

OpenH323 er så vidt jeg ved ikke længere 'broken'.

> For mig var det kun:
>
> # portinstall asterisk

Det burde vel ikke gøre en forskel om man installerede på den
klassiske måde med 'make install clean' eller med portinstall?

Der er intet "FORBIDDEN" i de Makefiler du nævner.

Mvh Erik

Sidste utput fra make:
cc -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Iinclude -I../include -D_REENTRANT
-D_GNU_SOURCE -march=i386 -DASTERISK_VERSION=\"0.9.0\"
-DINSTALL_PREFIX=\"/usr/local\"
-DASTETCDIR=\"/usr/local/etc/asterisk\"
-DASTLIBDIR=\"/usr/local/lib/asterisk\"
-DASTVARLIBDIR=\"/usr/local/share/asterisk\"
-DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\"
-DASTLOGDIR=\"/var/log/asterisk\"
-DASTCONFPATH=\"/usr/local/etc/asterisk/asterisk.conf\"
-DASTMODDIR=\"/usr/local/lib/asterisk/modules\"
-DASTAGIDIR=\"/usr/local/share/asterisk/agi-bin\"
-DBUSYDETECT_MARTIN -DNEW_PRI_HANGUP -fPIC -c -o
cdr_odbc.o cdr_odbc.c
cdr_odbc.c:31:17: sql.h: No such file or directory
cdr_odbc.c:32:20: sqlext.h: No such file or directory
cdr_odbc.c:33:22: sqltypes.h: No such file or directory
cdr_odbc.c:49: error: syntax error before "ODBC_env"
cdr_odbc.c:49: warning: type defaults to `int' in declaration of `ODBC_env'
cdr_odbc.c:49: error: `SQL_NULL_HANDLE' undeclared here (not in a function)
cdr_odbc.c:49: warning: data definition has no type or storage class
cdr_odbc.c:50: error: syntax error before "ODBC_con"
cdr_odbc.c:50: warning: type defaults to `int' in declaration of `ODBC_con'
cdr_odbc.c:50: warning: data definition has no type or storage class
cdr_odbc.c:51: error: syntax error before "ODBC_stmt"
cdr_odbc.c:51: warning: type defaults to `int' in declaration of `ODBC_stmt'
cdr_odbc.c:51: warning: data definition has no type or storage class
cdr_odbc.c: In function `odbc_log':
cdr_odbc.c:99: warning: implicit declaration of function `SQLAllocHandle'
cdr_odbc.c:99: error: `SQL_HANDLE_STMT' undeclared (first use in this function)
cdr_odbc.c:99: error: (Each undeclared identifier is reported only once
cdr_odbc.c:99: error: for each function it appears in.)
cdr_odbc.c:101: error: `SQL_SUCCESS' undeclared (first use in this function)
cdr_odbc.c:101: error: `SQL_SUCCESS_WITH_INFO' undeclared (first use in this function)
cdr_odbc.c:105: warning: implicit declaration of function `SQLGetDiagRec'
cdr_odbc.c:105: error: `SQL_HANDLE_DBC' undeclared (first use in this function)
cdr_odbc.c:106: warning: implicit declaration of function `SQLFreeHandle'
cdr_odbc.c:116: warning: implicit declaration of function `SQLPrepare'
cdr_odbc.c:116: error: `SQL_NTS' undeclared (first use in this function)
cdr_odbc.c:129: warning: implicit declaration of function `SQLBindParameter'
cdr_odbc.c:129: error: `SQL_PARAM_INPUT' undeclared (first use in this function)
cdr_odbc.c:129: error: `SQL_C_CHAR' undeclared (first use in this function)
cdr_odbc.c:129: error: `SQL_CHAR' undeclared (first use in this function)
cdr_odbc.c:138: error: `SQL_C_SLONG' undeclared (first use in this function)
cdr_odbc.c:138: error: `SQL_INTEGER' undeclared (first use in this function)
cdr_odbc.c: In function `odbc_unload_module':
cdr_odbc.c:200: error: `SQL_HANDLE_STMT' undeclared (first use in this function)
cdr_odbc.c:201: warning: implicit declaration of function `SQLDisconnect'
cdr_odbc.c:202: error: `SQL_HANDLE_DBC' undeclared (first use in this function)
cdr_odbc.c:203: error: `SQL_HANDLE_ENV' undeclared (first use in this function)
cdr_odbc.c: In function `odbc_do_query':
cdr_odbc.c:384: warning: implicit declaration of function `SQLExecute'
cdr_odbc.c:386: error: `SQL_SUCCESS' undeclared (first use in this function)
cdr_odbc.c:386: error: `SQL_SUCCESS_WITH_INFO' undeclared (first use in this function)
cdr_odbc.c:390: error: `SQL_HANDLE_DBC' undeclared (first use in this function)
cdr_odbc.c:391: error: `SQL_HANDLE_STMT' undeclared (first use in this function)
cdr_odbc.c: In function `odbc_init':
cdr_odbc.c:411: error: `SQL_NULL_HANDLE' undeclared (first use in this function)
cdr_odbc.c:413: error: `SQL_HANDLE_ENV' undeclared (first use in this function)
cdr_odbc.c:415: error: `SQL_SUCCESS' undeclared (first use in this function)
cdr_odbc.c:415: error: `SQL_SUCCESS_WITH_INFO' undeclared (first use in this function)
cdr_odbc.c:423: warning: implicit declaration of function `SQLSetEnvAttr'
cdr_odbc.c:423: error: `SQL_ATTR_ODBC_VERSION' undeclared (first use in this function)
cdr_odbc.c:423: error: `SQL_OV_ODBC3' undeclared (first use in this function)
cdr_odbc.c:434: error: `SQL_HANDLE_DBC' undeclared (first use in this function)
cdr_odbc.c:445: warning: implicit declaration of function `SQLSetConnectAttr'
cdr_odbc.c:445: error: `SQL_LOGIN_TIMEOUT' undeclared (first use in this function)
cdr_odbc.c:445: error: `SQLPOINTER' undeclared (first use in this function)
cdr_odbc.c:445: error: syntax error before ')' token
cdr_odbc.c:448: warning: implicit declaration of function `SQLConnect'
cdr_odbc.c:448: error: `SQLCHAR' undeclared (first use in this function)
cdr_odbc.c:448: error: syntax error before ')' token
gmake[1]: *** [cdr_odbc.o] Error 1
gmake[1]: Leaving directory `/usr/ports/net/asterisk/work/asterisk-0.9.0/cdr'
gmake: *** [subdirs] Error 1
*** Error code 2

Stop in /usr/ports/net/asterisk.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall12233.0 make
** Fix the problem and try again.
** Listing the failed packages (*:skipped / !:failed)
        ! net/asterisk (missing header)
---> Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed

>
> If this aborts, you fix the problem then do 'portinstall asterisk' (it will
> continue more or less where it left off).
>
> # vi /usr/ports/devel/pwlib/Makefile
> comment out the FORBIDDEN line
>
> # vi /usr/ports/net/openh323/Makefile
> comment out the FORBIDDEN line
>

GnuPG Key: http://www.locolomo.org/home/norgaard/norgaard.gpg.asc
pub 1024D/B02CC311 2004-04-05 Erik Norgaard <none@norgaard--locolomo.org.lh.bsd-dk.dk>
     Key fingerprint = 6C11 B9B1 52BD F16D 34AD 9893 D3EC E6DB B02C C311



This archive was generated by hypermail 2b30 : Wed 15 Nov 2006 - 18:24:41 CET