Compile program in C

Hello guys,

I need to compile one program in C, but who can i install the GCC, to complile?

I use the opkg to packet manager.

Thanks in advance

Luis_Filipe:
Hello guys,

I need to compile one program in C, but who can i install the GCC, to complile?

I use the opkg to packet manager.

Thanks in advance

@Luis,
one of our regular forum members SonnyYu has the answers for you. He will be online later today. In the meantime, you can check out his website.

http://ibuyopenwrt.com/index.php/openwrt-sdk-and-yun

Jesse

Hello Jesse,

I see the site is awesome, very good stuff.

wget -O gcc-mips_4.6.3-1_ar71xx.ipk Dropbox - gcc-mips_4.6.3-1_ar71xx.ipk - Simplify your life --no-check-certificate
wget -O libmpc_1.0.2-1_ar71xx.ipk https://www.dropbox.com/s/65tqv413wq0pstk/libmpc_1.0.2-1_ar71xx.ipk?dl=0 --no-check-certificate
wget -O libmpfr_3.1.2-1_ar71xx.ipk Dropbox - libmpfr_3.1.2-1_ar71xx.ipk - Simplify your life --no-check-certificate

opkg update
opkg install libmpfr_3.1.2-1_ar71xx.ipk
opkg install libmpc_1.0.2-1_ar71xx.ipk
opkg install gcc-mips_4.6.3-1_ar71xx.ipk

This would be the answer to my problem, I do not believe that the older staff of the ARDUINO forum not answer to it ....

Waiting help

After i download everything to the / and i go to install the packages look who happening.

root@iduino:/# opkg install gcc-mips_4.6.3-1_ar71xx.ipk
Installing gcc-mips (4.6.3-1) to root...
Installing binutils (2.22-5) to root...
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/binutils_2.22-5_ar71xx.ipk.
Installing objdump (2.22-5) to root...
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/objdump_2.22-5_ar71xx.ipk.

After that the arduino is lost connectivity and not install anything, why this happening?

GCC is big package, not enough space?

Expand the Storage

Hello @sonnyyu

I follow your tutorial and i expand the memory to a USB pen drive (2GB), and i install the GCC with no error.

Thanks

Hi @sonnyyu now i have another problem, after i run ./configure the program not run:

Look the entire process installation:

root@iduino:/# cd honeyd-1.5b/
root@iduino:/honeyd-1.5b# ./configure
-ash: ./configure: Permission denied
root@iduino:/honeyd-1.5b# chmod 777 configure
root@iduino:/honeyd-1.5b# ./configure
checking build system type... mips-unknown-linux-gnu
checking host system type... mips-unknown-linux-gnu
checking target system type... mips-unknown-linux-gnu
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... none
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... ./configure: line 6395: diff: command not found
no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) none
checking for a BSD-compatible install... ./install-sh -c
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking for bison... no
checking for byacc... no
checking for dlopen in -ldl... yes
checking for libpcap... no
configure: error: libpcap not found

after that i cannot run this tool:

root@iduino:/honeyd-1.5b# ./honeyd
-ash: ./honeyd: not found
root@iduino:/honeyd-1.5b# ./honeyd.d
-ash: ./honeyd.d: not found
root@iduino:/honeyd-1.5b# ./honeyd.c
-ash: ./honeyd.c: Permission denied
root@iduino:/honeyd-1.5b# chmod 777 honeyd.c
root@iduino:/honeyd-1.5b# ./honeyd.c
./honeyd.c: line 1: /bin: Permission denied
./honeyd.c: line 2: syntax error: unexpected "("
root@iduino:/honeyd-1.5b# ./honeyd
-ash: ./honeyd: not found

Anyone can Please help me, I am unsure what to do...

Thanks in Advance

Probably need libpcap or libpcap-dev or similar installed to compile
(libpcap is an available package on yun)

additionally ./configure is only first step
when you get a configure error google for the item it complains about and track down what package contains that item, install it (using opkg on the yun) and re run ./configure

then you make to do make install

Look, the libcap is installed:

root@iduino:/honeyd-1.5b# opkg list | grep libcap
libcap - 2.22-1 - Linux capabilities library

But when run ./configure

the honeyd say:

checking for libpcap... no
configure: error: libpcap not found

Any ideia?

Luis_Filipe:
Look, the libcap is installed:

root@iduino:/honeyd-1.5b# opkg list | grep libcap
libcap - 2.22-1 - Linux capabilities library

Your command (in bold) is just checking whether libcat is available through opkg, it is not checking whether it is actually installed. Use the "list-installed" command rather than "list" to see whether it is actually installed on your computer. (I'll bet it isn't.)

Hello,

Unfortunately is installed , I had Checked before, look...

root@iduino:~# opkg list-installed | grep libcap
libcap - 2.22-1

And now , what I do, should install another version ?

Please replay
Thanks

PaulRogers:
Probably need libpcap or libpcap-dev or similar installed to compile
(libpcap is an available package on yun)
...

1+

libpcap-dev is needed.