What's new

Error building from GIT source. Ubuntu 12.04 x64

  • 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!

Adamm

Part of the Furniture
Hey there,

Recently I've been adding support for the AC68R to various personal scripts, in doing so I need to add RMerlins firmware building support to my build server.

Ive seen the Wiki guide which is supposed to work on a fresh Ubuntu 12.04 64x LTS server but unfortunatly I can't seem to find whats causing one of the last compile errors. This is the script I use from a clean Ubuntu install.

From what I can tell it has something todo with libdb (Berkeley DB) just have been unable to fix it so far. Hopefully others who compile their own F/W from the repo will be able to help me out. Thanks.


Last 1000 lines of the build log.
 
Do you have the library installed?

Can be found by following this:
Make sure you have the required Berkeley DB libraries AND headers installed.
You can download the latest version from http://www.sleepycat.com.
If you have installed BDB in a non standard location use the
--with-bdb=/path/to/bdb configure option and make sure
your linker is configured to check for libraries there.
configure: error: Berkeley DB library required but not found!
make: *** [config.status] Error 1
 
Hey there,

Recently I've been adding support for the AC68R to various personal scripts, in doing so I need to add RMerlins firmware building support to my build server.

Ive seen the Wiki guide which is supposed to work on a fresh Ubuntu 12.04 64x LTS server but unfortunatly I can't seem to find whats causing one of the last compile errors. This is the script I use from a clean Ubuntu install.

From what I can tell it has something todo with libdb (Berkeley DB) just have been unable to fix it so far. Hopefully others who compile their own F/W from the repo will be able to help me out. Thanks.


Last 1000 lines of the build log.

Asus's build environment is a bit borked. Their developers manually modified the netatalk/configure script. When you did a "make clean" it overwrote their customized configure script with a new one, preventing netatalk from building properly.

Checkout a clean copy of netatalk/configure from the repo, then rebuild again without doing a "make clean".
 
Asus's build environment is a bit borked. Their developers manually modified the netatalk/configure script. When you did a "make clean" it overwrote their customized configure script with a new one, preventing netatalk from building properly.

Checkout a clean copy of netatalk/configure from the repo, then rebuild again without doing a "make clean".

Thanks, that seems to have fixed that issue. Unfortunately now I have to sort through the first of many other errors :p

Avahi seems to be throwing out an error due to its configuration script also, I'll see if running aclocal will sort it out. Ill also update the wiki for others once I get a clean build working.

New error
 
Tried various things but was unable to get past the error (also takes 2 hours between compiles which doesn't help :p). Is there a script you use RMerlin to perform your builds I can take a look at?

Thanks.
 
No script at all.

First, make sure you do have automake1.11 installed.

Do a make clean, and right after the make clean checkout the proper version of netatalk/configure.

After that, try again building the firmware.
 
No script at all.

First, make sure you do have automake1.11 installed.

Do a make clean, and right after the make clean checkout the proper version of netatalk/configure.

After that, try again building the firmware.


Thanks again for the help, but in my last comment I was referring to a new error building avahi but im going to assume the fix is the same after looking at the files git history.


Also it may be worth noting in the "packages to install list" that intltool is a required package which doesn't ship in Ubuntu by default and will cause the build to fail.

EDIT; Unfortunately it didn't work for the avahi error, open to suggestions to fix it.

Heres a link to build scirpt I use on new Ubuntu installs.
 
Last edited:
I can't help you any further than that, sorry. I never understood how Automake worked, so I don't have the expertise to troubleshoot the build environment.

I would begin by keeping things simple. There's no need for a complex build script when all you need is one single make command.
 
I can't help you any further than that, sorry. I never understood how Automake worked, so I don't have the expertise to troubleshoot the build environment.

I would begin by keeping things simple. There's no need for a complex build script when all you need is one single make command.

Thanks again for the reply. Out of personal interest how do you build your firmwares (OS etc)?

I've tried clean installs of Ubuntu distros from 12.04 > 13.10 and still run into similar errors. My build script is a lot simpler then it looks, and it merely just goes through the steps in the wiki to build yours and padavans firmware rather then having to enter it all manually. I believe there must be a way to compile this firmware as you do it personally on a regular basis, just need to know all the prerequisites.

For reference on Ubuntu 12.04 LTS the following command's from a clean install will lead to the Avahi error previously mentioned. This is directly step by step as directed by the Wiki.

Code:
sudo apt-get -y install intltool libncurses5-dev lib32z1-dev autoconf automake bash bison bzip2 diffutils file flex m4 g++ gawk groff-base libncurses-dev libtool libslang2 make patch perl pkg-config shtool subversion tar texinfo zlib1g zlib1g-dev git-core gettext libexpat1-dev libssl-dev cvs gperf unzip python libxml-parser-perl gcc-multilib gconf-editor libxml2-dev g++-4.4 g++-multilib gitk libncurses5 mtd-utils libncurses5-dev libstdc++6-4.4-dev libvorbis-dev g++-4.4-multilib git autopoint autogen sed build-essential intltool libelf1:i386

cd /root

sudo git clone https://github.com/RMerl/asuswrt-merlin.git

sudo ln -sf ~/asuswrt-merlin/tools/brcm /opt/brcm

sudo ln -sf ~/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm

export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm-arm/bin

sudo mkdir -p /media/ASUSWRT/

sudo ln -sf ~/asuswrt-merlin /media/ASUSWRT/asuswrt-merlin

cd ~/asuswrt-merlin/release/src-rt-6.x.4708

make clean

echo " ---- Patching Netatalk ---- "
cd ~/asuswrt-merlin/release/src/router/netatalk-3.0.5
rm -rf configure
sudo git checkout configure
echo " ---- Patching Netatalk ---- "

cd ~/asuswrt-merlin/release/src-rt-6.x.4708

make rt-ac68u
 
Thanks again for the reply. Out of personal interest how do you build your firmwares (OS etc)?

I was previously using an LTS release of Ubuntu (I think it was 12.04), but now I use Mint 13.

For a fresh/release build, I enter the appropriate release/src-rt*/ folder, and issue:

make cleankernel
make clean

If building an AC56/AC68 then I will also checkout the correct version of netatalk/configure from Git.

After that,

make rt-xxxxx


There's a good chance that Asus introduced additional requirements when they added Avahi and other components related to Time Machine. However the Wiki guides never got updated with those changes (note that I didn't wrote these guides, so I cannot vouch as to how complete they are).

I'd suggest taking a look at the README.TXT at the root of the firmware code. This file is from Asus, and they might have added a few requirements to it in recent releases (note that the current copy on Github doesn't reflect the content of the 4422 one yet - you might want to download Asus's GPL to check yourself).
 
I was previously using an LTS release of Ubuntu (I think it was 12.04), but now I use Mint 13.

For a fresh/release build, I enter the appropriate release/src-rt*/ folder, and issue:

make cleankernel
make clean

If building an AC56/AC68 then I will also checkout the correct version of netatalk/configure from Git.

After that,

make rt-xxxxx


There's a good chance that Asus introduced additional requirements when they added Avahi and other components related to Time Machine. However the Wiki guides never got updated with those changes (note that I didn't wrote these guides, so I cannot vouch as to how complete they are).

I'd suggest taking a look at the README.TXT at the root of the firmware code. This file is from Asus, and they might have added a few requirements to it in recent releases (note that the current copy on Github doesn't reflect the content of the 4422 one yet - you might want to download Asus's GPL to check yourself).

Interesting it works on your Mint set-up, is it x32 or x64?. I had a browse through the new GPL and the only difference in the readme was the addition of intltool (which I picked up in my previous post) so it must be newly required.

I also tried to compile the firmware on Ubuntu 12.04 32bit and it finally compiled. I will try again on 64bit to confirm this and report back here but this could be a 64bit only problem even though its apparently supported according to the GPL.

Thanks again for your help.
 
I'm using a 64-bit environment.

If it works with 32-bit, then you are probably missing a few 32-bit versions of the development packages.
 
I'm using a 64-bit environment.

If it works with 32-bit, then you are probably missing a few 32-bit versions of the development packages.

After days of trying to get this working (and pulling my hair out in the process) I'm still having huge troubles getting it to compile consistently on any Ubuntu OS 32bit or 64. No idea why it compiled the one time in my previous post as I haven't been able to do it again since using the exact same process.

Maybe it could be worth reaching out to Asus and asking them to update the readme with all required packages etc as it clearly wasn't tested on a default Ubuntu install.

Below are the two most frequent build errors I run into. The first is libdb related the second is due to avahi-0.6.31. Any help would be appreciated.

Build log #1
Build log #2
 
