adtools / amigaos-cross-toolchain

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

Build fails on Mac OS X Mavericks #3

Closed amiga23 closed 10 years ago

amiga23 commented 10 years ago

On current Mac OS X Mavericks with up to date macports I do get the following error:

In file included from /Volumes/MacintoshHD0/amiga-toolchain/m68k-amigaos-toolchain/sources/binutils-2.9.1/ld/lexsup.c:32:
/Volumes/MacintoshHD0/amiga-toolchain/m68k-amigaos-toolchain/sources/binutils-2.9.1/ld/ldmisc.h:43:13: error: conflicting types for 'xexit'
extern void xexit PARAMS ((int));
            ^
/Volumes/MacintoshHD0/amiga-toolchain/m68k-amigaos-toolchain/sources/binutils-2.9.1/ld/../include/libiberty.h:118:31: note: previous declaration is here
__volatile__ libiberty_voidfn xexit;
                              ^
1 warning and 1 error generated.
make[1]: *** [lexsup.o] Error 1
make: *** [all-ld] Error 2

GCC Version:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
cahirwpz commented 10 years ago

Can you take gcc from macports ? Does the error repeat ?

amiga23 commented 10 years ago

I switched to gcc48 from macports by modifying bootstrap.sh

CC="/opt/local/bin/gcc-mp-4.8" #"$(which gcc)"
CXX="/opt/local/bin/g++-mp-4.8"  #"$(which g++)"

did remove the stamps folder to recompile everything (is that enough?). Then I got the following error:

...
+ make install
/usr/bin/install -c -d /opt/m68k-amigaos/bin /opt/m68k-amigaos/share/fd2sfd
# Install tools
/usr/bin/install -c -s fd2sfd /opt/m68k-amigaos/bin
/usr/bin/install -c -s cross/bin/gg-fix-includes /opt/m68k-amigaos/bin
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: can't process non-object and non-archive file: /opt/m68k-amigaos/bin/gg-fix-includes
for f in `cd ./cross/share/ && find * -type f`; do \
      /usr/bin/install -c -m 644 -D ./cross/share/${f} /opt/m68k-amigaos/share/fd2sfd/${f}; \
    done
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
/usr/bin/install: illegal option -- D
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install] Error 64

I solved it by installing coreutils and putting them in front of the path

sudo port install coreutils
PATH=/opt/local/libexec/gnubin/:$PATH ./bootstrap.sh --prefix=/opt/m68k-amigaos build

Thank you very much for sharing this and spending your time.

cahirwpz commented 10 years ago

I switched to gcc48 from macports by modifying bootstrap.sh

CC="/opt/local/bin/gcc-mp-4.8" #"$(which gcc)" CXX="/opt/local/bin/g++-mp-4.8" #"$(which g++)"

did remove the stamps folder to recompile everything (is that enough?).

Probably you could achieve the same with "port select gcc". Removing stamps is good enough, though several times I needed to just clean everything by issuing "./bootstrap.sh clean".

Then I got the following error:

...

  • make install /usr/bin/install -c -d /opt/m68k-amigaos/bin /opt/m68k-amigaos/share/fd2sfd

    Install tools

    /usr/bin/install -c -s fd2sfd /opt/m68k-amigaos/bin /usr/bin/install -c -s cross/bin/gg-fix-includes /opt/m68k-amigaos/bin /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: can't process non-object and non-archive file: /opt/m68k-amigaos/bin/gg-fix-includes

I'm aware this warning / error. On some systems it can break compilation.

for f in cd ./cross/share/ && find * -type f; do \ /usr/bin/install -c -m 644 -D ./cross/share/${f} /opt/m68k-amigaos/share/fd2sfd/${f}; \ done /usr/bin/install: illegal option -- D

Ok. Once again a minor difference between BSD / MacOSX and GNU tools can break the build. I'll correct the Makefile.in for sfdc.

I solved it by installing coreutils and putting them in front of the path

sudo port install coreutils PATH=/opt/local/libexec/gnubin/:$PATH ./bootstrap.sh --prefix=/opt/m68k-amigaos build

What a nasty hack! But at least we know the culprit.

Thank you very much for sharing this and spending your time.

You're welcome! Did you try to build compile some programs?

Kind regards Krystian Bacławski

argasek commented 10 years ago

@amiga23 There's a pull request: #4 on the way to fix both issues you've encountered :)