Opened 4 years ago

Last modified 4 years ago

#16588 new defect

Not able to build B.A.T.M.A.N 2014.1.0 and later on AA 12.09 branch

Reported by: theBen Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Attitude Adjustment 12.09 Beta
Keywords: pkg-config, batman, attitude adjustment Cc:


I am trying to build the currently latest B.A.T.M.A.N 2014.1.0 release with the OpenWrt stable version 12.09 AA.
Since batman changed in the current version its logic to use the libnl library, it is using pkg-config to detect the location of it.

This fails with an error: fatal error: functions.c:43:28: fatal error: netlink/socket.h: No such file or directory

I asked the batman developer and marec pointed out, that the LIBNL variables are missing in the gcc command and therefore causing the fatal error. The Makefile of the module batctl is using everything correctly though.

Full GCC line:

mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -ffunction-sections -fdata-sections -flto -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP  -I/home/ben/dev/openwrt/bug-test/openwrt-12.09/staging_dir/target-mips_r2_uClibc- -I/home/ben/dev/openwrt/bug-test/openwrt-12.09/staging_dir/target-mips_r2_uClibc- -I/home/ben/dev/openwrt/bug-test/openwrt-12.09/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc- -I/home/ben/dev/openwrt/bug-test/openwrt-12.09/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc- -D_GNU_SOURCE  -c -o functions.o functions.c

To double check, i tried the exact same with the current development branch of OpenWrt and the build is completing just fine. Therefore it seems to be a 12.09 only issue with pkg-config or the usage of it.

To reproduce, follow these steps:

# Get OpenWRT 12.09 release branch
git clone git clone git:// openwrt-12.09
cd openwrt-12.09

# Adapt feeds.conf.default (remove ";for-12.09.x") to get the latest B.A.T.M.A.N release
sed -i 's/;for-12.09.xg' feeds.conf.default

# Update all packages
./scripts/feeds update -a

# Install batman
./scripts/feeds install kmod-batman-adv

# Set target (in my case "Ubiquity Routerstation") and enable B.A.T.M.A.N package as built-in kernel module
make menuconfig

# "produce a general purpose configuration of the build system including a check of dependencies and prerequisites for the build environment etc"
make defconfig

# Build
make V=s

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by theBen

Still not working with current 12.09-branch commit - any feedback?

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as new .

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

Note: See TracTickets for help on using tickets.