Failing to build "imx_usb"

Hello all,

I encountered an issue building imx_usb.c, which was a missing sys/cdefs.h - I appear to have resolved this by installing gcc-multilib, which seems to be the recommended solution (I am running Ubuntu 16.04 64-bit).

I attempted the build again without clearing out any build folders, imx_usb.c builds with just a warning, but now I see this:

| gcc  -m32 -o imx_usb imx_usb.o imx_sdp.o -L/home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/lib -L/home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-rpath,/home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-O1 `pkg-config --libs libusb-1.0`
| /usr/bin/ld: skipping incompatible /home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib/libusb-1.0.so when searching for -lusb-1.0
| /usr/bin/ld: skipping incompatible /home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib/libusb-1.0.a when searching for -lusb-1.0
| /usr/bin/ld: skipping incompatible /home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib/libusb-1.0.so when searching for -lusb-1.0
| /usr/bin/ld: skipping incompatible /home/richard/Workspace/oe-core/build/tmp-glibc/sysroots/x86_64-linux/lib/libusb-1.0.a when searching for -lusb-1.0
| /usr/bin/ld: cannot find -lusb-1.0
| collect2: error: ld returned 1 exit status
| Makefile:27: recipe for target 'imx_usb' failed
| make: *** [imx_usb] Error 1
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/richard/Workspace/oe-core/build/tmp-glibc/work/x86_64-linux/imx-loader-native/git-r1/temp/log.do_compile.5278)

I am now attempting to do a clean build (of console-trdx-image - the above was angstrom-lxde-image), but am hoping someone might be able to suggest what I can do to resolve this, if a clean build isn’t the solution?

Regards,
Richard.

My clean build of console-trdx-image has now failed for the same issue.

Hi

I guess you did not install all the prerequisites. In addition to the once from the openembedded wiki there are some on the page itself.

As you are using ‘Ubuntu 16.04’ which is not yet listed you would take the ‘Ubuntu 15.10 (64-bit)’ suggestion and you would likely have to replace the ‘g+±4.9-multilib libstdc+±4.9-dev:i386’ with ‘g+±5-multilib libstdc+±5-dev:i386’.

After you installed this you can rerun bitbake. There is no need to delete any output from your earlier run.

Max

I added in the missing packages, all working now - thanks!