This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: compiling error core.c in mapcache with cygwin


Hello Marco,

After getting some replies about mapcache in the mapserver forum (http://osgeo-org.1560.x6.nabble.com/compiling-error-core-c-in-mapcache-with-cygwin-td5179881.html#a5180931), I have the impression that apr has some issues in cygwin. Using this "thread-sample.c" (http://dev.ariel-networks.com/apr/apr-tutorial/sample/thread-sample.c) with

gcc -Wall $(apr-1-config --cflags --cppflags --includes --link-ld)  thread-sample.c

I got:

$ gcc -Wall $(apr-1-config --cflags --cppflags --includes --link-ld) thread-sample.c
thread-sample.c: In function ‘main’:
thread-sample.c:46:5: warning: implicit declaration of function ‘apr_threadattr_create’ [-Wimplicit-function-declaration]
     apr_threadattr_create(&thd_attr, mp);
     ^
thread-sample.c:50:9: warning: implicit declaration of function ‘apr_thread_create’ [-Wimplicit-function-declaration]
         rv = apr_thread_create(&thd_arr[i], thd_attr, doit, INT_TO_POINTER(i), mp);
         ^
thread-sample.c:55:9: warning: implicit declaration of function ‘apr_thread_join’ [-Wimplicit-function-declaration]
         rv = apr_thread_join(&rv, thd_arr[i]);
         ^
thread-sample.c: In function ‘doit’:
thread-sample.c:71:5: warning: implicit declaration of function ‘apr_thread_exit’ [-Wimplicit-function-declaration]
     apr_thread_exit(thd, APR_SUCCESS);
     ^
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x14): undefined reference to `apr_initialize'
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x3b): undefined reference to `apr_pool_create_ex'
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x52): undefined reference to `apr_threadattr_create'
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x9d): undefined reference to `apr_thread_create'
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x114): undefined reference to `apr_thread_join'
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x161): undefined reference to `apr_terminate'
/tmp/cc9d71E0.o:thread-sample.c:(.text+0x19f): undefined reference to `apr_thread_exit'
collect2: error: ld returned 1 exit status

Would you have a magic hack to get this working? it seems that this .c test file compiles with no problems in some linux environments like slackware linux. Thanks in advance,

Gery

cygwin details:

$ uname -a
CYGWIN_NT-6.3-WOW64 gery 1.7.32(0.274/5/3) 2014-08-13 23:03 i686 Cygwin

$ cygcheck -c | grep apr 
apr1                                         1.4.8-1                          OK 
aprutil1                                     1.5.4-1                          OK 
libapr1                                      1.4.8-1                          OK 
libapr1-debuginfo                       1.4.8-1                          OK 
libapr1-devel                             1.4.8-1                          OK 
libaprutil1                                 1.5.4-1                          OK 
libaprutil1-debuginfo                   1.5.4-1                          OK 
libaprutil1-devel                         1.5.4-1                          OK 

$ apachectl2 -V 
Server version: Apache/2.2.29 (Unix) 
Server built:   Sep 17 2014 17:10:18 
Server's Module Magic Number: 20051115:36 
Server loaded:  APR 1.4.8, APR-Util 1.5.4 
Compiled using: APR 1.4.8, APR-Util 1.5.2 
Architecture:   32-bit 
Server MPM:     Prefork 
  threaded:     no 
    forked:     yes (variable process count) 
Server compiled with.... 
 -D APACHE_MPM_DIR="server/mpm/prefork" 
 -D APR_HAS_MMAP 
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) 
 -D APR_USE_SYSVSEM_SERIALIZE 
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT 
 -D APR_HAS_OTHER_CHILD 
 -D AP_HAVE_RELIABLE_PIPED_LOGS 
 -D DYNAMIC_MODULE_LIMIT=128 
 -D HTTPD_ROOT="/usr" 
 -D SUEXEC_BIN="/usr/bin/suexec" 
 -D DEFAULT_PIDLOG="/var/run/apache2/httpd2.pid" 
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" 
 -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock" 
 -D DEFAULT_ERRORLOG="logs/error_log" 
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" 
 -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf" 


----------------------------------------
> Date: Sat, 3 Jan 2015 17:34:20 +0100
> From: marco.atzeri@gmail.com
> To: cygwin@cygwin.com
> Subject: Re: compiling error core.c in mapcache with cygwin
>
>
>
> On 1/3/2015 2:39 PM, Gery . wrote:
>> Hello,
>>
>> When installing mapcache in cygwin, `make` produced:
>>
>> /opt/mapcache/mapcache-rel-1-2-1/lib/core.c: In function ‘mapcache_prefetch_tiles’:
>> /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:81:3: error: unknown type name ‘apr_thread_t’
>> apr_thread_t **threads;
>> ^
>> /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:82:3: error: unknown type name ‘apr_threadattr_t’
>> apr_threadattr_t *thread_attrs;
>> ^
>> /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:83:7: warning: unused variable ‘nthreads’ [-Wunused-variable]
>> int nthreads;
>> ^
>> /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:82:21: warning: unused variable ‘thread_attrs’ [-Wunused-variable]
>> apr_threadattr_t *thread_attrs;
>> ^
>> /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:81:18: warning: unused variable ‘threads’ [-Wunused-variable]
>> apr_thread_t **threads;
>> ^
>>
>> I searched for some hints about this error but didn't find anything. Looking for `apr_thread_t` and cywgin, I found some pages pointing to an error with apache, but not really sure if apache has something to do here.
>
> have you installed the development package suggest here
> http://mapserver.org/mapcache/install.html
>
>
> https://cygwin.com/packages/x86/libapr1-devel/libapr1-devel-1.4.8-1
>
>>
>> thanks for any hints on this,
>>
>> Gery
>>
>
> I guess you need this package
>
> https://cygwin.com/packages/x86/libapr1-devel/libapr1-devel-1.4.8-1
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/&unsubscribe-simple
>
 		 	   		  
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]