Unable to get a clean compile of ACDS15.1_REL_GSRD_PR

I’m a bit of a newbie at this SoCFPGA stuff but have had a considerable experience with embedded C, hardware and FPGA in the past. After a poor experience with trying to compile Angstrom 13.1 SoCFPGA, I was advised to try V15.1 for the Altera CV SoCkit board. I had much greater success apart from a single error and one warning (related I think). I’ve had a look at the source code down in the depths of the source indicated in the error output and I think the linkage error is genuine as a pair of functions are declared as “external inline” in the .h file and redeclared in the .c file. The compile screen output follows further down. The two files in question are hashtable_itr.h and hashtable_itr.c.

Also, somewhere in the middle of all this is a warning that 4 bitbake recipes are missing, is this an issue?

I’m a bit mystified, wouldn’t this have appeared at some stage in the previous compilation processes or am I doing something wrong or different?

How should we normally go about such issues as spotting what looks like a software bug, is this the correct place?

Bitbake output --------------------------------->

dave@dave-Inspiron-1110:~/angstrom-socfpga$ MACHINE=cyclone5 bitbake gsrd-console-image
NOTE: Started PRServer with DBfile: /home/dave/angstrom-socfpga/cache/prserv.sqlite3, IP:, PORT: 41605, PID: 1799
Loading cache: 100% |###########################################| ETA: 00:00:00
Loaded 3144 entries from dependency cache.
Parsing recipes: 100% |#########################################| Time: 00:02:36
Parsing of 2593 .bb files complete (2579 cached, 14 parsed). 3157 targets, 94 skipped, 0 masked, 0 errors.
WARNING: No recipes available for:
NOTE: Resolving any missing task queue dependencies
NOTE: multiple providers are available for glibc (glibc, external-linaro-toolchain)
NOTE: consider defining a PREFERRED_PROVIDER entry to match glibc
NOTE: multiple providers are available for libevent (libevent, libevent-fb)
NOTE: consider defining a PREFERRED_PROVIDER entry to match libevent

Build Configuration:
BB_VERSION = "1.24.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-15.10"
TARGET_SYS = "arm-angstrom-linux-gnueabi"
MACHINE = "cyclone5"
DISTRO = "angstrom"
DISTRO_VERSION = "v2014.12"
TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU = "vfp-neon"
meta-angstrom = "angstrom-v2014.12-yocto1.7:4a5d73b87bcb64180af9a6a0dbcfd194f7c95bf5"
meta-python = "dizzy:70beecb2716bca1b9dfbc7d6a264233e1f05e82b"
meta-java = "master:d2b75b615e4612f9fa05950c1d76d4a719e573d4"
meta-browser = "master:1ed7500cc43706165ccac8daccba47124e63d3eb"
meta-mono = "master:e8c390589dd83659506564c448d086b4f3d13666"
meta-qt5 = "master:478fe949a957471a4d20450f6e9375fe1d628591"
meta-systemd = "dizzy:70beecb2716bca1b9dfbc7d6a264233e1f05e82b"
meta-ros = "master:37c6fd01ddfe862ec6af7a4c2d24b51d9d1cdd55"
meta-uav = "master:edf32a392b55a4267e6b072776e2aab6c8f7617e"
meta-telephony = "master:65238f85305f3179491e5e4be8152ea35454ac84"
meta-beagleboard-extras = "master:bcfe15fd7500523d6d256cb9872e496beaf249da"
meta-photography = "master:060028912759325f26f3ce88e9c6bfc66d413517"
meta-altera = "angstrom-v2014.12-yocto1.7:8d6e9b468630aa4d9d4c946080f5023dea43d891"
meta-altera-refdes = "gsrd-15.1:c48ec1a7ad05c56320e17faa9d600377741791fd"
meta-aarch64 = "dizzy:fb102504ca50767a427ea4fbe970ce631f5161c6"
meta = “dizzy:c50e30cb078ca0ad6f76241f0b0a5557cc17e3c0”

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_compile (log file is located at /home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/log.do_compile.2268)
ERROR: Logfile of failure stored in: /home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/log.do_compile.2268
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make CC=gcc RANLIB=ranlib AR=ar CFLAGS=-isystem/home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/x86_64-linux/usr/include -O2 -pipe -I/home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git//include -DWITHOUT_XATTR BUILDDIR=/home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/
| CHK include/version.h
| LD mkfs.ubifs/mkfs.ubifs
| /home/dave/angstrom-socfpga/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: In function hashtable_iterator_key': | /home/dave/angstrom-socfpga/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.c:44: multiple definition ofhashtable_iterator_key’
| /home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/devtable.o:/home/dave/angstrom-socfpga/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.h:34: first defined here
| /home/dave/angstrom-socfpga/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: In function hashtable_iterator_value': | /home/dave/angstrom-socfpga/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.c:48: multiple definition ofhashtable_iterator_value’
| /home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/devtable.o:/home/dave/angstrom-socfpga/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.h:43: first defined here
| collect2: error: ld returned 1 exit status
| common.mk:70: recipe for target ‘/home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/mkfs.ubifs’ failed
| make: *** [/home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/git/mkfs.ubifs/mkfs.ubifs] Error 1
| ERROR: oe_runmake failed
| WARNING: /home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/run.do_compile.2268:1 exit 1 from
| exit 1
| ERROR: Function failed: do_compile (log file is located at /home/dave/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/temp/log.do_compile.2268)
ERROR: Task 174 (virtual:native:/home/dave/angstrom-socfpga/sources/openembedded-core/meta/recipes-devtools/mtd/mtd-utils_git.bb, do_compile) failed with exit code '1’
NOTE: Tasks Summary: Attempted 2909 tasks of which 2907 didn’t need to be rerun and 1 failed.
NOTE: Writing buildhistory
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
virtual:native:/home/dave/angstrom-socfpga/sources/openembedded-core/meta/recipes-devtools/mtd/mtd-utils_git.bb, do_compile
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

