What's new

Issue compiling amule (Entware)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Antiel

New Around Here
Hi there,

I'm having some problems with Amule at my RT-AC66U B1 and decided to compile a binary with debug symbols enabled (for backtracing). I've followed wiki instruction to compile upon Entware and when running make package/amule/compile -j1 V=s, this is what I get:

Code:
checking whether the C++ compiler works... no
configure: error: in `/home/router/openwrt_trunk/build_dir/target-mipsel-linux-gnu/aMule-2.3.1':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
make[2]: *** [/home/router/openwrt_trunk/build_dir/target-mipsel-linux-gnu/aMule-2.3.1/.configured_yyyyyyyyyy] Error 77
make[2]: Leaving directory `/home/router/openwrt_trunk/feeds/oldports/amule'
make[1]: *** [package/feeds/oldports/amule/compile] Error 2
make[1]: Leaving directory `/home/router/openwrt_trunk'
make: *** [package/amule/compile] Error 2

Having a look into such file, I think issue is the one below:

Code:
configure:3518: $? = 0
configure:3507: mipsel-linux-uclibc-g++ -v >&5
Using built-in specs.
COLLECT_GCC=mipsel-linux-uclibc-g++
COLLECT_LTO_WRAPPER=/opt/entware/toolchain-entware/libexec/gcc/mipsel-linux-uclibc/4.6.4/lto-wrapper
Target: mipsel-linux-uclibc
Configured with: /home/ryzhovau/toolchain-src-git/build_dir/toolchain-mipsel_gcc4.6.4/gcc-4.6.4/configure --prefix=/opt/entware/toolchain-entware --build=i586-linux-gnu --host=i586-linux-gnu --target=mips$
Thread model: posix
gcc version 4.6.4 (GCC)
configure:3518: $? = 0
configure:3507: mipsel-linux-uclibc-g++ -V >&5
mipsel-linux-uclibc-g++: error: unrecognized option '-V'
mipsel-linux-uclibc-g++: fatal error: no input files
compilation terminated.
configure:3518: $? = 1
configure:3507: mipsel-linux-uclibc-g++ -qversion >&5
mipsel-linux-uclibc-g++: error: unrecognized option '-qversion'
mipsel-linux-uclibc-g++: fatal error: no input files
compilation terminated.
configure:3518: $? = 1
configure:3538: checking whether the C++ compiler works
configure:3560: mipsel-linux-uclibc-g++ -O2 -pipe -mips32 -mtune=mips32 -fno-caller-saves -I/home/router/openwrt_trunk/staging_dir/target-mipsel-linux-gnu/opt/lib/libiconv-full/include -I/home/router/open$
/opt/entware/toolchain-entware/lib/gcc/mipsel-linux-uclibc/4.6.4/../../../../mipsel-linux-uclibc/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status

Am I doing something wrong and my setup is not the proper one? Or is it something specific to Amule (I've been able to compile OpenVpn successfully)?.

Also, is there any guide for beginners on compiling upon Entware? . I've a lot of questions, like the ones below:

- How I can tell compiler that I want to build a binary for my router architecture?. Similar topic for Entware-ng (here) instructs on choosing the proper config file, but I cannot find them at Entware

- At Entware, Amule version is 2.3.1, while at Entware-ng is 2.3.2; is it possible to replace the older with the newer (e.g. by copying folder in /feed/oldports/amule)?

- Should I replace Amule compiling options (e.g. --enable-debug) with my own set directly at Makefile?.

- If I decide to give compiling upon Entware-ng a try, which options should I mark at make menuconfig?. I've no idea about which one I could need (beside target system / target profile)

Thanks a lot for reading,
Antiel.
 
It works when I try it.
Code:
cd
mkdir -p Entware-mipselsf
cd Entware-mipselsf
rm -rf Entware-ng
git clone https://github.com/Entware-ng/Entware-ng.git
cd Entware-ng
make package/symlinks
cp configs/mipselsf.config .config
make tools/install -j4
make toolchain/install -j4
make target/compile -j4
# EDIT:  ~/Entware-mipselsf/Entware-ng/feeds/oldports/amule/Makefile
make package/amule/compile -j1 V=s
 
Hello Fitz,

many thanks for your help. When using those instructions, I face a different compilation issue:

Code:
make[5]: Entering directory `/home/router/Entware-mipselsf/Entware-ng/build_dir/target-mipsel_mips32r2_uClibc-1.0.17/binutils-2.27/binutils'
if [ -r sysinfo.c ]; then \
      gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -I./../zlib   sysinfo.c ; \
    else \
      gcc -c -I. -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -I./../zlib   ./sysinfo.c ; \
    fi
cc1: error: unrecognized command line option '-Wstack-usage=262144'
make[5]: *** [sysinfo.o] Error 1

It could be related to Bug binutils/19854, as GCC version being used is 4.6.3; how I do upgrade Binutils in the toolchain to 2.8, the last available at GNU?

Many thanks again,
Antiel.
 
Upgrading binutils is not something I've ever done. Use Debian Linux and install the dependencies for OpenWRT Buildroot. I follow his tutorial, like a religion.
https://github.com/Entware-ng/Entware-ng/wiki/Compile-packages-from-sources

Hello Fitz,

many thanks for your comments, I tried following that tutorial yesterday, but got lost at 'OpenWrt build system – Installation' step #4; probably I did something wrong an ruined the rest of the process... I'll try again this weekend, with a fresh development system.

Many thanks again,
Antiel.
 
'OpenWrt build system – Installation' step #4; probably I did something wrong ...
You went too far into the OpenWrt tutorial. Just install the dependencies for OpenWrt, then you're done with that page.

Here's your steps for what you're trying to do:

Step#1 - Use Debian Linux. "It is recommended that you use a GNU/Linux distribution (Debian), either a standalone installation or one running in a virtual environment (VMware or Qemu)."

Step#2 - Install the dependencies for OpenWrt
Code:
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev
sudo apt-get install subversion mercurial

Step#3 - Build the tools. This is the cross-compilation toolchain for RT-AC66U router.
Code:
cd
rm -rf Entware-ng
git clone https://github.com/Entware-ng/Entware-ng.git
cd Entware-ng
make package/symlinks
cp configs/mipselsf.config .config
make tools/install
make toolchain/install
make target/compile

Step#4 - Customize the makefile for amule
~/Entware-ng/feeds/oldports/amule/Makefile

Step#5 - Compile the package
Code:
cd ~/Entware-ng
make package/amule/compile -j1 V=s
 
Last edited:
You went too far into the OpenWrt tutorial. Just install the dependencies for OpenWrt, then you're done with that page.

Here's your steps for what you're trying to do:

Step#1 - Use Debian Linux. "It is recommended that you use a GNU/Linux distribution (Debian), either a standalone installation or one running in a virtual environment (VMware or Qemu)."

Step#2 - Install the dependencies for OpenWrt
Code:
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev
sudo apt-get install subversion mercurial

Step#3 - Build the tools. This is the cross-compilation toolchain for RT-AC66U router.
Code:
cd
rm -rf Entware-ng
git clone https://github.com/Entware-ng/Entware-ng.git
cd Entware-ng
make package/symlinks
cp configs/mipselsf.config .config
make tools/install
make toolchain/install
make target/compile

Step#4 - Customize the makefile for amule
~/Entware-ng/feeds/oldports/amule/Makefile

Step#5 - Compile the package
Code:
cd ~/Entware-ng
make package/amule/compile -j1 V=s

Hello Fitz,

thanks a lot, after refreshing the development box and follow your instructions, I can now compile applications flawlessly :)

Thanks again,
Antiel.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top