adtools / amigaos-cross-toolchain

AmigaOS cross compiler for Linux / MacOSX / Windows
184 stars 48 forks source link

Fail to build libdebug on cygwin. #48

Closed Mooseart closed 8 years ago

Mooseart commented 8 years ago

DEBUG: enter directory ".build-m68k/build/libdebug" DEBUG: execute "make" cd /home/Mooseart/amigaos-cross-toolchain/submodules/libdebug && autoconf autoconf: configure.in: No such file or directory make: * [Makefile:76: /home/Mooseart/amigaos-cross-toolchain/submodules/libdebug/configure] Error 1 ERROR: command "make" failed with 2**

Possible explanation could be that it fails to select the correct autoconf, running the bundled autoconf 2.13 instead of the installed 2.69. Supposedly old autoconf does not support existing configure.ac as input and there's no configure.in for libdebug. Builds fine on Ubuntu though.

sezero commented 8 years ago

I'd seen this movie before.. https://github.com/cahirwpz/amigaos-cross-toolchain/pull/40#issuecomment-250971079

cahirwpz commented 8 years ago

I'm aware of this bug. The problem is deeper than you think. There's something wrong with file timestamps emulation under Cygwin. Some files do get regenerated by GNU Make where they should not. Current workaround is to touch configure script. You can try out WIP patch:

diff --git a/toolchain-m68k b/toolchain-m68k
index 767ff86..2ee72c4 100755
--- a/toolchain-m68k
+++ b/toolchain-m68k
@@ -395,6 +395,8 @@ def build():
               '--with-headers={sources}/{ixemul}/include',
               from_dir='{submodules}/{gcc}')
     touch_genfiles('{submodules}/{gcc}')
+    touch('{submodules}/{gcc}/gcc/c-parse.gperf')
+    touch('{submodules}/{gcc}/gcc/configure')
     make('{gcc}', 'all-gcc',
          MAKEINFO='makeinfo', CFLAGS_FOR_TARGET='-noixemul')
     make('{gcc}', 'install-gcc',
@@ -437,6 +439,7 @@ def build():
   with env(CC='m68k-amigaos-gcc -noixemul',
            AR='m68k-amigaos-ar',
            RANLIB='m68k-amigaos-ranlib'):
+    touch('{submodules}/{libdebug}/configure')
     configure('{libdebug}',
               '--prefix={target}/m68k-amigaos/libnix',
               '--host=m68k-amigaos',

PS. Cygwin is giving me a lot of PITA out of all platforms I support. It's like never ending story... really!

Mooseart commented 8 years ago

Yes. That patch did the trick. Thanks.

Mooseart commented 8 years ago

Would you like me to close the issue or do you prefer to keep it around until the fix has been committed?

cahirwpz commented 8 years ago

I'll close it when I the patch is pushed.