You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Ross Smith <no...@pobox.com> on 2001/12/09 21:00:16 UTC

1.6.0: FreeBSD samples fail to link: undefined reference to `XMLPlatformUtils::makeTransService(void)'

I was able to successfully compile 1.6.0 for FreeBSD.

Unfortunately, none of the samples linked.  Here's an example of what I get for *each* sample program:

gmake[1]: Entering directory `/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/samples/CreateDOMDocument'
mkdir -p /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/obj/CreateDOMDocument
g++ -c -DFREEBSD -fPIC -c -w -O -I. -I/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include -o
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/obj/CreateDOMDocument/CreateDOMDocument.o
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/samples/CreateDOMDocument/CreateDOMDocument.cpp
g++ -DFREEBSD -fPIC  /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/obj/CreateDOMDocument/CreateDOMDocument.o -o
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/CreateDOMDocument -L/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib -lxe
rces-c1_6_0 -lstdc++ -pthread
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::makeTransService(void)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::readFileBuffer(void *, unsigned int, unsigned char *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::loadAMsgSet(unsigned short const *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::unlockMutex(void *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::closeMutex(void
*)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::atomicDecrement(int &)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::panic(XMLPlatformUtils::PanicReasons)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::closeFile(void
*)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::openStdInHandle(void)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::makeNetAccessor(void)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::isRelative(unsigned short const *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::makeMutex(void)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::platformInit(void)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::fileSize(void
*)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::atomicIncrement(int &)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::openFile(unsigned short const *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::resetFile(void
*)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::compareAndSwap(void **, void const *, void const *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::lockMutex(void
*)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::weavePaths(unsigned short const *, unsigned short const *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::getFullPath(unsigned short const *)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::curFilePos(void
*)'
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
`XMLPlatformUtils::platformTerm(void)'
gmake[1]: *** [/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/CreateDOMDocument] Error 1
gmake[1]: Leaving directory `/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/samples/CreateDOMDocument'

The same code works fine in Linux, so it's a FreeBSD anomoly.

Can anybody explain how to fix this?

Thanks,

Ross Smith


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: 1.6.0: FreeBSD samples fail to link: undefined reference to `XMLPlatformUtils::makeTransService(void)'

Posted by Max Gotlib <ma...@cca.usart.ru>.
Ross,

The reason fot the building process failure is clear to me - you should
use the following configuration commands:

autoconf
./runConfigure -p freebsd -c gcc -x g++ -t IconvFBSD
                                        ^^^^^^^^^^^^

It's because FreeBSD implementation of widechar (wcs*) functions is
incomplete and this is the reason for developing separate transcoding
service especially for FreeBSD.

--
Max.

PS: As for the building process itself - i agree, that someone should
change it to (at least) stop on submodule built failure... More it (it's
my own opinion) should be some kind if dependencies list generation...

On Sun, 9 Dec 2001, Ross Smith wrote:

> > From: Max Gotlib [mailto:max@cca.usart.ru]
> >
> > Seems, that staff in src/util/Platforms/FreeBSD was not compiled in the
> > library. Try to "cd" to this directory inside the sources tree and type
> > gmake. If my theory is right, you'll see a number of error messages. Send
> > 'em back to me and I'll try to figure out the diagnosys :)
>
> Oops!  My mistake!  I thought the compile did go well as I thought that make would fail if it encountered an error.
>
> Appearently, that is not the case when 'make'ing xerces.  You have to review the entire build log to see if an error happened.
>
> This is counterintuitive, and should be fixed, unless there is a good reason for it.
>
> Anyway, here's the error:
>
> gmake[2]: Entering directory `/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/src/util/Transcoders/Iconv'
> mkdir -p /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include/util/Transcoders/Iconv
> cp -p IconvTransService.hpp /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include/util/Transcoders/Iconv
> g++ -fPIC -DFREEBSD -c -O -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -D_THREAD_SAFE -DXML_USE_PTHREADS -DXML_USE_NETA
> CCESSOR_SOCKET  -I/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include  -o
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/obj/FREEBSD/IconvTransService.o IconvTransService.cpp
> IconvTransService.cpp: In method `int IconvTransService::compareIString(const XMLCh *, const XMLCh *)':
> IconvTransService.cpp:127: implicit declaration of function `int towupper(...)'
> IconvTransService.cpp: In method `bool IconvTransService::isSpace(short unsigned int) const':
> IconvTransService.cpp:182: implicit declaration of function `int iswspace(...)'
> gmake[2]: *** [IconvTransService.o] Error 1
>
> I built it with:
>
> autoconf
> ./runConfigure -p freebsd -c gcc -x g++
>
> Thanks for you're help.
>
> Ross Smith
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: 1.6.0: FreeBSD samples fail to link: undefined reference to `XMLPlatformUtils::makeTransService(void)'

Posted by Ross Smith <no...@pobox.com>.
> From: Max Gotlib [mailto:max@cca.usart.ru]
>
> Seems, that staff in src/util/Platforms/FreeBSD was not compiled in the
> library. Try to "cd" to this directory inside the sources tree and type
> gmake. If my theory is right, you'll see a number of error messages. Send
> 'em back to me and I'll try to figure out the diagnosys :)

Oops!  My mistake!  I thought the compile did go well as I thought that make would fail if it encountered an error.

Appearently, that is not the case when 'make'ing xerces.  You have to review the entire build log to see if an error happened.

This is counterintuitive, and should be fixed, unless there is a good reason for it.

Anyway, here's the error:

gmake[2]: Entering directory `/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/src/util/Transcoders/Iconv'
mkdir -p /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include/util/Transcoders/Iconv
cp -p IconvTransService.hpp /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include/util/Transcoders/Iconv
g++ -fPIC -DFREEBSD -c -O -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -D_THREAD_SAFE -DXML_USE_PTHREADS -DXML_USE_NETA
CCESSOR_SOCKET  -I/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include  -o
/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/obj/FREEBSD/IconvTransService.o IconvTransService.cpp
IconvTransService.cpp: In method `int IconvTransService::compareIString(const XMLCh *, const XMLCh *)':
IconvTransService.cpp:127: implicit declaration of function `int towupper(...)'
IconvTransService.cpp: In method `bool IconvTransService::isSpace(short unsigned int) const':
IconvTransService.cpp:182: implicit declaration of function `int iswspace(...)'
gmake[2]: *** [IconvTransService.o] Error 1

I built it with:

autoconf
./runConfigure -p freebsd -c gcc -x g++

Thanks for you're help.

Ross Smith


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: 1.6.0: FreeBSD samples fail to link: undefined reference to `XMLPlatformUtils::makeTransService(void)'

Posted by Max Gotlib <ma...@cca.usart.ru>.
Hi!

Seems, that staff in src/util/Platforms/FreeBSD was not compiled in the
library. Try to "cd" to this directory inside the sources tree and type
gmake. If my theory is right, you'll see a number of error messages. Send
'em back to me and I'll try to figure out the diagnosys :)

--
Max.

On Sun, 9 Dec 2001, Ross Smith wrote:

> I was able to successfully compile 1.6.0 for FreeBSD.
>
> Unfortunately, none of the samples linked.  Here's an example of what I get for *each* sample program:
>
> gmake[1]: Entering directory `/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/samples/CreateDOMDocument'
> mkdir -p /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/obj/CreateDOMDocument
> g++ -c -DFREEBSD -fPIC -c -w -O -I. -I/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/include -o
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/obj/CreateDOMDocument/CreateDOMDocument.o
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/samples/CreateDOMDocument/CreateDOMDocument.cpp
> g++ -DFREEBSD -fPIC  /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/obj/CreateDOMDocument/CreateDOMDocument.o -o
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/CreateDOMDocument -L/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib -lxe
> rces-c1_6_0 -lstdc++ -pthread
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::makeTransService(void)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::readFileBuffer(void *, unsigned int, unsigned char *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::loadAMsgSet(unsigned short const *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::unlockMutex(void *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::closeMutex(void
> *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::atomicDecrement(int &)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::panic(XMLPlatformUtils::PanicReasons)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::closeFile(void
> *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::openStdInHandle(void)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::makeNetAccessor(void)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::isRelative(unsigned short const *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::makeMutex(void)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::platformInit(void)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::fileSize(void
> *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::atomicIncrement(int &)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::openFile(unsigned short const *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::resetFile(void
> *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::compareAndSwap(void **, void const *, void const *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::lockMutex(void
> *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::weavePaths(unsigned short const *, unsigned short const *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::getFullPath(unsigned short const *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to `XMLPlatformUtils::curFilePos(void
> *)'
> /home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/lib/libxerces-c1_6_0.so: undefined reference to
> `XMLPlatformUtils::platformTerm(void)'
> gmake[1]: *** [/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/bin/CreateDOMDocument] Error 1
> gmake[1]: Leaving directory `/home/users/r/ro/rossta/FreeBSD/xerces-c-src1_6_0/samples/CreateDOMDocument'
>
> The same code works fine in Linux, so it's a FreeBSD anomoly.
>
> Can anybody explain how to fix this?
>
> Thanks,
>
> Ross Smith
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


CVS: Cygwin port fails to link: undefined reference to `XMLPlatformUtils::openFile()'

Posted by Ross Smith <no...@pobox.com>.
I'm porting the current CVS code to Cygwin 1.3.6(0.47/3/2).

Everything compiled fine, but it fails when creating the library:

make[1]: Entering directory `/cygdrive/d/pub/src/xml-xerces/c/obj'
Building /cygdrive/d/pub/src/xml-xerces/c/lib/libxerces-c1_6_0.so
g++ -DCYGWIN -shared  -o /cygdrive/d/pub/src/xml-xerces/c/lib/libxerces-c1_6_0.so
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/ASCIIRangeFactory.o
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/AbstractNumericFacetValidator.o
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/AbstractNumericValidator.o
...
xerces/c/obj/CYGWIN/XercesXPath.o /cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/YearDatatypeValidator.o
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/YearMonthDatatypeValidator.o
gdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/sax2Dummy.o    -lpthread  -L/usr/lib -L/usr/local/lib -lc
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/BinFileInputStream.o(.text+0x62):BinFileInputStream.cpp: undefined reference to
`XMLPlatformUtils::openFile(unsigned short const *)'
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/BinFileInputStream.o(.text+0x177):BinFileInputStream.cpp: undefined reference to
`XMLPlatformUtils::openFile(unsigned short const *)'
...
/cygdrive/d/pub/src/xml-xerces/c/obj/CYGWIN/XMLValidator.o(.text+0x275):XMLValidator.cpp: undefined reference to
`XMLPlatformUtils::panic(XMLPlatformUtils::PanicReasons)'
collect2: ld returned 1 exit status
make[1]: *** [/cygdrive/d/pub/src/xml-xerces/c/lib/libxerces-c1_6_0.so] Error 1
make[1]: Target `ALL' not remade because of errors.
make[1]: Leaving directory `/cygdrive/d/pub/src/xml-xerces/c/obj'

I got the same error when I tried to compile the samples in FreeBSD 4.4.

Any help would be greatly appreciated.

Thanks,

Ross Smith



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org