davidtzai / xplus-xsd2cpp

Automatically exported from code.google.com/p/xplus-xsd2cpp
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Compilation fails on Fedora 12 #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure using ./configure --prefix=`pwd`
2. Compilation fails during make

What is the expected output? What do you see instead?

1. src/DOM/Document.cpp needs #include<assert.h>, without that line #105 has 
error.
2. Without LDFLAGS = -lexpat in src/Makefile, several linker errors related to 
libexpat halt compilation.

for instance, 

./.libs/libxsdall.so: undefined reference to `XML_SetNamespaceDeclHandler' and 
many more.

3. Finally, the following linker error I could not fix myself.

Making all in Poco
make[1]: Entering directory `/project/xmlplus-0.1/src/Poco'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/project/xmlplus-0.1/src/Poco'
Making all in XPlus
make[1]: Entering directory `/project/xmlplus-0.1/src/XPlus'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/project/xmlplus-0.1/src/XPlus'
Making all in DOM
make[1]: Entering directory `/project/xmlplus-0.1/src/DOM'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/project/xmlplus-0.1/src/DOM'
Making all in XSD
make[1]: Entering directory `/project/xmlplus-0.1/src/XSD'
make  all-am
make[2]: Entering directory `/project/xmlplus-0.1/src/XSD'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/project/xmlplus-0.1/src/XSD'
make[1]: Leaving directory `/project/xmlplus-0.1/src/XSD'
Making all in tools
make[1]: Entering directory `/project/xmlplus-0.1/src/tools'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/project/xmlplus-0.1/src/tools'
make[1]: Entering directory `/project/xmlplus-0.1/src'
/bin/sh ../libtool --tag=CXX   --mode=link g++ -g -O0 -I../include  -O2  
-lexpat  -o fsmTest XSD/FsmTest.o libxsdall.la
libtool: link: g++ -g -O0 -I../include -O2 -o .libs/fsmTest XSD/FsmTest.o  
-lexpat ./.libs/libxsdall.so -lpthread -Wl,-rpath -Wl,/project/xmlplus-0.1/lib
./.libs/libxsdall.so: undefined reference to `populateDocument(DOM::Document*)'
./.libs/libxsdall.so: undefined reference to 
`updateOrConsumeDocument(DOM::Document*)'
./.libs/libxsdall.so: undefined reference to `createXsdDocument(bool)'
./.libs/libxsdall.so: undefined reference to 
`createXsdDocument(std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >)'
collect2: ld returned 1 exit status
make[1]: *** [fsmTest] Error 1
make[1]: Leaving directory `/project/xmlplus-0.1/src'
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?

xmlPlus 0.1

Please provide any additional information below.
Compilation fails on Ubuntu 10.10 too.

Original issue reported on code.google.com by sutambe on 25 Nov 2010 at 10:17

GoogleCodeExporter commented 9 years ago
1. Pls retain your src/Document.cpp fix for include of <assert.h>

2. in xmlplus source root, do make clean

3. in src/Makefile.am do following fixes:

    2.1)   add -S option CXXFLAGS/CFLAGS , should look like this:

    AM_CXXFLAGS= -S -g -O0 -I$(top_srcdir)/include
    AM_CFLAGS= -S -g -O0 -I$(top_srcdir)/include -I$(top_srcdir)/src/DOM/

    2.2) remove fvisibility flag towards the end of the file, rather add -lexpat like so:

    before:    libxsdall_la_LDFLAGS = -fvisibility=default -lpthread
    after:       libxsdall_la_LDFLAGS = -lexpat -lpthread

   (some libtool versions, abort on seeing this option -fvisibility=default, and we dont need this option )

4. then run ./configure(or autogen.sh) in xmlplus source root again, and then 
"make && make install"

Note: A formal fix will be rolled out soon.

Original comment by xmlplus....@gmail.com on 27 Nov 2010 at 7:56

GoogleCodeExporter commented 9 years ago

Original comment by xmlplus....@gmail.com on 27 Nov 2010 at 7:58

GoogleCodeExporter commented 9 years ago
Fixed in xmlplus-0.1 branch as well as trunk.

Following are the ways to use this fix:

1. download xmlplus-0.1.1.src.tar.gz from sourceforge, which has xmlplus-0.1 
plus fixes:
  https://sourceforge.net/projects/xmlplus/files/xmlplus/0.1.1/xmlplus-0.1.1.src.tar.gz/download

2. apply the xmlplus-0.1.patch.tgz attached with this bug.
   To apply the patch, place this xmlplus-0.1.patch.tgz archive inside your xmlplus-0.1 source root, and then run:

   tar -zxvf xmlplus-0.1.patch.tgz

   This will replace the files accordingly.
   After applying patch, one must run "make clean" followed by "configure, make, make install" again.

Original comment by xmlplus....@gmail.com on 29 Nov 2010 at 7:51

GoogleCodeExporter commented 9 years ago
attachment here...

Original comment by xmlplus....@gmail.com on 29 Nov 2010 at 7:52

Attachments: