I'm not sure, but I would guess that ant is not making the compiler link the
expat library. I had similar problems building my program with log4cxx on
solaris. Try to run the configure script for APR-Util to see if it tries to
link the expat library, and then see if the ant build file does the same.



Good Luck,
Marshall


P.S.
I wonder why the Log4cxx developers insist on using the <cc> task to build
APR and APR-Util when those libraries come with their own autotools scripts,
Makefiles, etc...


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Aditya Aggarwal
Sent: 2007-May-23 Wed 10:50 AM
To: Log4CXX User
Subject: Re: build failed on solaris 9

Thanks Marshall,

Now I am getting linking error with aprutil

[cc] Starting dependency analysis for 144 files.
       [cc] 144 files are up to date.
       [cc] 0 files to be recompiled from dependency analysis.
       [cc] 0 total files to be compiled.
       [cc] Starting link
       [cc] Text relocation remains                     referenced
       [cc]     against symbol              offset      in file
       [cc] <unknown>                           0x393c          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
       [cc] <unknown>                           0x3940          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
       [cc] <unknown>                           0x3944          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
       [cc] <unknown>                           0x3948          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
       [cc] <unknown>                           0x394c          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
       [cc] <unknown>                           0x3950          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
       [cc] <unknown>                           0x3954          
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libaprutil-1.a(xmlparse.o)
.
.
.
.
.
.
.
/libapr-1.a(time.o)
       [cc] __divdi3                            0x174           
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libapr-1.a(thread_cond.o)
       [cc] __divdi3                            0x3c            
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libapr-1.a(waitio.o)
       [cc] __divdi3                            0x74            
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libapr-1.a(waitio.o)
       [cc] __divdi3                            0x8cc           
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libapr-1.a(apr_strings.o)
       [cc] __divdi3                            0x120           
/export/home/aaggarwal/logging-log4cxx/build/debug/static
/libapr-1.a(proc_mutex.o)
       [cc] ld: fatal: relocations remain against allocatable but 
non-writable sections
       [cc] collect2: ld returned 1 exit status

BUILD FAILED
/export/home/aaggarwal/logging-log4cxx/build.xml:731: gcc failed with 
return code 1


anything on this.

thanks

Marshall Powers wrote:
> This is because you need to set compiler flag -D_POSIX_PTHREAD_SEMANTICS.
> The configure script for APR knows this, but the ant build file does not
get
> the info after running ./configure for APR. Try adding a <compilerflag
> value="-D_POSIX_PTHREAD_SEMANTICS"/> to the <cc> tasks in apr-build.xml.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> On Behalf Of Aditya Aggarwal
> Sent: 2007-May-23 Wed 7:53 AM
> To: Log4CXX User
> Subject: Re: build failed on solaris 9
>
> HI again,
>
> I installed jdk and ant 1.7 and tried to rebuilt, now gcc throws errors 
> compiling apr on solaris 9
> [cc] Starting dependency analysis for 63 files.
>        [cc] 63 files are up to date.
>        [cc] 0 files to be recompiled from dependency analysis.
>        [cc] 4 total files to be compiled.
>
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/threadproc/unix/signals
> .c: 
> In function `apr_signal_thread':
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/threadproc/unix/signals
> .c:383: 
> error: too many arguments to function `sigwait'
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/groupinfo.c: 
> In function `apr_gid_name_get':
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/groupinfo.c:4
> 2: 
> error: too many arguments to function `getgrgid_r'
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/groupinfo.c:4
> 2: 
> warning: assignment makes integer from pointer without a cast
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/groupinfo.c: 
> In function `apr_gid_get':
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/groupinfo.c:7
> 0: 
> error: too many arguments to function `getgrnam_r'
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/groupinfo.c:7
> 0: 
> warning: assignment makes integer from pointer without a cast
>        [cc] 
> /export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/userinfo.c:

> In function `getpwnam_safe':
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/userinfo.c:48
> : 
> error: too many arguments to function `getpwnam_r'
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/userinfo.c:48
> : 
> warning: assignment makes integer from pointer without a cast
>        [cc] 
> /export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/userinfo.c:

> In function `apr_uid_name_get':
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/userinfo.c:12
> 9: 
> error: too many arguments to function `getpwuid_r'
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/user/unix/userinfo.c:12
> 9: 
> warning: assignment makes integer from pointer without a cast
>        [cc] 
> /export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/file_io/unix/dir.c: 
> In function `apr_dir_read':
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/file_io/unix/dir.c:144:
>
> error: too many arguments to function `readdir_r'
>        [cc] 
>
/export/home/aaggarwal/logging-log4cxx/lib/apr-1.2.7/file_io/unix/dir.c:144:
>
> warning: assignment makes integer from pointer without a cast
>
> BUILD FAILED
> /export/home/aaggarwal/logging-log4cxx/build.xml:559: The following 
> error occurred while executing this line:
> /export/home/aaggarwal/logging-log4cxx/apr-build.xml:167: gcc failed 
> with return code 1
>
>
>
> and I need it on windows as well and this is where the build fails
>
>    [delete] Deleting: 
> C:\logging-log4cxx\build\debug\shared\log4cxx.properties
>    [delete] Deleting:
C:\logging-log4cxx\build\debug\shared\log4j.properties
>      [exec] .
>
>
>      [exec] OK (1 tests)
>
>
>      [exec] .
>
>
>      [exec] OK (1 tests)
>
>
>      [exec] .
>
>
>      [exec] OK (1 tests)
>
>
>
> clean-output:
>    [delete] Deleting 97 files from C:\logging-log4cxx\tests
>
> run-unittest:
>      [exec] ............................Assertion failed: stat == 
> APR_SUCCESS, f
> ile C:\logging-log4cxx\tests\src\util\transformer.cpp, line 212
>
>      [exec] abnormal program termination
>
> BUILD FAILED
> C:\logging-log4cxx\build.xml:1141: exec returned: 3
>
> Total time: 9 seconds
> C:\logging-log4cxx>
>
>
> Any help is appreciated, thanks
>
> Aditya
>
>
> Aditya Aggarwal wrote:
>   
>> 1.6
>>
>>
>> [EMAIL PROTECTED] wrote:
>>     
>>> What is the version of ant?
>>>
>>> -----Original Message-----
>>> From: Aditya Aggarwal [mailto:[EMAIL PROTECTED] Sent: 
>>> Tuesday, May 22, 2007 12:32 PM
>>> To: [email protected]
>>> Subject: build failed on solaris 9
>>>
>>> Hi,
>>>
>>> I am trying to build log4cxx but fail with the following
>>>
>>> Buildfile: build.xml
>>>
>>> BUILD FAILED
>>>
>>> /export/home/aaggarwal/logging-log4cxx/build.xml:157: Class 
>>> org.apache.tools.ant.taskdefs.condition.Not doesn't support the 
>>> nested "isset" element.
>>>
>>> Total time: 0 seconds
>>>
>>> thanks
>>>
>>> aditya
>>>
>>>
>>>   
>>>       
>
>
>   


Reply via email to