Giter Club home page Giter Club logo

Comments (4)

JayyCee avatar JayyCee commented on July 27, 2024

It turned out that, it seems to me, the following libraries need to be installed on the host (Ubuntu 16.04 in my case) before "./configure" for the gcc-src to be invoked:

libmpc-dev
libmpfr-dev
libisl-dev

After this, "./configure" completes without any error.

from raspi3-tutorial.

bztsrc avatar bztsrc commented on July 27, 2024

Yes, if you have the option to use your system's packaging manager you should do that instead of downloading the source directly. Packaged sources are often patched to the needs of that specific system.

from raspi3-tutorial.

vp080808 avatar vp080808 commented on July 27, 2024

Hi all,

My system is OSX 10.13.4 andI had a bunch of hurdles to go through to get everything working.
One of the major issues is that macports installs a libiconv which has different symbols from the Xcode 9.3 version. E.g.

vp-lion:/ % nm /usr/lib/libiconv.2.dylib | grep iconv
00000000000f1d80 S ___iconv_2VersionNumber
00000000000f1d50 S ___iconv_2VersionString
00000000000f3750 D __libiconv_version
0000000000002b15 T _iconv
0000000000002e33 T _iconv_canonicalize
0000000000002b37 T _iconv_close
000000000000188d T _iconv_open
0000000000002b44 T _iconvctl
0000000000002c40 T _iconvlist
0000000000014f10 T _libiconv_relocate
00000000000f3760 b _libiconv_relocate.initialized
0000000000014e57 T _libiconv_set_relocation_prefix
vp-lion:/ % nm /opt/local/lib/libiconv.2.dylib | grep iconv
00000000000f67d0 D __libiconv_version
000000000000374a T _iconv_canonicalize
0000000000002f72 T _libiconv
0000000000002f94 T _libiconv_close
0000000000001c5c T _libiconv_open
0000000000002fa1 T _libiconv_open_into
0000000000016c79 t _libiconv_relocate
0000000000016bc0 T _libiconv_set_relocation_prefix
000000000000345c T _libiconvctl
0000000000003558 T _libiconvlist

So to get everything working I had to follow this procedure:

a) download ONLY binutils and gcc. The others should be installed using a packages manager (e.g. macports).

Give priority to the libraries installed at /opt/local/lib over the system ones:

setenv LIBRARY_PATH /opt/local/lib:/usr/lib:/usr/local/lib
or if you use /bin/sh
export LIBRARY_PATH=/opt/local/lib:/usr/lib:/usr/local/lib

b) configure binutils with:

cd binutils*
sh configure --disable-nls --prefix=/usr/local/cross-compiler --target=aarch64-elf --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-system-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-plugin --disable-linker-build-id --enable-lto --enable-install-libiberty --with-linker-hash-style=gnu --with-gnu-ld --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-gnu-unique-object

(note the --with-system-isl option which allows you to use the installed version of isl and the --disable-nls which gets rid of the i13n code)

make -j4
(j4 means 4 cores)
sudo make install
if you get errors such as
clang: error: unsupported option '-print-multi-os-directory'
do not worry, ignore them

The installation places files at: /usr/local/cross-compiler
So be sure to add this directory in your path to execute the new commands

set path= ( /usr/local/cross-compiler/bin $path )

c) configure gcc with:

cd ../gcc* ;
sh  --prefix=/usr/local/cross-compiler --target=aarch64-elf --enable-languages=c --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-plugin --disable-linker-build-id --enable-lto --enable-install-libiberty --with-linker-hash-style=gnu --with-gnu-ld --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-gnu-unique-object --with-gmp-include=/opt/local/include --with-gmp-lib=/opt/local/lib

(note the use of options --with-gmp-include=/opt/local/include --with-gmp-lib=/opt/local/lib to use the installed version of the gmp)

make -j4 all-gcc
sudo make install-gcc

You are done.

**vp

from raspi3-tutorial.

bztsrc avatar bztsrc commented on July 27, 2024

Thank you very much for your detailed description on OSX!

from raspi3-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.