Modify

Opened 5 years ago

Last modified 5 years ago

#12986 new defect

mtd-utils won't build

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: toolchain Version: Trunk
Keywords: mtd-utils cygwin Cc:

Description

Running trunk r35569, I get the following errors when building mtd-utils on cygwin. It looks like mtd-utils has been previously patched to compile with cygwin, but it is not currently working.

$ make tools/mtd-utils/install V=99
make[1]: Entering directory `/home/edwardsl/openwrt/ramips/trunk'
+ mkdir -p /home/edwardsl/openwrt/ramips/trunk/staging_dir/target-mipsel_r2_uClibc-0.9.33.2
+ cd /home/edwardsl/openwrt/ramips/trunk/staging_dir/target-mipsel_r2_uClibc-0.9.33.2
+ mkdir -p bin lib include stamp
mkdir -p /home/edwardsl/openwrt/ramips/trunk/build_dir/target-mipsel_r2_uClibc-0.9.33.2/stamp
touch /home/edwardsl/openwrt/ramips/trunk/staging_dir/target-mipsel_r2_uClibc-0.9.33.2/.prepared
+ mkdir -p /home/edwardsl/openwrt/ramips/trunk/staging_dir/host
+ cd /home/edwardsl/openwrt/ramips/trunk/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/edwardsl/openwrt/ramips/trunk/build_dir/host/stamp /home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include/sys
install -m0644 /home/edwardsl/openwrt/ramips/trunk/tools/include/*.h /home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include/
install -m0644 /home/edwardsl/openwrt/ramips/trunk/tools/include/sys/*.h /home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include/sys/
ln -sf lib /home/edwardsl/openwrt/ramips/trunk/staging_dir/host/lib64
touch /home/edwardsl/openwrt/ramips/trunk/staging_dir/host/.prepared
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/m4'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/m4'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/m4'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/m4'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/sed'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/sed'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/sed'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/sed'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/libtool'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/libtool'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/libtool'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/libtool'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/autoconf'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/autoconf'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/autoconf'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/autoconf'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/pkg-config'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/pkg-config'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/pkg-config'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/pkg-config'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/xz'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/xz'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/xz'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/xz'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/automake'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/automake'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/automake'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/automake'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/e2fsprogs'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/e2fsprogs'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/e2fsprogs'
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/e2fsprogs'
make[2]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/tools/mtd-utils'
make -C /home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/lib  CFLAGS="-O2 -I/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include -I/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include/e2fsprogs -I/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/include -L/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5 -L/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/lib -DNO_NATIVE_SUPPORT -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h -I/home/edwardsl/openwrt/ramips/trunk/tools/mtd-utils/include -include fls.h"  LDFLAGS="-L/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/lib "  WITHOUT_LZO=1 WITHOUT_XATTR=1  LZMA_STATIC_LIB="/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/lib/liblzma.a"  SUBDIRS=""  BUILDDIR="/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5"  TARGETS="libmtd.a libcrc32.a"  LIBS="libmtd libcrc32"
make[3]: Entering directory `/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/lib'
mkdir -p /home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/
gcc -I../include -D_FILE_OFFSET_BITS=64 -O2 -I/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include -I/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include/e2fsprogs -I/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/include -L/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5 -L/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/lib -DNO_NATIVE_SUPPORT -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h -I/home/edwardsl/openwrt/ramips/trunk/tools/mtd-utils/include -include fls.h -c -o /home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/libmtd.o libmtd.c -g -Wp,-MD,/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/.libmtd.c.dep
In file included from <command-line>:0:0:
/home/edwardsl/openwrt/ramips/trunk/staging_dir/host/include/getline.h:41:1: error: static declaration of 'getline' follows non-static declaration
/usr/include/sys/stdio.h:37:9: note: previous declaration of 'getline' was here
libmtd.c: In function 'mtd_lock':
libmtd.c:831:9: error: expected expression before 'struct'
libmtd.c: In function 'mtd_unlock':
libmtd.c:836:9: error: expected expression before 'struct'
libmtd.c: In function 'mtd_erase':
libmtd.c:855:19: error: expected expression before 'struct'
libmtd.c:880:18: error: expected expression before 'struct'
libmtd.c: In function 'mtd_regioninfo':
libmtd.c:895:18: error: expected expression before 'struct'
libmtd.c: In function 'mtd_is_locked':
libmtd.c:911:18: error: expected expression before 'struct'
libmtd.c: In function 'mtd_is_bad':
libmtd.c:1012:18: error: expected expression before 'off_t'
libmtd.c: In function 'mtd_mark_bad':
libmtd.c:1033:18: error: expected expression before 'off_t'
libmtd.c: In function 'do_oob_op':
libmtd.c:1127:16: error: expected expression before 'struct'
libmtd.c: In function 'mtd_read_oob':
libmtd.c:1197:5: error: expected expression before 'struct'
libmtd.c:1197:19: error: expected expression before 'struct'
libmtd.c: In function 'mtd_write_oob':
libmtd.c:1204:5: error: expected expression before 'struct'
libmtd.c:1204:20: error: expected expression before 'struct'
../common.mk:62: recipe for target `/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/libmtd.o' failed
make[3]: *** [/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/libmtd.o] Error 1
make[3]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/lib'
Makefile:65: recipe for target `/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/.built' failed
make[2]: *** [/home/edwardsl/openwrt/ramips/trunk/build_dir/host/mtd-utils-1.4.5/.built] Error 2
make[2]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk/tools/mtd-utils'
tools/Makefile:142: recipe for target `tools/mtd-utils/compile' failed
make[1]: *** [tools/mtd-utils/compile] Error 2
make[1]: Leaving directory `/home/edwardsl/openwrt/ramips/trunk'
/home/edwardsl/openwrt/ramips/trunk/include/toplevel.mk:146: recipe for target `tools/mtd-utils/install' failed
make: *** [tools/mtd-utils/install] Error 2

Attachments (1)

openwrt_mtd_utils.patch (2.4 KB) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by anonymous

comment:1 Changed 5 years ago by wbx

Hi,

try attached patch.

best regards

Waldemar

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.