M-HT / SR

A project to statically recompile following games to create Windows or Linux (x86 or arm) versions of the games - Albion, X-Com: UFO Defense (UFO: Enemy Unknown), X-Com: Terror from the Deep, Warcraft: Orcs & Humans, Septerra Core: Legacy of the Creator, Battle Isle 3: Shadow of the Emperor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot compile wildmidi (headers "present but cannot be compiled")

jtrees opened this issue · comments

When trying to compile wildmidi I get a bunch of warnings upon running ./configure. They look like this:

configure: WARNING: alsa/asoundlib.h: present but cannot be compiled
configure: WARNING: alsa/asoundlib.h:     check for missing prerequisite headers?
configure: WARNING: alsa/asoundlib.h: see the Autoconf documentation
configure: WARNING: alsa/asoundlib.h:     section "Present But Cannot Be Compiled"
configure: WARNING: alsa/asoundlib.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------------------------------------- ##
configure: WARNING:     ## Report this to http://sourceforge.net/tracker/?group_id=42635&atid=433744 ##
configure: WARNING:     ## ------------------------------------------------------------------------- ##

I get the same block for:

  • alsa/asoundlib.h
  • errno.h
  • linux/soundcard.h
  • sys/ioctl.h
  • sys/soundcard.h

When running make, compilation fails with this error:

Making all in include
make[1]: Entering directory '/home/josh/archive/src/SR/midi-libs/wildmidi-0.2.3.5svn/include'
make  all-am
make[2]: Entering directory '/home/josh/archive/src/SR/midi-libs/wildmidi-0.2.3.5svn/include'
make[2]: Leaving directory '/home/josh/archive/src/SR/midi-libs/wildmidi-0.2.3.5svn/include'
make[1]: Leaving directory '/home/josh/archive/src/SR/midi-libs/wildmidi-0.2.3.5svn/include'
Making all in src
make[1]: Entering directory '/home/josh/archive/src/SR/midi-libs/wildmidi-0.2.3.5svn/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -I../include    -m32 -std=c99 -U__STRICT_ANSI__ -Wall -Wextra -pedantic -Werror -O2 -std=gnu99 -frename-registers -finline-limit=32000 -Winline -ffast-math -funroll-loops -fexpensive-optimizations -finline-functions -march=i686 -MT libWildMidi_la-file_io.lo -MD -MP -MF .deps/libWildMidi_la-file_io.Tpo -c -o libWildMidi_la-file_io.lo `test -f 'file_io.c' || echo './'`file_io.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -m32 -std=c99 -U__STRICT_ANSI__ -Wall -Wextra -pedantic -Werror -O2 -std=gnu99 -frename-registers -finline-limit=32000 -Winline -ffast-math -funroll-loops -fexpensive-optimizations -finline-functions -march=i686 -MT libWildMidi_la-file_io.lo -MD -MP -MF .deps/libWildMidi_la-file_io.Tpo -c file_io.c  -fPIC -DPIC -o .libs/libWildMidi_la-file_io.o
In file included from /usr/include/bits/errno.h:26:0,
                 from /usr/include/errno.h:28,
                 from file_io.c:30:
/usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory
 #include <asm/errno.h>
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:513: recipe for target 'libWildMidi_la-file_io.lo' failed
make[1]: *** [libWildMidi_la-file_io.lo] Error 1
make[1]: Leaving directory '/home/josh/archive/src/SR/midi-libs/wildmidi-0.2.3.5svn/src'
Makefile:381: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Any ideas?

commented

What linux distribution are you using ? And what parameters did you use when running ./configure.

I ran configure like so:

$ ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "LDFLAGS=-m32"

My specs:

  • distro: elementary OS 5.1.6 (based on Ubuntu 18.04)
  • kernel: Linux 5.4.0-42-generic
  • 64 bit system
commented

I installed elementary OS 5.1.6 in virtual machine and I didn't get such errors. Did you run ./bootstrap before running ./configure ? And were there any errors ?

I did run ./bootstrap first. Without it, there is no configure script.

Here is the output:

configure.ac:53: installing './compile'
configure.ac:57: installing './config.guess'
configure.ac:57: installing './config.sub'
configure.ac:21: installing './install-sh'
configure.ac:21: installing './missing'
src/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/Makefile.am: installing './depcomp'
commented

Can you post your config.log file ?

I tried installing the gcc-multilib package (idea from here). It appears to have done the trick because I'm not getting any warnings from configure anymore.

The package still doesn't compile but I'll open another issue for that.

Thanks for your help so far.