Installation

Home Forums Forum Installation

This topic contains 40 replies, has 2 voices, and was last updated by  rich 6 years, 8 months ago.

Viewing 15 posts - 16 through 30 (of 41 total)
  • Author
    Posts
  • #1543

    Trent

    Just so I know (I’m still unable to get it to compile at all) what are the steps that you are using to get it that far Gordon?

    What OS are you using as a base and what are you doing to it after (what packages are you installing?)

    #1544

    Gordon

    binutils seems to make without error, but I still get the error…

    .
    .
    .
    Making all in po
    make[4]: Entering directory `/home/gordon/ellcc/gnu/gnu-build/binutils/ld/po’
    make[4]: Nothing to be done for `all’.
    make[4]: Leaving directory `/home/gordon/ellcc/gnu/gnu-build/binutils/ld/po’
    make[4]: Entering directory `/home/gordon/ellcc/gnu/gnu-build/binutils/ld’
    make[4]: Leaving directory `/home/gordon/ellcc/gnu/gnu-build/binutils/ld’
    make[3]: Leaving directory `/home/gordon/ellcc/gnu/gnu-build/binutils/ld’
    make[2]: Leaving directory `/home/gordon/ellcc/gnu/gnu-build/binutils/ld’
    make[1]: Nothing to be done for `all-target’.
    make[1]: Leaving directory `/home/gordon/ellcc/gnu/gnu-build/binutils’
    gordon@ubuntu:~/ellcc/gnu/gnu-build/binutils$ cd ../../
    gordon@ubuntu:~/ellcc/gnu$ cd ../../armwork/
    gordon@ubuntu:~/armwork$ ../ellcc/bin/ecc -target arm-ellcc-linux-eabi -march=armv7 -mfpu=vfp -mfloat-abi=softfp -no-integrated-as helloarm.c
    ecc: error: unable to execute command: Executable “arm-elf-as” doesn’t exist!
    ecc: error: assembler command failed with exit code 1 (use -v to see invocation)

    is everything required in the svn archive? (guessing here)

    #1545

    rich
    Keymaster

    Hi Gordon,

    I suspect the earlier GNU tools configure failed.
    Go into ~/ellcc/gnu and type “./build”. That should build all the GNU tools, including the assemblers.

    -Rich

    #1546

    Gordon

    Fond something:

    make: Entering directory `/home/gordon/ellcc/gnu/gnu-build-x86_64-linux/binutils’
    make[1]: Entering directory `/home/gordon/ellcc/gnu/gnu-build-x86_64-linux/binutils’
    Configuring in ./intl
    configure: loading cache ./config.cache
    configure: error: `CC’ has changed since the previous run:
    configure: former value: `/home/gordon/Applications/ellcc/bin/ecc’
    configure: current value: `/home/gordon/ellcc/bin/ecc’
    configure: error: in `/home/gordon/ellcc/gnu/gnu-build-x86_64-linux/binutils/intl’:
    configure: error: changes in the environment can compromise the build
    configure: error: run make distclean' and/orrm ./config.cache’ and start over
    make[1]: *** [configure-intl] Error 1
    make[1]: Leaving directory `/home/gordon/ellcc/gnu/gnu-build-x86_64-linux/binutils’
    make: *** [all] Error 2
    make: Leaving directory `/home/gordon/ellcc/gnu/gnu-build-x86_64-linux/binutils’

    #1547

    Gordon

    Disregard last, I was trying to mimic your file structure – have moved it back and am compiling now.

    #1548

    Gordon

    gnu built ok:

    #1549

    Gordon

    Hi Trent:
    Here (as far as i can be sure) are the steps i took to get it going – in case its useful to anyone else getting started:

    I created a Ubuntu 12-04 LTS Desktop VM from Ubuntu iso on VMWare Fusion.
    (Only take a few minutes to get a clean environment).
    I had to load the following packages (commands given):
    sudo apt-get update
    sudo apt-get install byacc flex
    sudo apt-get install zlib1g-dev libncurses5-dev
    sudo apt-get install libglib2.0-dev
    sudo apt-get install dh-autoreconf
    (I hope this list is complete but you’ll found out soon enough 🙂
    Then I checkout the latest ellcc from the repo.
    Note: svn checkout kept failing – repo is a long way away from me and latency is a killer – I kept repeating the failing checkout
    – finally worked out i could update the partly populated repository with svn update 🙂
    It then build successfully from the ./build script

    #1550

    Gordon

    When I omit the last option I get the EABI5 failure:
    /home/gordon/Applications/ellcc/bin/ecc-ld: error: Source object /home/gordon/Applications/ellcc/bin/../libecc/lib/arm/linux/crtend.o has EABI version 0, but target a.out has EABI version 5
    /home/gordon/Applications/ellcc/bin/ecc-ld: failed to merge target specific data of file /home/gordon/Applications/ellcc/bin/../libecc/lib/arm/linux/crtend.o
    ecc: error: linker command failed with exit code 1 (use -v to see invocation)
    gordon@ubuntu:~/armwork$ /home/gordon/Applications/ellcc/bin/ecc helloarm.c -target arm-ellcc-linux-eabi -march=armv7 -mfpu=vfp -mfloat-abi=softfp

    But when i use it I get nothing:
    gordon@ubuntu:~/armwork$ /home/gordon/Applications/ellcc/bin/ecc helloarm.c -target arm-ellcc-linux-eabi -march=armv7 -mfpu=vfp -mfloat-abi=softfp -no-integrated-as
    gordon@ubuntu:~/armwork$

    just the prompt (I’m probably doing something silly)

    my bin directory looks like:
    gordon@ubuntu:~/Applications/ellcc/bin$ ls
    arm-elf-as ecc-objcopy llvm-link qemu-armeb
    bugpoint ecc-objdump llvm-mc qemu-i386
    c-index-test ecc-ranlib llvm-mcmarkup qemu-microblaze
    clang-check ecc-readelf llvm-nm qemu-mips
    clang-format ecc-size llvm-objdump qemu-mipsel
    clang-tblgen ecc-strings llvm-ranlib qemu-ppc
    count ecc-strip llvm-readobj qemu-ppc64
    ecc FileCheck llvm-rtdyld qemu-ppc64abi32
    ecc++ i386-elf-as llvm-size qemu-sparc
    ecc-addr2line llc llvm-stress qemu-system-arm
    ecc-ar lli llvm-symbolizer qemu-system-i386
    ecc-as lli-child-target llvm-tblgen qemu-system-microblaze
    ecc-c++filt llvm-ar macho-dump qemu-system-mips
    ecc-elfedit llvm-as microblaze-elf-as qemu-system-mipsel
    ecc-embedspu llvm-bcanalyzer mips-elf-as qemu-system-ppc
    ecc-gdb llvm-config ncurses5-config qemu-system-ppc64
    ecc-gprof llvm-cov not qemu-system-sparc
    ecc-ld llvm-diff opt qemu-system-x86_64
    ecc-ld.bfd llvm-dis ppc64-elf-as qemu-x86_64
    ecc-lit llvm-dwarfdump ppc-elf-as sparc-elf-as
    ecc-nm llvm-extract qemu-arm x86_64-elf-as
    gordon@ubuntu:~/Applications/ellcc/bin$

    #1554

    Gordon

    OSX – Mavericks story.

    With the latest code, I can almost build it using CLANG on Mavericks, still has the same EABI5/0 issue for arm, and the qemu is not building correctly – has no “qemu-mips” and “qemu-arm” (etc.) components int eh bin directory despite no errors on build. The bin directory listing is:
    FileCheck ecc-c++filt ecc-size llvm-dis llvm-symbolizer qemu-system-mips
    arm-elf-as ecc-elfedit ecc-strings llvm-dwarfdump llvm-tblgen qemu-system-mipsel
    bugpoint ecc-embedspu ecc-strip llvm-extract macho-dump qemu-system-ppc
    c-index-test ecc-gdb i386-elf-as llvm-link microblaze-elf-as qemu-system-ppc64
    clang-check ecc-gprof llc llvm-mc mips-elf-as qemu-system-sparc
    clang-format ecc-ld lli llvm-mcmarkup ncurses5-config qemu-system-x86_64
    clang-tblgen ecc-ld.bfd lli-child-target llvm-nm not sparc-elf-as
    count ecc-lit llvm-ar llvm-objdump opt x86_64-elf-as
    ecc ecc-nm llvm-as llvm-ranlib ppc-elf-as
    ecc++ ecc-objcopy llvm-bcanalyzer llvm-readobj ppc64-elf-as
    ecc-addr2line ecc-objdump llvm-config llvm-rtdyld qemu-system-arm
    ecc-ar ecc-ranlib llvm-cov llvm-size qemu-system-i386
    ecc-as ecc-readelf llvm-diff llvm-stress qemu-system-microblaze

    So to recap, very close with Ubuntu 12.04 and very close with Mavericks. (Centos looks pretty hard as most of the tools are need updating).

    What OS are you using to build – it might be easier to just make a VM of the right flavor to run ellcc.

    Trent: any luck?

    G.

    #1555

    rich
    Keymaster

    Hi,

    It turns out that because of the way that ELLCC is built, you don’t need to build it specifically for each individual Linux distribution. ELLCC is statically linked after you run the top-level build script twice, so does not depend on userland shared libraries.

    I made a tar file containing a binary distribution for x86_64 Linux systems as a test. I then created a CentOS 6.5 virtual machine to try it on.
    After I logged on to the virtual machine I did the following:

    wget ftp://ellcc.org/pub/x86_64-ellcc-linux.tgz
    tar xvfpz x86_64-ellcc-linux.tgz
    cat hello.c
    #include 
    
    int main(int argc, char **argv)
    {
            printf("hello world\n");
    }
    
    ellcc/bin/ecc -target x86_64-ellcc-linux hello.c
    ./a.out
    hello world
    

    Then, for the ARM:

    ellcc/bin/ecc -target arm-ellcc-linux-eabi -march=armv7 -mfpu=vfp -mfloat-abi=softfp -no-integrated-as hello.c
    file a.out
    a.out: ELF 32-bit LSB executable, ARM, version 1, statically linked, BuildID[sha1]=bd8055c52cb24e047da4b7be4cd697548fbacd64, not stripped
    
    #1557

    Gordon

    Hi Rich, I cant replicate you success, the x86 example works well, but I still get the EABI5 error which stops the compile for arm.

    [gordon@localhost ~]$ ellcc/bin/ecc -target x86_64-ellcc-linux hello.c
    [gordon@localhost ~]$ ellcc/bin/ecc -v -target arm-ellcc-linux-eabi hello.c -o helloarm.o
    clang version 3.5 (trunk)
    Target: arm-ellcc-linux-eabi
    Thread model: posix
    Selected GCC installation:
    “/home/gordon/ellcc/bin/ecc” -cc1 -triple armv4t-ellcc-linux-eabi -emit-obj -mrelax-all -disable-free -main-file-name hello.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu arm7tdmi -target-feature +soft-float-abi -target-abi aapcs -mfloat-abi soft -target-linker-version 2.23.2 -v -resource-dir /home/gordon/ellcc/bin/../libecc -fdebug-compilation-dir /home/gordon -ferror-limit 19 -fmessage-length 80 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-slp -o /tmp/hello-a30996.o -x c hello.c
    clang -cc1 version 3.5 based upon LLVM 3.5svn default target x86_64-unknown-linux-gnu
    #include “…” search starts here:
    #include <…> search starts here:
    /home/gordon/ellcc/bin/../libecc/include/arm/linux
    /home/gordon/ellcc/bin/../libecc/include/arm
    /home/gordon/ellcc/bin/../libecc/include/linux
    /home/gordon/ellcc/bin/../libecc/include
    End of search list.
    “/home/gordon/ellcc/bin/ecc-ld” -m armelf –build-id –hash-style=gnu -e _start –eh-frame-hdr -Bdynamic -dynamic-linker /usr/libexec/ld.so -o helloarm.o /home/gordon/ellcc/bin/../libecc/lib/arm/linux/crt1.o /home/gordon/ellcc/bin/../libecc/lib/arm/linux/crtbegin.o -nostdlib -L/home/gordon/ellcc/bin/../libecc/ldscripts/linux -L/home/gordon/ellcc/bin/../libecc/lib/arm/linux -L/home/gordon/ellcc/bin/../libecc/lib/arm /tmp/hello-a30996.o -Tarmelf.x -( -lc -lcompiler_rt -) /home/gordon/ellcc/bin/../libecc/lib/arm/linux/crtend.o
    /home/gordon/ellcc/bin/ecc-ld: error: Source object /home/gordon/ellcc/bin/../libecc/lib/arm/linux/libc.a(__libc_start_main.o) has EABI version 0, but target helloarm.o has EABI version 5
    .
    .
    .
    /home/gordon/ellcc/bin/ecc-ld: failed to merge target specific data of file /home/gordon/ellcc/bin/../libecc/lib/arm/linux/crtend.o
    ecc: error: linker command failed with exit code 1 (use -v to see invocation)

    This was in a Centos 6.5 x64 virtual machine with a Mavericks host – is that likely to be a factor (I’m hoping not).

    #1559

    rich
    Keymaster

    Hi Gordon,

    The ARM still needs -no-integrated-as. I haven’t had a chance to fix that yet.

    -Rich

    #1560

    rich
    Keymaster

    Gordon,

    I missed your previous post about getting nothing when you used -no-integrated-as. That’s good! Nothing means that the output file was created and is named a.out. Put it on your ARM board and have it say hello.

    -Rich

    #1561

    Gordon

    Hi Rich, I’m gett an illegal instruction now – could be some other mismatch.
    I tried chaging the endianness, but hen I got a non executable error…

    Nore: My embedded ARM Linux DMESG is:
    Linux version 2.6.35.3-571-gcca29a0 (dave@dave-debian) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #2 PREEMPT Tue Feb 19 11:17:33 PST 2013
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: Freescale MX28EVK board
    what march or mcpu option do you recommend?

    #1563

    Trent

    I’ve gotten it to compile the first time, However the second compile has an error (getting ellcc to build itself)

    /home/build/nuchain/bin/ecc -c -target x86_64-ellcc-linux -DHAVE_CONFIG_H -I. -I../../../src/binutils/intl ../../../src/binutils/intl/ngettext.c
    byacc –name-prefix=__gettext –output plural.c ../../../src/binutils/intl/plural.y
    Usage: byacc [options] filename

    Options:
    -b file_prefix set filename prefix (default “y.”)
    -d write definitions (y.tab.h)
    -i write interface (y.tab.i)
    -g write a graphical description
    -l suppress #line directives
    -o output_file (default “y.tab.c”)
    -p symbol_prefix set symbol prefix (default “yy”)
    -P create a reentrant parser, e.g., “%pure-parser”
    -r produce separate code and table files (y.code.c)
    -s suppress #define’s for quoted names in %token lines
    -t add debugging support
    -v write description (y.output)
    -V show version information and exit
    make[2]: *** [plural.c] Error 1
    make[2]: Leaving directory `/home/build/nuchain/gnu/gnu-build-x86_64-linux/binutils/intl’
    make[1]: *** [all-intl] Error 2
    make[1]: Leaving directory `/home/build/nuchain/gnu/gnu-build-x86_64-linux/binutils’
    make: *** [all] Error 2
    make: Leaving directory `/home/build/nuchain/gnu/gnu-build-x86_64-linux/binutils’

    Also after I get it compiling, If I were to want to install other libraries so that ellcc can access them (for various targets) how would I go about that?

Viewing 15 posts - 16 through 30 (of 41 total)

You must be logged in to reply to this topic.