From: Kevin G. <go...@gm...> - 2007-01-05 21:48:10
|
On 1/5/07, Patrick Hartling <pa...@13...> wrote: > Kevin Godby wrote: > > Hello. > > > > I'm having trouble compiling xml-cppdom (as a prerequisite for > > compiling VR Juggler). > > > > When I try to compile svn trunk, I get the following error: > > > > ----- > > g++ -o build.linux/type-debug--arch-x64/cppdom/libcppdom-0_7_7.so -m64 > > -shared build.linux/type-debug--arch-x64/cppdom/cppdom.os > > build.linux/type-debug--arch-x64/cppdom/xmlparser.os > > build.linux/type-debug--arch-x64/cppdom/xmltokenizer.os > > build.linux/type-debug--arch-x64/cppdom/ext/OptionRepository.os > > build.linux/type-debug--arch-x64/cppdom/SpiritParser.os -L/usr/lib > > /usr/bin/ld: /usr/lib/gcc/i486-linux-gnu/4.1.2/64/libstdc++.a(functexcept.o): > > relocation R_X86_64_32 against `std::bad_typeid::~bad_typeid()' can > > not be used when making a shared object; recompile with -fPIC > > /usr/lib/gcc/i486-linux-gnu/4.1.2/64/libstdc++.a: could not read > > symbols: Bad value > > collect2: ld returned 1 exit status > > scons: *** [build.linux/type-debug--arch-x64/cppdom/libcppdom-0_7_7.so] Error 1 > > scons: building terminated because of errors. > > ----- > > When it builds the object files, is -fPIC used? If not, you could add it to > the CFLAGS in the SConstruct ... somewhere. I haven't used the CppDOM trunk, > and its build is surprisingly unfamiliar to me. Perhaps someone else knows > where that option could/should be added. > > I notice that you're building the Boost Spirit parser for CppDOM. I may be > wrong, but I don't think that you want to do that. IIRC, it ended up being > slower than CppDOM's current parser. Of course, the Spirit parser is likely > to be much smarter and more robust, so perhaps the author could chime in > here about the best course... I re-ran scons as 'scons var_arch=ia32' to compile only the 32-bit version and it succeeded. (It will be running on a 32-bit system.. but apparently the default is to build all architectures.) As to the Spirit parser, that must also be the default (as I didn't specify any other options than the architecture to scons). I've attached a log file of the trunk build. > > When I try to compile the released 0.6.6, I get the following error: > > > > ----- > > g++ -o build.linux-i686/test/suite/runner -m32 > > build.linux-i686/test/suite/runner.o > > build.linux-i686/test/suite/TestCases/ErrorTest.o > > build.linux-i686/test/suite/TestCases/NodeTest.o > > build.linux-i686/test/suite/TestCases/ParseTest.o > > build.linux-i686/test/suite/TestCases/PredTest.o > > build.linux-i686/test/suite/TestCases/OptionRepositoryTest.o > > build.linux-i686/test/suite/TestCases/SpiritTest.o -L/usr/lib > > -Lbuild.linux-i686/instlinks/lib -lcppdom -lcppunit -ldl -ldl -ldl > > build.linux-i686/test/suite/TestCases/OptionRepositoryTest.o: In > > function `testHelpers::dump_node(cppdom::Node&, int)': > > test/testHelpers.h:13: multiple definition of > > `testHelpers::dump_node(cppdom::Node&, int)' > > build.linux-i686/test/suite/TestCases/NodeTest.o:test/testHelpers.h:13: > > first defined here > > collect2: ld returned 1 exit status > > scons: *** [build.linux-i686/test/suite/runner] Error 1 > > scons: building terminated because of errors. > > ----- > > Don't tell the build where to find CppUnit. That way, the test suite will > not be compiled. > > As far as this error goes, I don't know why you would be seeing multiply > defined symbols in this case. The dump_node() function is declared inline. > Looking at the code, I don't see any reason why it shouldn't be defined in a > .cpp file to get rid of the inline hack. It auto-detected the CppUnit libraries; I didn't tell it where to find them. I've attached a log file of my attempt to build the 0.6.6 release as well. > > I'm using Ubuntu Linux 6.10 (edgy). Any advice? > > I made a 32-bit .deb package for Ubuntu 6.10, but it looks as though you > want 64-bit. If you want a 32-bit build, I can send you the package. I'm interested in the 32-bit .deb package if it's available. I'd also be interested in any other .deb packages you might have for VR Juggler and its dependencies (CPP DOM and GTML, primarily---I think most the other prerequisites already have .deb packages in the Ubuntu repositories). Thanks again for your help! --Kevin Godby |