Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Help! GCC compiling error:arm-linux-gnueabihf-gcc:not found

I'm doing gcc compiling on ubuntu according to the tutorial:my_first_hps.

jungu@ubuntu:~/altera/14.0/embedded/my_first_hps$ arm-linux-gnueabihf-gcc
/home/jungu/altera/14.0/embedded/ds-5/bin/arm-linux-gnueabihf-gcc: 18: exec: /home/jungu/altera/14.0/embedded/ds-5/sw/gcc/bin/arm-linux-gnueabihf-gcc: not found

BUT it is there!!!!

jungu@ubuntu:~/altera/14.0/embedded$ cd ds-5/sw/gcc/bin
jungu@ubuntu:~/altera/14.0/embedded/ds-5/sw/gcc/bin$ ls
arm-linux-gnueabihf-addr2line     arm-linux-gnueabihf-gprof
arm-linux-gnueabihf-ar            arm-linux-gnueabihf-ld
arm-linux-gnueabihf-as            arm-linux-gnueabihf-ld.bfd
arm-linux-gnueabihf-c++           arm-linux-gnueabihf-ldd
arm-linux-gnueabihf-c++filt       arm-linux-gnueabihf-ld.gold
arm-linux-gnueabihf-cpp           arm-linux-gnueabihf-nm
arm-linux-gnueabihf-ct-ng.config  arm-linux-gnueabihf-objcopy
arm-linux-gnueabihf-elfedit       arm-linux-gnueabihf-objdump
arm-linux-gnueabihf-g++           arm-linux-gnueabihf-pkg-config
arm-linux-gnueabihf-gcc           arm-linux-gnueabihf-pkg-config-real
arm-linux-gnueabihf-gcc-4.7.3     arm-linux-gnueabihf-ranlib
arm-linux-gnueabihf-gcc-ar        arm-linux-gnueabihf-readelf
arm-linux-gnueabihf-gcc-nm        arm-linux-gnueabihf-size
arm-linux-gnueabihf-gcc-ranlib    arm-linux-gnueabihf-strings
arm-linux-gnueabihf-gcov          arm-linux-gnueabihf-strip
arm-linux-gnueabihf-gfortran

I've been struggling for days, I'm new to linux OS. Is there anyone can help me? thanks

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I think Jungu uses the arm compiler that comes with SoCEDS package. I'm on Ubuntu, and I'm getting the same issue when I try to compile the hello_world example,

    Did you solved this issue? If so, tell me, please, how you fixed it!

    Thanks.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    actually I forgot how I fixed this problem. I tried windows OS later. I found there is a mistake in the makefile. I don't whether it can work in ubuntu. You can try this. Here is the makefile code:

    #

    TARGET = my_first_hps

    #

    CROSS_COMPILE = arm-linux-gnueabihf-

    CFLAGS = -g -Wall -I

    ${SOCEDS_DEST_ROOT}/ip/altera/hps/altera_hps/hwlib/include

    LDFLAGS = -g -Wall

    CC = $(CROSS_COMPILE)gcc

    ARCH= arm

    build: $(TARGET)

    $(TARGET): main.o

    $(CC) $(LDFLAGS) $^ -o $@

    %.o : %.c

    $(CC) $(CFLAGS) -c $< -o $@

    .PHONY: clean

    clean:

    rm -f $(TARGET) *.a *.o *~

    Hope you can fix it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you Jungu for the reply,

    I had fixed the issue by reinstalling SOC EDS.

    Everything is fine now!.