LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2010, 04:19 PM   #1
waqasdaar
Member
 
Registered: Jan 2009
Location: Stockholm Sweden
Distribution: Ubuntu 9.10
Posts: 57

Rep: Reputation: 15
Question undefined reference problem


Hi all,

I am trying to install NOX which is a openflow controller and it needs Xerces-C++ this. I installed it successfully on the Debian. The output of the xerces after running the "make install" command is as follows which shows that is successfully installed on the machine.

Code:
Making install in samples
make[1]: Entering directory `/home/xerces-c-3.1.1/samples'
make[2]: Entering directory `/home/xerces-c-3.1.1/samples'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
  /bin/sh ../libtool   --mode=install /usr/bin/install -c CreateDOMDocument DOMCount DOMPrint EnumVal MemParse PParse PSVIWriter Redirect SAX2Count SAX2Print SAXCount SAXPrint SCMPrint SEnumVal StdInParse XInclude '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/CreateDOMDocument /usr/local/bin/CreateDOMDocument
libtool: install: /usr/bin/install -c .libs/DOMCount /usr/local/bin/DOMCount
libtool: install: /usr/bin/install -c .libs/DOMPrint /usr/local/bin/DOMPrint
libtool: install: /usr/bin/install -c .libs/EnumVal /usr/local/bin/EnumVal
libtool: install: /usr/bin/install -c .libs/MemParse /usr/local/bin/MemParse
libtool: install: /usr/bin/install -c .libs/PParse /usr/local/bin/PParse
libtool: install: /usr/bin/install -c .libs/PSVIWriter /usr/local/bin/PSVIWriter
libtool: install: /usr/bin/install -c .libs/Redirect /usr/local/bin/Redirect
libtool: install: /usr/bin/install -c .libs/SAX2Count /usr/local/bin/SAX2Count
libtool: install: /usr/bin/install -c .libs/SAX2Print /usr/local/bin/SAX2Print
libtool: install: /usr/bin/install -c .libs/SAXCount /usr/local/bin/SAXCount
libtool: install: /usr/bin/install -c .libs/SAXPrint /usr/local/bin/SAXPrint
libtool: install: /usr/bin/install -c .libs/SCMPrint /usr/local/bin/SCMPrint
libtool: install: /usr/bin/install -c .libs/SEnumVal /usr/local/bin/SEnumVal
libtool: install: /usr/bin/install -c .libs/StdInParse /usr/local/bin/StdInParse
libtool: install: /usr/bin/install -c .libs/XInclude /usr/local/bin/XInclude
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/xerces-c-3.1.1/samples'
make[1]: Leaving directory `/home/xerces-c-3.1.1/samples'
make[1]: Entering directory `/home/xerces-c-3.1.1'
make[2]: Entering directory `/home/xerces-c-3.1.1'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
 /usr/bin/install -c -m 644 xerces-c.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory `/home/xerces-c-3.1.1'
