You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by "Thorsten Schöning (JIRA)" <lo...@logging.apache.org> on 2014/01/22 11:15:19 UTC

[jira] [Commented] (LOGCXX-421) Ant Build doesn't work with Embarcadero C++ Builder XE 4

    [ https://issues.apache.org/jira/browse/LOGCXX-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13878489#comment-13878489 ] 

Thorsten Schöning commented on LOGCXX-421:
------------------------------------------

The following problems are currently left:

* a lot of warnings about wrong DLL export during compilation
* log4cxx.rc doesn't compile, brc ends with access violations

The main problem still left is a linker issue: cpptasks reads ilink32.cfg which contains default paths to lib directories, but cpptasks seems to only use the first one. But the first configured directory doesn't contain the needed libs like ws2_32, which is checked by the linker logic of cpptasks, why there are not added to the automatically generated repsonse file for ilink32 and the link failes with unresolved externals. If one changes the order of the dirs in ilink32.cfg to the psdk-dir becoming the first one, the needed libs are found and added to the response file, but because the paths by default contain spaces, cpptasks quotes them. But again there seems to be a bug because the resulting path is double quoted like ""C:\Program Files..."" which leads ilink32 to ignore "" and use the path C:\Program... wrongly because of the spaces and the link fails.

The wrong quotes are applied as well if one specifies the psdk lib as embedded fileset to the cc task:

<fileset	dir="C:/Program Files (x86)/Embarcadero/RAD Studio/11.0/lib/win32/release/psdk"
	if="is-bcc"
/>

This way cpptasks reads the whole content of the dir and places each lib in the response file, but with wrong quotes. Nevertheless one has the problem to find the correct installation path using some sort of magic. The linker logic of cpptasks uses PATH to iterate each directory, look for ilink32.exe and chooses that as the base path for libs by adding "..\libs". Which as well would be wrong on current installations, but shouldn't be a problem if ilink32.cfg would have been interpreted correctly.

As the compilation itself seems to work, I would like to only deactivate linking and implement that using some simple script or such stuff. But currently I didn't find the option to deactivate linking only or to post process the repsonse file before the actual call to ilink32.exe to only repair the quotes. The only thing I could think of are either re-implementing the whole cc-task for is-bcc builds with their own target or maybe configure cc to accept and ignore the failing link and afterwards doing the link manually. There's a failonerror attribute for the cc task which I didn't tested, but it's missing from the linker task.

http://stackoverflow.com/questions/21269335/how-to-deactivate-or-hook-linking-in-ant-contrib-cpptasks

Another thin is that cw32mt is not added to the repsonse file, but the linker logic of cpptasks seem to hardcode cw32.lib instead, whcih ma yresult in problems with other multithreaded software.

> Ant Build doesn't work with Embarcadero C++ Builder XE 4
> --------------------------------------------------------
>
>                 Key: LOGCXX-421
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-421
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Build
>         Environment: Windows 7 Ultimate 64 Bit
>            Reporter: Thorsten Schöning
>            Assignee: Thorsten Schöning
>
> The build process currently doesn't work with Embarcadero C++ Builder XE 4, there are some problems with the ant scripts themselfs and the compiler and linker compatibility as well.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)