I’ve been doing a bit of deeper investigation on this trying to find out what is happening but I think I’m now even more confused!!

I have one PC at home where I first spotted this problem. I have another at university, My plan being, I could work at either and keep the two in step. I decided to make a clean install of v15.1 via the AV CV GSRD 15.1 User Manual recipe, on the university machine. Ran the bitbake recipe and everything seemed to compile ok-no errors! Looked at the build directory structure where the error occurred on the home machine and the ./build/tmp-angstrom_v2014_12-glibc/work/x86_64-linux/mtd-utils-native/1.5.1+gitAUTOINC+9f107132a6-r0/ directory didn’t have the git subdirectory as seen on the home PC. Did a diff comparison between both environment variables and couldn’t see any obvious differences, apart from my home one had a virtualenv setup for Python with OpenCV, but I don’t think it could be that. I thought I’d do a clean install at home in case something had gone wrong in the git download. Ran bitbake and it came up with the same error as before.

Looking at the time the …/git directory above, was created, showed the directory had been created well into the bitbake gsrd-console-image, some 5 hours after start of the bitbake. I had noted previously that bitbake seems to download from git repos while running. I’m assuming that if the compile is successful it deletes these directories afterwards! The log file shows some numerous warnings around the flash filing software and eventually fails with an error in the mkfs.ubifs in the hashtable files.

I have the log file if anyone needs it, I tried attaching but evidently the forum only allows .jpeg’s etc. So if any one is interested in looking at it just shout and I could forward it by email.

Could it be that bitbake is downloading from “live” development repos?
Is this some other legacy of the gitorious repo non availability?

Solved it!

The answer turns out to be the version of GCC! Previous to v5.1 GCC compiled to the 1989 C standard (sometimes referred to as 1990), From GCC v5.1, compilation is to the 2011 C standard which means some constructs such as “extern inline void *” are translated differently in v5.1 onwards. I eventually found a github reference to the exact same error I was getting. The code has been corrected at the beginning of May 2016 (my problem started in April) so the code won’t be built into Cyclone V build yet and I’m not familiar enough yet as to how to add this in. So the simple answer was to switch to GCC 4.9.3 as detailed in the replies to:-

Both machines now compile without error!
So anyone having compile problems at the moment, it may be worth trying ‘gcc --version’ just to see.

thanks man, the information you shared helps a lot!