make[1]: Leaving directory `/home/xerces-c-3.1.1
But when i tried to "make" command to install the NOX it gives me an error that

Code:
make[5]: Entering directory `/home/nox/build/src/etc'
make[5]: Leaving directory `/home/nox/build/src/etc'
make[4]: Leaving directory `/home/nox/build/src/etc'
make[4]: Entering directory `/home/nox/build/src'
- Hide quoted text -
/bin/sh ../libtool --tag=CXX   --mode=link g++ -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -R/usr/local/bin -export-dynamic -L/usr/lib -lboost_unit_test_framework-gcc42-1_35 -lboost_filesystem-gcc42-1_35 -lssl -L/usr/local/lib  -Wl,-E   -o nox_core components.xsd.o nox.xsd.o nox_main.o ./builtin/.libs/libbuiltin.la ./lib/libnoxcore.la
g++ -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -Wl,-E -o .libs/nox_core components.xsd.o nox.xsd.o nox_main.o -Wl,--export-dynamic  -L/usr/lib -lboost_unit_test_framework-gcc42-1_35 -lboost_filesystem-gcc42-1_35 -lssl -L/usr/local/lib ./builtin/.libs/libbuiltin.so ./lib/.libs/libnoxcore.so  -Wl,--rpath -Wl,/usr/local/bin/builtin -Wl,--rpath -Wl,/usr/local/bin
components.xsd.o: In function `~XMLAttDefList':
/usr/local/include/xercesc/framework/XMLAttDefList.hpp:158: undefined reference to `xercesc_3_1::XMemory::operator delete(void*)'
components.xsd.o:(.rodata._ZTVN11xercesc_3_113XMLAttDefListE[vtable for xercesc_3_1::XMLAttDefList]+0x10): undefined reference to `xercesc_3_1::XMLAttDefList::isSerializable() const'
components.xsd.o:(.rodata._ZTVN11xercesc_3_113XMLAttDefListE[vtable for xercesc_3_1::XMLAttDefList]+0x14): undefined reference to `xercesc_3_1::XMLAttDefList::serialize(xercesc_3_1::XSerializeEngine&)'
components.xsd.o:(.rodata._ZTVN11xercesc_3_113XMLAttDefListE[vtable for xercesc_3_1::XMLAttDefList]+0x18): undefined reference to `xercesc_3_1::XMLAttDefList::getProtoType() const'
./builtin/.libs/libbuiltin.so: undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMElementContentWhitespace'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLString::transcode(char const*, unsigned short*, unsigned int, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `typeinfo for xercesc_3_1::DOMException'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgXercesSchemaFullChecking'
./builtin/.libs/libbuiltin.so: undefined reference to `xercesc_3_1::XMLString::transcode(char const*, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgXercescDefaultLocale'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgXercesUseCachedGrammarInParse'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMErrorHandler'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::Wrapper4InputSource::Wrapper4InputSource(xercesc_3_1::InputSource*, bool, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::MemBufInputSource::MemBufInputSource(unsigned char const*, unsigned int, char const*, bool, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgXercesUserAdoptsDOMDocument'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMNamespaces'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::Wrapper4InputSource::~Wrapper4InputSource()'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLPlatformUtils::Initialize(char const*, char const*, xercesc_3_1::PanicHandler*, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `typeinfo for xercesc_3_1::XMLException'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)'
./builtin/.libs/libbuiltin.so: undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMValidate'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::MemBufInputSource::~MemBufInputSource()'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgXercesSchema'
collect2: ld returned 1 exit status
make[4]: *** [nox_core] Error 1
make[4]: Leaving directory `/home/nox/build/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/nox/build/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/nox/build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nox/build'
make: *** [all] Error 2
does any one have any idea how to resolve this issue?

Thanks in Advanced.
 
Old 07-12-2010, 04:53 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Looking at the g++ command line you've posted, there is no reference to the xercesc libraries. Maybe you have to specify either the exact location of these libraries or their name (or both). Since the xercesc installation provided the pkg-config file /usr/local/lib/pkgconfig/xerces-c.pc, you can easily find out the required information by running the following:
Code:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
pkg-config --cflags --libs xerces-c
Then you have to pass these informations to the configure step of nox, either by adding the --with-xerces-inc and --with-xerces-lib options with the correct arguments OR by exporting the correct values for CPPFLAGS, CFLAGS, LIBS and LDFLAGS environment variables.

Also take a look at the file config.log, that should have been generated after running the ./configure script and see if it actually missed informations about the xerces installation, e.g.
Code:
grep -i xerces ./config.log
If in doubt, please post the output of the commands above. Hope this helps.
 
Old 07-13-2010, 04:02 AM   #3
waqasdaar
Member
 
Registered: Jan 2009
Location: Stockholm Sweden
Distribution: Ubuntu 9.10
Posts: 57

Original Poster
Rep: Reputation: 15
The output of the last command

Code:
henrietta:/home/nox/build# grep -i xerces ./config.log
PATH: /home/xerces-c-src_2_8_0/lib/
/home/xerces-c-src_2_8_0/lib/: cannot read file data: Is a directory
configure:21861: checking for Xerces C++ Parser headers in /usr/local/include and /usr/local/include/xercesc
configure:21896: g++ -c -g -O2  -I/usr/local/include -I/usr/local/include/xercesc conftest.cpp >&5
configure:21935: checking for Xerces C++ Parser libraries
configure:21975: g++ -o conftest -g -O2  -I/usr/local/include -I/usr/local/include/xercesc  -L/usr/local/lib  conftest.cpp -lxerces-c   >&5
configure:22021: checking for Xerces C++ Parser
configure:22045: checking if Xerces C++ Parser version is >= 2.7.0
XERCES_CPPFLAGS='-I/usr/local/include -I/usr/local/include/xercesc'
XERCES_LDFLAGS='-L/usr/local/lib '
XERCES_LIBS='-lxerces-c '
XERCES_VERSION='2.8.0'
 
Old 07-13-2010, 04:28 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
There is something weird here: nox has been configured to use xerces version 2.8.0, but you show us installation of version 3.1.1 and actually the build process looks for 3.1.1 functions. Maybe have you mixed-up two different installations of xerces in the same place? What is the output of the pkg-config command suggested in my previous post? Finally, please can you show the environment variables and the ./configure command line used to configure nox? Thx
 
Old 07-13-2010, 04:38 AM   #5
waqasdaar
Member
 
Registered: Jan 2009
Location: Stockholm Sweden
Distribution: Ubuntu 9.10
Posts: 57

Original Poster
Rep: Reputation: 15
Code:
henrietta:/home/nox# export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
henrietta:/home/nox# pkg-config --cflags --libs xerces-c
-I/usr/local/include  -L/usr/local/lib -lxerces-c
henrietta:/home/nox#

Code:
henrietta:/home/nox# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
henrietta:/home/nox#
Code:
henrietta:/home/nox# echo $LDFLAGS
/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
henrietta:/home/nox#
And these commands are used to installed NOX.

Code:
cd nox
./boot.sh
mkdir build
cd build/
../configure
make
 
Old 07-13-2010, 04:49 AM   #6
waqasdaar
Member
 
Registered: Jan 2009
Location: Stockholm Sweden
Distribution: Ubuntu 9.10
Posts: 57

Original Poster
Rep: Reputation: 15
After running your commands I am getting this error

Code:
henrietta:/home/xerces-c-3.1.1# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to use rpath... yes
checking for g++... g++
checking for C++ compiler default output file name...
configure: error: in `/home/xerces-c-3.1.1':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
And after checking the config.log file I got very strange things in the log file :S

Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by xerces-c configure 3.1.1, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = henrietta
uname -m = i686
uname -r = 2.6.26-2-xen-686
uname -s = Linux
uname -v = #1 SMP Wed Nov 4 23:23:33 UTC 2009

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##
configure:2921: checking build system type
configure:2935: result: i686-pc-linux-gnu
configure:2955: checking host system type
configure:2968: result: i686-pc-linux-gnu
configure:3006: checking for a BSD-compatible install
configure:3074: result: /usr/bin/install -c
configure:3085: checking whether build environment is sane
configure:3135: result: yes
configure:3276: checking for a thread-safe mkdir -p
configure:3315: result: /bin/mkdir -p
configure:3328: checking for gawk
configure:3358: result: no
configure:3328: checking for mawk
configure:3344: found /usr/bin/mawk
configure:3355: result: mawk
configure:3366: checking whether make sets $(MAKE)
configure:3388: result: yes
configure:3463: checking how to create a ustar tar archive
configure:3476: tar --version
tar (GNU tar) 1.20
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
configure:3479: $? = 0
configure:3519: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar
configure:3522: $? = 0
configure:3526: tar -xf - <conftest.tar
configure:3529: $? = 0
configure:3542: result: gnutar
configure:3550: checking whether to enable maintainer-specific portions of Makefiles
configure:3559: result: no
configure:3574: checking whether to use rpath
configure:3583: result: yes
configure:3645: checking for g++
configure:3661: found /usr/bin/g++
configure:3672: result: g++
configure:3699: checking for C++ compiler version
g++ (Debian 4.3.2-1.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3719: $? = 0
configure:3708: g++ -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-la$
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
configure:3719: $? = 0
configure:3708: g++ -V >&5
g++: '-V' option must have argument
configure:3719: $? = 1
configure:3708: g++ -qversion >&5
g++: unrecognized option '-qversion'
g++: no input files
g++: no input files
configure:3719: $? = 1
configure:3741: checking for C++ compiler default output file name
configure:3763: g++   /usr/lib/pkgconfig:/usr/local/lib/pkgconfig conftest.cpp  >&5
g++: /usr/lib/pkgconfig:/usr/local/lib/pkgconfig: No such file or directory
configure:3767: $? = 1
configure:3804: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "xerces-c"
| #define PACKAGE_TARNAME "xerces-c"
| #define PACKAGE_VERSION "3.1.1"
| #define PACKAGE_STRING "xerces-c 3.1.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "xerces-c"
| #define VERSION "3.1.1"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
{
| FILE *f = fopen ("conftest.out", "w");
|  return ferror (f) || fclose (f) != 0;
|
|   ;
|   return 0;
| }
configure:3810: error: in `/home/xerces-c-3.1.1':
configure:3814: error: C++ compiler cannot create executables
See `config.log' for more details.


## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "xerces-c"
#define PACKAGE_TARNAME "xerces-c"
#define PACKAGE_VERSION "3.1.1"
#define PACKAGE_STRING "xerces-c 3.1.1"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "xerces-c"
#define VERSION "3.1.1"

configure: exit 77
I think highlighted section was creating the problem. I dont know how to resolve this
 
Old 07-13-2010, 05:00 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Sorry but I cannot follow you. Why did you tried to configure xerces-c-3.1.1 again? Wasn't it successfully installed?
Code:
henrietta:/home/xerces-c-3.1.1# ./configure
checking build system type... i686-pc-linux-gnu
...
Anyway, use
Code:
unset PKG_CONFIG_PATH
or close the terminal and open a new one to reset the default environment. The PKG_CONFIG_PATH was that one giving problems in your last configure attempt.
 
Old 07-13-2010, 05:54 AM   #8
waqasdaar
Member
 
Registered: Jan 2009
Location: Stockholm Sweden
Distribution: Ubuntu 9.10
Posts: 57

Original Poster
Rep: Reputation: 15
Now I did the fresh installation of the xerces-3.1 with no errors. and still I am getting this undefined reference problem. while installing the NOX.

Code:
henrietta:/home/nox/build# grep -i xerces ./config.log
configure:21861: checking for Xerces C++ Parser headers in /usr/local/include and /usr/local/include/xercesc
configure:21896: g++ -c -g -O2  -I/usr/local/include -I/usr/local/include/xercesc conftest.cpp >&5
configure:21935: checking for Xerces C++ Parser libraries
configure:21975: g++ -o conftest -g -O2  -I/usr/local/include -I/usr/local/include/xercesc  -L/usr/local/lib  conftest.cpp -lxerces-c   >&5
configure:22021: checking for Xerces C++ Parser
configure:22045: checking if Xerces C++ Parser version is >= 2.7.0
XERCES_CPPFLAGS='-I/usr/local/include -I/usr/local/include/xercesc'
XERCES_LDFLAGS='-L/usr/local/lib '
XERCES_LIBS='-lxerces-c '
XERCES_VERSION='3.1.1'
The error is still the same

Code:
mv -f .deps/nox_main.Tpo .deps/nox_main.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++ -fno-omit-frame-pointer -Wall -Wno-sign-

compare -Winit-self -Wformat-nonliteral -Wformat-security -g -O2 -R/usr/local/bin -export-

dynamic -L/usr/lib -lboost_unit_test_framework-gcc42-1_35 -lboost_filesystem-gcc42-1_35 -lssl 

-L/usr/local/lib  -Wl,-E   -o nox_core components.xsd.o nox.xsd.o nox_main.o 

./builtin/.libs/libbuiltin.la ./lib/libnoxcore.la
mkdir .libs
g++ -fno-omit-frame-pointer -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat

-security -g -O2 -Wl,-E -o .libs/nox_core components.xsd.o nox.xsd.o nox_main.o -Wl,--export

-dynamic  -L/usr/lib -lboost_unit_test_framework-gcc42-1_35 -lboost_filesystem-gcc42-1_35 -

lssl -L/usr/local/lib ./builtin/.libs/libbuiltin.so ./lib/.libs/libnoxcore.so  -Wl,--rpath -

Wl,/usr/local/bin/builtin -Wl,--rpath -Wl,/usr/local/bin
components.xsd.o: In function `~XMLAttDefList':
/usr/local/include/xercesc/framework/XMLAttDefList.hpp:158: undefined reference to 

`xercesc_3_1::XMemory::operator delete(void*)'
components.xsd.o:(.rodata._ZTVN11xercesc_3_113XMLAttDefListE[vtable for 

xercesc_3_1::XMLAttDefList]+0x10): undefined reference to 

`xercesc_3_1::XMLAttDefList::isSerializable() const'
components.xsd.o:(.rodata._ZTVN11xercesc_3_113XMLAttDefListE[vtable for 

xercesc_3_1::XMLAttDefList]+0x14): undefined reference to 

`xercesc_3_1::XMLAttDefList::serialize(xercesc_3_1::XSerializeEngine&)'
components.xsd.o:(.rodata._ZTVN11xercesc_3_113XMLAttDefListE[vtable for 

xercesc_3_1::XMLAttDefList]+0x18): undefined reference to 

`xercesc_3_1::XMLAttDefList::getProtoType() const'
./builtin/.libs/libbuiltin.so: undefined reference to 

`xercesc_3_1::XMLPlatformUtils::fgMemoryManager'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::XMLUni::fgDOMElementContentWhitespace'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLString::transcode(char 

const*, unsigned short*, unsigned int, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `typeinfo for xercesc_3_1::DOMException'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::XMLUni::fgXercesSchemaFullChecking'
./builtin/.libs/libbuiltin.so: undefined reference to `xercesc_3_1::XMLString::transcode(char 

const*, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::XMLUni::fgXercescDefaultLocale'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::XMLUni::fgXercesUseCachedGrammarInParse'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMErrorHandler'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::Wrapper4InputSource::Wrapper4InputSource(xercesc_3_1::InputSource*, bool, 

xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::MemBufInputSource::MemBufInputSource(unsigned char const*, unsigned int, char 

const*, bool, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::XMLUni::fgXercesUserAdoptsDOMDocument'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMNamespaces'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLString::release(char**, 

xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::Wrapper4InputSource::~Wrapper4InputSource()'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLPlatformUtils::Initialize

(char const*, char const*, xercesc_3_1::PanicHandler*, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `typeinfo for xercesc_3_1::XMLException'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)'
./builtin/.libs/libbuiltin.so: undefined reference to `xercesc_3_1::XMLString::transcode

(unsigned short const*, xercesc_3_1::MemoryManager*)'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgDOMValidate'
./lib/.libs/libnoxcore.so: undefined reference to 

`xercesc_3_1::MemBufInputSource::~MemBufInputSource()'
./lib/.libs/libnoxcore.so: undefined reference to `xercesc_3_1::XMLUni::fgXercesSchema'
collect2: ld returned 1 exit status
make[4]: *** [nox_core] Error 1
make[4]: Leaving directory `/home/nox/build/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/nox/build/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/nox/build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nox/build'
make: *** [all] Error 2
I am attaching the values of the environment variables below, hope this could help you to rectify the problem
Code:
henrietta:/home/nox/build# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
henrietta:/home/nox/build#
Code:
henrietta:/home/nox/build# export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
henrietta:/home/nox/build# pkg-config --cflags --libs xerces-c
-I/usr/local/include  -L/usr/local/lib -lxerces-c
henrietta:/home/nox/build#
Code:
henrietta:/home/nox/build# echo $PKG_CONFIG_PATH
/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
henrietta:/home/nox/build#
Code:
henrietta:/home/nox/build# echo $LDFLAGS

henrietta:/home/nox/build#
 
Old 07-13-2010, 06:44 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Still the build step of nox is not aware of where the xerces libraries are located. The following command:
Code:
# pkg-config --cflags --libs xerces-c
-I/usr/local/include  -L/usr/local/lib -lxerces-c
shows the places and the library name. I thing you should repeat the configure step specifying the following options and environment variables:
Code:
./configure <your-other-options-here> --with-xerces-inc=/usr/local/include --with-xerces-lib=/usr/local/lib <your-other-environment-variables-here> LIBS='-lxerces-c'
Moreover, be sure your system meets all the requirements listed here.
 
Old 07-13-2010, 07:06 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,268

Rep: Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568Reputation: 3568
Debian 5 Lenny.
'apt-get install libxerces-c2-dev libssl-dev libboost-dev swig'
http://noxrepo.org/wp/ : git clone git://noxrepo.org/nox
cd nox/ && sh boot.sh && mkdir build && cd build/
&& ../configure && make : No errors.

..
 
Old 07-13-2010, 08:24 AM   #11
waqasdaar
Member
 
Registered: Jan 2009
Location: Stockholm Sweden
Distribution: Ubuntu 9.10
Posts: 57

Original Poster
Rep: Reputation: 15
Thumbs up

I really appreciate for your time and help. Thanks both of you. Now Its finally working :-)
 
Old 04-26-2017, 12:32 AM   #12
Somreeta
LQ Newbie
 
Registered: Apr 2017
Posts: 3

Rep: Reputation: Disabled
undefined reference to `xercesc_3_1::XMemory::operator delete(void*)'. PLS HELP

Hello,
While installing "Simulation of Urban MObility"(SUMO) I am getting the following error. The error is not coming while doing ./configure. But when I am doing make the error is coming. I have followed all the steps adviced in the thread, but still it doesn't solve for me. PLS help...
make[3]: Leaving directory `/home/somreeta/sumo-0.26.0/src/od'
Making all in marouter
make[3]: Entering directory `/home/somreeta/sumo-0.26.0/src/marouter'
marouter_main.o: In function `xercesc_3_1::XMLAttDefList::~XMLAttDefList()':
marouter_main.cpp(.text._ZN11xercesc_3_113XMLAttDefListD0Ev[_ZN11xercesc_3_113XMLAttDefListD5Ev]+0x8):undefined reference to `xercesc_3_1::XMemory::operator delete(void*)'
marouter_main.o:
In function `xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)':marouter_main.cpp(.text._ZN11xercesc_3_114DefaultHandler10fatalErrorERKNS_17SAXParseExcepti onE[xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)]+0x2d): undefined reference to `xercesc_3_1::SAXParseException::SAXParseException(xercesc_3_1::SAXParseException const&)'
marouter_main.cpp:(.text._ZN11xercesc_3_114DefaultHandler10fatalErrorERKNS_17SAXParseExceptionE[xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)]+0x32): undefined reference to `xercesc_3_1::SAXParseException::~SAXParseException()'
marouter_main.cpp:
 
Old 04-26-2017, 12:38 AM   #13
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,221
Blog Entries: 11

Rep: Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172Reputation: 3172
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This post is a duplicate of this one.

Also, please do not post to very old threads, always best to start your own.

For guidance in posting your question please see the Site FAQ, and in particular this page.

Last edited by astrogeek; 04-26-2017 at 12:41 AM. Reason: Added info
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
undefined reference problem pp-zz Programming 3 04-21-2008 02:42 AM
problem of undefined reference to `__ctype_b' nelnel Programming 3 08-01-2007 01:40 AM
g++ linking problem: undefined reference to _Unwind_GetIPInfo ljbuturovic Ubuntu 3 03-03-2007 12:45 AM
Undefined Reference Linker Problem DWo Programming 1 03-11-2006 04:17 PM
Yet another 'undefined reference' problem faulpelz2 Linux - Software 3 04-04-2003 11:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration