Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#12494 closed defect (fixed)

collectd build fails

Reported by: hendersj@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: collectd Cc:


When building r34198, I receive the following error:

--- snip ---

Making all in bindings
make[5]: Entering directory `/home/jhenderson/Downloads/openwrt/build_dir/target-mips_r2_uClibc-'
make[6]: Entering directory `/home/jhenderson/Downloads/openwrt/build_dir/target-mips_r2_uClibc-'
cd perl && /usr/bin/perl Makefile.PL PREFIX=/usr
Only one of PREFIX or INSTALL_BASE can be given. Not both.
make[6]: * [perl/Makefile] Error 2
make[6]: Leaving directory `/home/jhenderson/Downloads/openwrt/build_dir/target-mips_r2_uClibc-'
* [all-recursive] Error 1
make[5]: Leaving directory `/home/jhenderson/Downloads/openwrt/build_dir/target-mips_r2_uClibc-'
make[4]: * [all-recursive] Error 1
make[4]: Leaving directory `/home/jhenderson/Downloads/openwrt/build_dir/target-mips_r2_uClibc-'
* /home/jhenderson/Downloads/openwrt/build_dir/target-mips_r2_uClibc- Error 2
make[3]: Leaving directory `/home/jhenderson/Downloads/openwrt/feeds/packages/utils/collectd'
make[2]: * [package/feeds/packages/collectd/compile] Error 2
make[2]: Leaving directory `/home/jhenderson/Downloads/openwrt'
* /home/jhenderson/Downloads/openwrt/staging_dir/target-mips_r2_uClibc- Error 2
make[1]: Leaving directory `/home/jhenderson/Downloads/openwrt'
make: * [world] Error 2

--- snip ---

I've tried this with a clean checkout and .config and manage to continue to get this failure. If I disable building collectd, I can build successfully and then install it with opkg, but I'd rather have it in my build than added after the fact.

How do I diagnose and fix this?

Attachments (0)

Change History (11)

comment:1 Changed 5 years ago by hendersj@…

Update: I thought I'd tried this before, but removing the prefix from the Makefile in build_dir/target-mips_r2_uClibc- seems to have let me get past this error. Not sure if that's a valid way to fix the problem, but compilation did complete.

I also found that PREFIX and INSTALL_BASE are defined in build_dir/target-mips_r2_uClibc- - and commenting PREFIX out (which is defined as PREFIX = $(INSTALL_BASE) ) also lets the build proceed as expected.

So my question is which of these fixes is the most appropriate - or is there something else I'm missing?

comment:2 Changed 5 years ago by jow

Removing PREFIX is probably okay but I think you should confirm with upstream at

comment:3 Changed 5 years ago by hendersj@…

Thanks - looking at the same version of the code downloaded from, it looks like PREFIX is used rather than INSTALL_BASE - the latter isn't in any files in the same path.

I'll have to check when I get home, but it looks like the source tree might be out of sync with the 4.10.7 release from

comment:4 Changed 5 years ago by hnyman <hannu.nyman@…>

The sources are downloaded from by the make process, so they aren't "out of sync" so easily.

Collectd 4.10.8 has already been built a few days ago and is offered for download, but has not yet been officially released.

And there has been a bugfix between 4.10.7 and 4.10.8 regarding just that problem:;a=commitdiff;h=97e8f346a88eccf4d1608c21d5cc6ee9620c1c41

Some versions of Perl / ExtUtils::MakeMaker will else abort with an error
message explaining INSTALL_BASE and PREFIX may not be used both. However, I
don't know where the other definition comes from.

--- a/bindings/
+++ b/bindings/
@@ -23,7 +23,7 @@ perl: perl/Makefile
 perl/Makefile: .perl-directory-stamp perl/Makefile.PL \
-       cd perl && @PERL@ Makefile.PL PREFIX=$(prefix) @PERL_BINDINGS_OPTIONS@
+       cd perl && @PERL@ Makefile.PL INSTALL_BASE=$(prefix) @PERL_BINDINGS_OPTIONS@
        if test ! -d perl; then \

Ps. I have already a version bump patch for collectd 4.10.8 ready, but haven't yet submitted it as I have been waiting for the official release of 4.10.8. If you want to try 4.10.8, you can pick the changes to Makefile & patches from

comment:5 follow-up: Changed 5 years ago by hendersj@…

Fantastic, thanks for that - the good news is that got the build to work.

The bad news is that something else introduced some sort of problem and my router seems to be temporarily bricked. :( (It's to the point the emergency recovery console won't do anything after the upload completes - it just sits there forever.)

comment:6 in reply to: ↑ 5 Changed 5 years ago by hnyman <hannu.nyman@…>

Replying to hendersj@…:

The bad news is that something else introduced some sort of problem and my router seems to be temporarily bricked. :( (It's to the point the emergency recovery console won't do anything after the upload completes - it just sits there forever.)

What is your router architecture? If you have ar71xx, you might read about my similar experiences last week here and consider if you are suffering from the same problem:

The reason was invalidly compressed lzma kernel image for my ar71xx/wndr3700. Tweaking compression parameters helped (and juhosg has already committed the patch to trunk for wndr3700, but not for other routers).

comment:7 Changed 5 years ago by hendersj@…

My architecture is ar71xx (it's a DIR-825 router). I had a build earlier in the week that did work, though. But I'll have a look and see if there's something you did that can help me out (thanks for those links to the discussion). Otherwise, I'll be picking up another inexpensive router to put in its place until I can get a serial/jtag cable put together to fix it.

comment:8 Changed 5 years ago by hnyman <hannu.nyman@…>

Collectd updated to 4.10.8 with r34487. That should have fixed this ticket.

comment:9 Changed 5 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

comment:10 Changed 5 years ago by hnyman <hannu.nyman@…>

The empty patch 130-fix_netlink_kernel_3.3-patch was left behind by r34487, and could be deleted from the collectd package.

comment:11 Changed 2 years ago by rlindeman@…

This may have been fixed in the trunk, but it is still broken for Attitude Adjustment.
Steps to reproduce:

  1. Download OpenWrt AA
  2. Use scripts/feeds to update and install the packages feed from SVN (which doesn't have this fix)
  3. Type make menuconfig and select to build all packages

Expected behaviour:
All packages build successfully for AA
Observed behaviour:
The airpwn and collectd (and possibly other) packages fail to build due to the above and other issues.

The feeds.conf.default file used by Attitude Adjustment should also be updated to use a different source (e.g. Github) for Luci.

Work around:
Apply the reference changeset mentioned to the collectd package

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.