Angstrom-distribution / setup-scripts

Helper scripts for setting an Angstrom development environment
http://www.angstrom-distribution.org/building-angstrom
MIT License
84 stars 108 forks source link

mtd-utils_git: compile error #60

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

Could you please help me to solve my issue as below? Thank you very much!

sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install g++-4.9-multilib sudo apt-get install curl gawk g++-multilib gcc-multilib lib32z1-dev libcrypto++9v5:i386 libcrypto++-dev:i386 liblzo2-dev:i386 libusb-1.0-0:i386 libusb-1.0-0-dev:i386 uuid-dev:i386 cd /usr/lib; sudo ln -s libcrypto++.so.9.0.0 libcryptopp.so.6 sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev xterm

  • Error message:

ERROR: Function failed: do_compile (log file is located at /data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/log.do_compile.24031) ERROR: Logfile of failure stored in: /data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/log.do_compile.24031 Log data follows: | DEBUG: Executing shell function do_compile | NOTE: make CC=gcc RANLIB=ranlib AR=ar CFLAGS=-isystem/data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/sysroots/x86_64-linux/usr/include -O2 -pipe -I/data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git//include -DWITHOUT_XATTR BUILDDIR=/data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/ | CHK include/version.h | CC mkfs.ubifs/hashtable/hashtable_itr.o | mkfs.ubifs/hashtable/hashtable_itr.c:42:1: error: redefinition of 'hashtable_iterator_key' | hashtable_iterator_key(struct hashtable_itr _i) | ^ | In file included from mkfs.ubifs/hashtable/hashtable_itr.c:5:0: | mkfs.ubifs/hashtable/hashtable_itr.h:32:1: note: previous definition of 'hashtable_iterator_key' was here | hashtable_iterator_key(struct hashtable_itr i) | ^ | mkfs.ubifs/hashtable/hashtable_itr.c:46:1: error: redefinition of 'hashtable_iterator_value' | hashtable_iterator_value(struct hashtable_itr i) | ^ | In file included from mkfs.ubifs/hashtable/hashtable_itr.c:5:0: | mkfs.ubifs/hashtable/hashtable_itr.h:41:1: note: previous definition of 'hashtable_iterator_value' was here | hashtable_iterator_value(struct hashtable_itr i) | ^ | common.mk:82: recipe for target '/data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/hashtable/hashtable_itr.o' failed | make: _* [/data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/hashtable/hashtable_itr.o] Error 1 | ERROR: oe_runmake failed | WARNING: /data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/run.do_compile.24031:1 exit 1 from | exit 1 | ERROR: Function failed: do_compile (log file is located at /data/setup-scripts/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/log.do_compile.24031)

Thank you very much. Best regards, Huy Hoang

apocalypsem commented 8 years ago

To quote Bernhard Walle "In gcc 5.1, the default C standard which is used to compile a C file, has changed from gnu89 to gnu11. This changed the meaning of 'extern inline'. See https://gcc.gnu.org/gcc-5/porting_to.html."

http://lists.infradead.org/pipermail/linux-mtd/2015-May/058947.html

You should be able to fix this by applying his patch to mtd-utils-native You can do that by adding the patch file along side the other patches applied to mtd-utils-native and adding a line to the bb to apply the patch. bb-file for me is in... sources/openembedded-core/meta/recipes-devtools/mtd/mtd-utils_git.bb the "file://..." lines of SRC_URI they are applying patches patches for me are in... sources/openembedded-core/meta/recipes-devtools/mtd/mtd-utils/

ghost commented 8 years ago

Dear @apocalypsem

Thank you very much. I can built "console-image" successfully.

Best regards, Huy Hoang