Re: Cross compiling with autotools



I don't understand this. You have a cross compiler that can't build executables. It's accepted by ./configure, when you configure libsigc++, but not when you configure libxml++. Am I right?

Both libsigc++ and lixml++ have AC_PROG_CXX in their configure.ac files. The description of the autoconf macro AC_PROG_CXX says
"If the compiler being used does not produce executables, the tests fail. If the executables can’t be run, and cross-compilation is not enabled, they fail too."

Does ./configure find the same compiler in both cases?

There is an old but still open bug that discusses the possibility of making libxml++ independent of glibmm,
https://bugzilla.gnome.org/show_bug.cgi?id=320197
The suggestion in that bug has not been accepted. Now libxml++ is even more dependent on glibmm than it was when the bug was filed. Now libxml++ uses not only Glib::ustring, but also Glib::Threads::Mutex.

The libxml2 documentation at http://xmlsoft.org/python.html mentions two other C++ wrappers. I don't know anything about them.

Kjell

2013-04-21 11:14, lcidfire googlemail com skrev:
The following libs build fine:
libxml2 (./configure --host=i386-pc-linux-gnu --prefix=${EMSCRIPTEN_SYSTEM_ROOT} --with-threads=no --with-ftp=no --with-http=no CPPFLAGS=-D__LINUX_ERRNO_EXTENSIONS__)
libsigc++ (./configure --host=i386-pc-linux-gnu --prefix=${EMSCRIPTEN_SYSTEM_ROOT} --enable-static=yes --enable-shared=no)

Disabling AC_PROG_CXX seems to get me at least a little further.
Sadly I cannot yet compile glib due to locale problems.
Which leads me to question using libxml++ at all. The thing I like about libxml2 is that it can be used outside of gnome. Sadly libxml++ can not :(.
Is there a wrapper around libxml2, which does not depend upon glib?


On Sun, Apr 21, 2013 at 10:06 AM, Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
Can you build other packages, e.g. glibmm, which libxml++ depends on? How about glib and libsigc++? If you can build other packages, then there must be some important difference in the configure.ac files of those packages and libxml++.

When I compared the configure.ac files of glibmm and libxml++, I noticed that glibmm has
  LT_INIT([win32-dll])
where libxml++ has
  LT_INIT([dlopen win32-dll disable-static])
but I don't know if that's important. I suspect it's not. It's AC_PROG_CXX that expands to compiler tests in the configure file.

Kjell

2013-04-19 10:39, lcidfire googlemail com skrev:

For casablanca, I need to get libxml++ cross compiled via Emscripten.
Upon trying I very soon fail since autoconfig wrongly checks for the compiler building a default executable (which would be wrong too for e.g. Android-ARM).
I try to configure via:
emconfigure ./configure --host=i386-pc-linux-gnu --enable-static=yes --enable-shared=no CPPFLAGS="`empkg-config --cflags libxml-2.0`" LIBS="`empkg-config --libs libxml-2.0`"

But it fails with:
checking whether the C++ compiler works... no
configure: error: in `/libxml++/2.36.0':
configure: error: C++ compiler cannot create executables

My question is whether someone could walk me through how to modify your autotools setup or whether it might be better to fork libxml++ and to build it using SCons.








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]