pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/38351: Problem compiling app_curl module in asterisk



>Number:         38351
>Category:       pkg
>Synopsis:       Problem compiling app_curl module in asterisk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 01 09:15:00 +0000 2008
>Originator:     Miro Voutilainen
>Release:        NetBSD 4.0 (GENERIC)
>Organization:
>Environment:
NetBSD spion.voutilainen.net 4.0 NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:20:10 
PST 2007  
builds@wb34:/home/builds/ab/netbsd-4-0-RELEASE/i386/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/i386/compile/GENERIC
 i386

>Description:
app_curl.c wont compile on asterisk-1.2.27 (and earlier versions).
This ending up in that app_curl.so doesnt exist in 
/usr/pkg/include/asterisk/modules and cannot be used.

>How-To-Repeat:
[10:34:43] [root@spion:]$ gcc -pipe -O2 -I/usr/include  -pipe  -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3  -Iinclude 
-I../include -D_REENTRANT -D_GNU_SOURCE            -fomit-frame-pointer  
-D__Darwin__ -DPOLLCOMPAT -I//Volumes/pkgsrc-bulk/prefix/include 
-L//Volumes/pkgsrc-bulk/prefix/lib -fPIC -no-cpp-precomp -I/usr/include -c -o 
app_curl.o app_curl.c          gcc: unrecognized option '-no-cpp-precomp'
app_curl.c:29:23: error: curl/curl.h: No such file or directory
In file included from app_curl.c:35:
../include/asterisk/lock.h:646:1: warning: "pthread_mutex_lock" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:285:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:647:1: warning: "pthread_mutex_unlock" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:287:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:648:1: warning: "pthread_mutex_trylock" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:286:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:649:1: warning: "pthread_mutex_init" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:284:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:650:1: warning: "pthread_mutex_destroy" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:288:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:652:1: warning: "pthread_cond_init" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:306:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:653:1: warning: "pthread_cond_destroy" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:311:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:654:1: warning: "pthread_cond_signal" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:307:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:655:1: warning: "pthread_cond_broadcast" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:308:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:656:1: warning: "pthread_cond_wait" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:309:1: warning: this is the location of the previous 
definition
In file included from app_curl.c:35:
../include/asterisk/lock.h:657:1: warning: "pthread_cond_timedwait" redefined
In file included from ../include/asterisk/lock.h:26,
                 from app_curl.c:35:
/usr/include/pthread.h:310:1: warning: this is the location of the previous 
definition
app_curl.c: In function 'curl_internal':
app_curl.c:95: error: 'CURL' undeclared (first use in this function)
app_curl.c:95: error: (Each undeclared identifier is reported only once
app_curl.c:95: error: for each function it appears in.)
app_curl.c:95: error: 'curl' undeclared (first use in this function)
app_curl.c:97: warning: implicit declaration of function 'curl_easy_init'
app_curl.c:103: warning: implicit declaration of function 'curl_easy_setopt'
app_curl.c:103: error: 'CURLOPT_URL' undeclared (first use in this function)
app_curl.c:104: error: 'CURLOPT_WRITEFUNCTION' undeclared (first use in this 
function)
app_curl.c:105: error: 'CURLOPT_WRITEDATA' undeclared (first use in this 
function)
app_curl.c:106: error: 'CURLOPT_USERAGENT' undeclared (first use in this 
function)
app_curl.c:109: error: 'CURLOPT_POST' undeclared (first use in this function)
app_curl.c:110: error: 'CURLOPT_POSTFIELDS' undeclared (first use in this 
function)
app_curl.c:113: warning: implicit declaration of function 'curl_easy_perform'
app_curl.c:114: warning: implicit declaration of function 'curl_easy_cleanup'
app_curl.c: In function 'unload_module':
app_curl.c:226: warning: implicit declaration of function 'curl_global_cleanup'
app_curl.c: In function 'load_module':
app_curl.c:235: warning: implicit declaration of function 'curl_global_init'
app_curl.c:235: error: 'CURL_GLOBAL_ALL' undeclared (first use in this function)

>Fix:
I've managed to compile app_curl.c by adding -I/usr/pkg/include to the 
compiling-line. But further compiling the app_curl.o I havent done yet.

So, instead of:
gcc -pipe -O2 -I/usr/include  -pipe  -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wmissing-declarations -g3  -Iinclude -I../include 
-D_REENTRANT -D_GNU_SOURCE            -fomit-frame-pointer  -D__Darwin__ 
-DPOLLCOMPAT -I//Volumes/pkgsrc-bulk/prefix/include 
-L//Volumes/pkgsrc-bulk/prefix/lib -fPIC -no-cpp-precomp -I/usr/include -c -o 
app_curl.o app_curl.c

Compile with:
gcc -pipe -O2 -I/usr/include  -pipe  -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wmissing-declarations -g3  -Iinclude -I../include 
-D_REENTRANT -D_GNU_SOURCE            -fomit-frame-pointer  -D__Darwin__ 
-DPOLLCOMPAT -I//Volumes/pkgsrc-bulk/prefix/include 
-L//Volumes/pkgsrc-bulk/prefix/lib -fPIC -no-cpp-precomp -I/usr/include 
-I/usr/pkg/include -c -o app_curl.o app_curl.c

This due to curl.h is located in /usr/pkg/include/curl/curl.h and not in 
/usr/include.



Home | Main Index | Thread Index | Old Index