[OpenWrt-Devel] undefined reference while building

Weedy weedy2887 at gmail.com
Sun Apr 24 09:03:46 EDT 2016


On Sun, Apr 24, 2016 at 3:23 AM, Weedy <weedy2887 at gmail.com> wrote:
> I "cat >" a few things into .config and then call defconfig.
> bmon, curl, iperf, etc, little things. I don't even add filesystems.
> My target is CONFIG_TARGET_ar71xx_generic_TLWDR4300.
>
> If I start a clean build with -j1 for a few minutes I can switch the
> -janything later and I'm fine.
> But -j anything right off a distclean breaks.
>
> $ make -j3 V=s
> make[1]: Entering directory '/home/weedy/projects/openwrt'
> make[2]: Entering directory '/home/weedy/projects/openwrt'
> make[2]: Entering directory '/home/weedy/projects/openwrt'
> + mkdir -p /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14
> + cd /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14
> + mkdir -p bin lib include stamp
> + mkdir -p /home/weedy/projects/openwrt/staging_dir/host
> mkdir -p /home/weedy/projects/openwrt/build_dir/target-mips_34kc_musl-1.1.14/stamp
> + cd /home/weedy/projects/openwrt/staging_dir/host
> + mkdir -p bin lib include stamp
> touch /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/.prepared
> mkdir -p /home/weedy/projects/openwrt/build_dir/host/stamp
> /home/weedy/projects/openwrt/staging_dir/host/include/sys
> install -m0644 /home/weedy/projects/openwrt/tools/include/*.h
> /home/weedy/projects/openwrt/staging_dir/host/include/
> install -m0644 /home/weedy/projects/openwrt/tools/include/sys/*.h
> /home/weedy/projects/openwrt/staging_dir/host/include/sys/
> ln -sf lib /home/weedy/projects/openwrt/staging_dir/host/lib64
> touch /home/weedy/projects/openwrt/staging_dir/host/.prepared
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock'
> rm -rf /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/root-ar71xx
> make[2]: Leaving directory '/home/weedy/projects/openwrt'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/sstrip'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/expat'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/sstrip'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/make-ext4fs'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/expat'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch-image'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/firmware-utils'
> make -C /home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02
> make_ext4fs STATIC=1
> make[4]: Entering directory
> '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02'
> cc -o make_ext4fs allocate.o canned_fs_config.o contents.o crc16.o
> ext4fixup.o ext4_sb.o ext4_utils.o extent.o indirect.o
> make_ext4fs_main.o make_ext4fs.o sha1.o uuid.o wipe.o
> libsparse/libsparse.a -Wl,-Bstatic -lz -Wl,-Bdynamic
> contents.o:contents.c:function make_special: error: undefined
> reference to 'major'
> contents.o:contents.c:function make_special: error: undefined
> reference to 'minor'
> collect2: error: ld returned 1 exit status
> Makefile:30: recipe for target 'make_ext4fs' failed
> make[4]: *** [make_ext4fs] Error 1
> make[4]: Leaving directory
> '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02'
> Makefile:40: recipe for target
> '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built'
> failed
> make[3]: *** [/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built]
> Error 2
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/make-ext4fs'
> tools/Makefile:134: recipe for target 'tools/make-ext4fs/compile' failed
> make[2]: *** [tools/make-ext4fs/compile] Error 2
> make[2]: *** Waiting for unfinished jobs....
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch-image'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/firmware-utils'
> make[2]: Leaving directory '/home/weedy/projects/openwrt'
> tools/Makefile:133: recipe for target
> '/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy'
> failed
> make[1]: *** [/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy]
> Error 2
> make[1]: Leaving directory '/home/weedy/projects/openwrt'
> Build failed - please re-run with -j1 to see the real error message
> /home/weedy/projects/openwrt/include/toplevel.mk:192: recipe for
> target 'world' failed
> make: *** [world] Error 1

Never mind. After a few more test and fresh git clones it seems I have
a more general build failure. Basically any host utill with makedev,
major or minor in it is dying. I don't understand why.

Is this a gcc 5.x thing? I updated my system recently.

make[4]: Entering directory
'/home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/lib/uuid'
    MKINSTALLDIRS /home/weedy/projects/openwrt/staging_dir/host/lib
/home/weedy/projects/openwrt/staging_dir/host/include/uuid
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3
mkdir /home/weedy/projects/openwrt/staging_dir/host/include/uuid
    INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/lib/libuuid.a
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/include/uuid/uuid.h
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_clear.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_compare.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_copy.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_generate.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_is_null.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_parse.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_time.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_unparse.3
    LINK /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_generate_random.3
    LINK /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_generate_time.3
    INSTALL_DATA
/home/weedy/projects/openwrt/staging_dir/host/lib/pkgconfig/uuid.pc
make[4]: Leaving directory
'/home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/lib/uuid'
mkdir -p /home/weedy/projects/openwrt/staging_dir/host/include/e2fsprogs
cp -fpR /home/weedy/projects/openwrt/staging_dir/host/include/uuid
/home/weedy/projects/openwrt/staging_dir/host/include/e2fsprogs/
rm -rf /home/weedy/projects/openwrt/staging_dir/host/include/uuid
install -m0644 /home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/lib/uuid/libuuid.a
/home/weedy/projects/openwrt/staging_dir/host/lib/
mkdir -p /home/weedy/projects/openwrt/staging_dir/host/stamp
touch /home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/.built
touch /home/weedy/projects/openwrt/staging_dir/host/stamp/.e2fsprogs_installed
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/e2fsprogs'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/mtd-utils'
make -C /home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer
-I/home/weedy/projects/openwrt/staging_dir/host/include
-I/home/weedy/projects/openwrt/staging_dir/host/usr/include
-I/home/weedy/projects/openwrt/staging_dir/host/include/e2fsprogs
-I/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/include
-L/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2
-L/home/weedy/projects/openwrt/staging_dir/host/lib
-DNO_NATIVE_SUPPORT"
LDFLAGS="-L/home/weedy/projects/openwrt/staging_dir/host/lib
-L/home/weedy/projects/openwrt/staging_dir/host/usr/lib "
WITHOUT_LZO=1 WITHOUT_XATTR=1 SUBDIRS=""
BUILDDIR="/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2"
STATIC=1 V= TARGETS="mkfs.jffs2 ubi-utils/ubinize
mkfs.ubifs/mkfs.ubifs"
make[4]: Entering directory
'/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2'
  CHK     include/version.h
  LD      mkfs.jffs2
mkfs.jffs2.c:944: error: undefined reference to 'major'
mkfs.jffs2.c:944: error: undefined reference to 'minor'
mkfs.jffs2.c:1263: error: undefined reference to 'minor'
mkfs.jffs2.c:1263: error: undefined reference to 'major'
mkfs.jffs2.c:1273: error: undefined reference to 'minor'
mkfs.jffs2.c:1273: error: undefined reference to 'major'
mkfs.jffs2.c:503: error: undefined reference to 'makedev'
mkfs.jffs2.c:467: error: undefined reference to 'makedev'
mkfs.jffs2.c:510: error: undefined reference to 'makedev'
collect2: error: ld returned 1 exit status
common.mk:80: recipe for target
'/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2'
failed
make[4]: *** [/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2]
Error 1
make[4]: Leaving directory
'/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2'
Makefile:60: recipe for target
'/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/.built'
failed
make[3]: *** [/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/.built]
Error 2
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/mtd-utils'
tools/Makefile:134: recipe for target 'tools/mtd-utils/compile' failed
make[2]: *** [tools/mtd-utils/compile] Error 2
make[2]: Leaving directory '/home/weedy/projects/openwrt'
tools/Makefile:133: recipe for target
'/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy'
failed
make[1]: *** [/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy]
Error 2
make[1]: Leaving directory '/home/weedy/projects/openwrt'
/home/weedy/projects/openwrt/include/toplevel.mk:192: recipe for
target 'world' failed
make: *** [world] Error 2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list