Last edited:
After days of trying to get this working (and pulling my hair out in the process) I'm still having huge troubles getting it to compile consistently on any Ubuntu OS 32bit or 64. No idea why it compiled the one time in my previous post as I haven't been able to do it again since using the exact same process.

Maybe it could be worth reaching out to Asus and asking them to update the readme with all required packages etc as it clearly wasn't tested on a default Ubuntu install.

Latest build log

Every package I've been missing was on the list. Usually I just didn't feel like installing it until it was needed.

Could you try building saintdev/asuswrt-merlin@build-fixes? I'm not sure this will fix your issue, but I think it might.
 
Every package I've been missing was on the list. Usually I just didn't feel like installing it until it was needed.

Could you try building saintdev/asuswrt-merlin@build-fixes? I'm not sure this will fix your issue, but I think it might.

Thanks for this, just had a look at your branch and the fixes look very familiar to the problems I've been having.

I've got firmware building as we speak so in an hour or so I'll update this post and let you know if it builds so the fix can be moved to the master branch.

Good to know I'm not going crazy trying to get this to compile :p


EDIT; Spoke to soon, Avahi is still failing with the same error unsure about netatalk though. Here's the build log from your branch.
 
Last edited:
Thanks for this, just had a look at your branch and the fixes look very familiar to the problems I've been having.

I've got firmware building as we speak so in an hour or so I'll update this post and let you know if it builds so the fix can be moved to the master branch.

Good to know I'm not going crazy trying to get this to compile :p


EDIT; Spoke to soon, Avahi is still failing with the same error unsure about netatalk though. Here's the build log from your branch.

I was able to reproduce this on a 12.04 VM. I'll see what I can figure out.
 
Last edited:
I was able to reproduce this on a 12.04 VM. I'll see what I can figure out.

Good to know, thanks again for all your help. Pretty good with things nix wise but the whole make/configure situation is a-bit out of my expertise :p

If you need me to test the changes let me know, I have a build server solely for building various firmware for my routers so it isn't a problem having to repeatedly compile it.
 
I keep getting this error:

Code:
mipsel-linux-ld: drivers/net/emf/../../../../../router/emf/emf.o: Relocations in generic ELF (EM: 40)
drivers/net/emf/../../../../../router/emf/emf.o: could not read symbols: File in wrong format
make[7]: *** [drivers/net/emf/emf.o] Error 1
make[6]: *** [drivers/net/emf] Error 2
make[5]: *** [drivers/net] Error 2
make[4]: *** [drivers] Error 2
make[4]: Leaving directory `/root/asuswrt-merlin/release/src-rt/linux/linux-2.6'
make[3]: *** [kernel] Error 2
make[3]: Leaving directory `/root/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/asuswrt-merlin/release/src-rt'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/root/asuswrt-merlin/release/src-rt'
make: *** [rt-n66u] Error 2
matt-virtual-machine src-rt #
 
I keep getting this error:

Code:
mipsel-linux-ld: drivers/net/emf/../../../../../router/emf/emf.o: Relocations in generic ELF (EM: 40)
drivers/net/emf/../../../../../router/emf/emf.o: could not read symbols: File in wrong format
make[7]: *** [drivers/net/emf/emf.o] Error 1
make[6]: *** [drivers/net/emf] Error 2
make[5]: *** [drivers/net] Error 2
make[4]: *** [drivers] Error 2
make[4]: Leaving directory `/root/asuswrt-merlin/release/src-rt/linux/linux-2.6'
make[3]: *** [kernel] Error 2
make[3]: Leaving directory `/root/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/asuswrt-merlin/release/src-rt'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/root/asuswrt-merlin/release/src-rt'
make: *** [rt-n66u] Error 2
matt-virtual-machine src-rt #

I'm still in the process of merging new GPL code. You should checkout from a tagged version rather than from HEAD at this time, those two blobs are not the correct versions yet. I haven't had time to tackle the MIPS platform at this time.
 
Good to know, thanks again for all your help. Pretty good with things nix wise but the whole make/configure situation is a-bit out of my expertise :p

If you need me to test the changes let me know, I have a build server solely for building various firmware for my routers so it isn't a problem having to repeatedly compile it.

After installing everything on the list in the readme, here are the additional packages I needed to install.

Code:
make
intltool
libglib2.0-dev

libglib2.0-dev contains the Automake macros needed by Avahi.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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