You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by isma <is...@gmail.com> on 2013/10/23 18:15:00 UTC

Compilation error: 'realpath' was not declared in this scope

Hi,

I am trying to build xerces-c using an g++ compiler specifically developed
for a manycore system. So after configure xerces to be compiled against this
g++ compiler, it returns:

Compiling xercesc/util/MutexManagers/PosixMutexMgr.cpp
Compiling xercesc/util/FileManagers/PosixFileMgr.cpp
xercesc/util/FileManagers/PosixFileMgr.cpp: In member function ‘virtual
XMLCh* xercesc_3_1::PosixFileMgr::getFullPath(const XMLCh*,
xercesc_3_1::MemoryManager*)’:
xercesc/util/FileManagers/PosixFileMgr.cpp:192:34: error: ‘realpath’ was not
declared in this scope
make[4]: *** [xercesc/util/FileManagers/PosixFileMgr.lo] Error 1

Could you tell me how to fix this issue?

Regards.



Re: Compilation error: 'realpath' was not declared in this scope

Posted by Alberto Massari <al...@tiscali.it>.
Hi,
can you double check if on your system realpath() is defined in 
<unistd.h> or <stdlib.h>?
Or if your special g++ doesn't support it at all?

Alberto

Il 23/10/13 18:15, isma ha scritto:
> Hi,
>
> I am trying to build xerces-c using an g++ compiler specifically developed
> for a manycore system. So after configure xerces to be compiled against this
> g++ compiler, it returns:
>
> Compiling xercesc/util/MutexManagers/PosixMutexMgr.cpp
> Compiling xercesc/util/FileManagers/PosixFileMgr.cpp
> xercesc/util/FileManagers/PosixFileMgr.cpp: In member function ‘virtual
> XMLCh* xercesc_3_1::PosixFileMgr::getFullPath(const XMLCh*,
> xercesc_3_1::MemoryManager*)’:
> xercesc/util/FileManagers/PosixFileMgr.cpp:192:34: error: ‘realpath’ was not
> declared in this scope
> make[4]: *** [xercesc/util/FileManagers/PosixFileMgr.lo] Error 1
>
> Could you tell me how to fix this issue?
>
> Regards.
>
>
>


Re: Compilation error: 'realpath' was not declared in this scope

Posted by isma <is...@gmail.com>.
Alberto Massari <albertomassari <at> tiscali.it> writes:

> 
> Hi,
> relapath isn't really needed, as it is just used to implement an utility 
> function. As for the linker errors, I guess they are due to the specific 
> restriction of your target architecture; maybe Xerces is too big for the 
> memory of the system? In this case you could try excluding from the 
> library the parts that you don't plan to use (schema validation, DOM, 
> XInclude...)
> 
> Alberto
> 

Hi, this was the issue. I will manage how to exclude some parts to try that
xerces library fits on the memory of the system.

Thanks for your help.



Re: Compilation error: 'realpath' was not declared in this scope

Posted by Alberto Massari <al...@tiscali.it>.
Hi,
relapath isn't really needed, as it is just used to implement an utility 
function. As for the linker errors, I guess they are due to the specific 
restriction of your target architecture; maybe Xerces is too big for the 
memory of the system? In this case you could try excluding from the 
library the parts that you don't plan to use (schema validation, DOM, 
XInclude...)

Alberto

Il 23/10/13 19:24, isma ha scritto:
> Hell Alberto,
>
> You are right, realpath() is not defined on stdlib/unistd headers from the
> g++ compiler used. So, it is not possible to compile the file using this
> specific compiler :/
>
> Anyway I am trying to compile xerces without this part of code, so I hope it
> not affects so much. It compiles, but when it links, it shows some error
> messages like:
>
> ld: address 0x39993c of CreateDOMDocument section `.text' is not within
> region `internal_mem'
> ld: CreateDOMDocument section `.bootloader' will not fit in region
> `internal_mem'
> ld: address 0x425468 of CreateDOMDocument section `.rodata' is not within
> region `internal_mem'
> ...
>
> I think it is not related to the previous mistake.
>
> Thanks for your help.
>
>


Re: Compilation error: 'realpath' was not declared in this scope

Posted by isma <is...@gmail.com>.
Hell Alberto,

You are right, realpath() is not defined on stdlib/unistd headers from the
g++ compiler used. So, it is not possible to compile the file using this
specific compiler :/

Anyway I am trying to compile xerces without this part of code, so I hope it
not affects so much. It compiles, but when it links, it shows some error
messages like:

ld: address 0x39993c of CreateDOMDocument section `.text' is not within
region `internal_mem'
ld: CreateDOMDocument section `.bootloader' will not fit in region
`internal_mem'
ld: address 0x425468 of CreateDOMDocument section `.rodata' is not within
region `internal_mem'
...

I think it is not related to the previous mistake.

Thanks for your help.