michaelrsweet / mxml

Tiny XML library.
https://www.msweet.org/mxml
Apache License 2.0
426 stars 157 forks source link

Is it possible to allow autoreconf? #296

Closed FantasqueX closed 1 year ago

FantasqueX commented 1 year ago

Hi, I would like to build mxml for RISCV. Building fails and logs are as follows.

checking build system type... ./config.guess: unable to guess system type

This script, last modified 2013-11-29, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2013-11-29

uname -m = riscv64
uname -r = 5.18.7-arch1-1
uname -s = Linux
uname -v = #1 SMP PREEMPT_DYNAMIC Sat, 25 Jun 2022 20:22:01 +0000

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

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

UNAME_MACHINE = riscv64
UNAME_RELEASE = 5.18.7-arch1-1
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP PREEMPT_DYNAMIC Sat, 25 Jun 2022 20:22:01 +0000
configure: error: cannot guess build type; you must specify one

The problem is that config.guess is outdated and is unable to recognize RISCV arch. Our normal resolution to this problem is autoreconf -fiv to replace config.guess and config.sub with those bundled with system. I noticed https://github.com/michaelrsweet/mxml/blob/fd47c7d115191c8a6bce2c781ffee41e179530f2/configure.ac#L23 this line disallows me to execute autoconf -fiv. So my question is is it possible to allow autoreconf? I would like to help with any problems.

Or is it possible to update config.guess bundled in release tarball?

michaelrsweet commented 1 year ago

I will update the config.guess script. autoreconf has a lot of unfortunate side-effects which is why I have disabled its use in my projects.

FantasqueX commented 1 year ago

Although my issue is solved, I really wonder how do you generate "configure". Don't you use autoconf?

I try to execute autoreconf, and noticed there are two syntax error and one link problem. with my up-to-date autotools I think it's possible to fix autoreconf with some effort.

michaelrsweet commented 1 year ago

@FantasqueX I've updated config.guess and config.sub:

[master 94dd0de] Update config.guess and config.sub (Issue #296)

Yes, I do run autoconf to update the configure script. But only autoconf - not autoreconf (part of autoheader) or automake because, in particular, they introduce problems on so-called "non-free" platforms. And I'm looking at removing autoconf for Mini-XML 4.0...

FantasqueX commented 1 year ago

Ok, thanks for the fix.