I have spent a few hours on this and thus am asking for help. Any help is appreciated :-)
I am attempting to port an ltib project to yocto from here: http://www.imxcv.blogspot.com/2012/10/video-to-texture-streaming-part-3-imx6.html Here is my recipe: DESCRIPTION = "Video to texture streaming - i.MX6 Processor." SECTION = "base" DEPENDS = "libgstreamer libxml2" #LICENSE = "GPLv2" #I'll change the License back to GPLv2, using CLOSED below to prevent errors during recipe build LICENSE = "CLOSED" SRC_URI = "git:///home/ashwin/fsl/imx6texture/i.MX6-Video-Streaming-Texture;protocol=file" SRCREV = "${AUTOREV}" S = "${WORKDIR}/src/" EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS}'" do_compile() { oe_runmake } do_install(){ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \ INCLUDEDIR=${includedir} install -d ${D}${bindir} } FILES_${PN} = " \ ${bindir}/imx6texture \ " Some notes: I am using a local git repo for now. Here is my makefile for the project: CFLAGS += -Wall -DLINUX=1 -DEGL_API_FB=1 -I/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/gstreamer-0.10 -I/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/glib-2.0/ CXXFLAGS += -Wall -DLINUX=1 -DEGL_API_FB=1 -I/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/gstreamer-0.10 -I/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/glib-2.0/ -I/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/lib/glib-2.0/include -I/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/libxml2 OBJS = wrapper.o \ gstcontrol.o \ glutils.o \ glplane.o \ main.o all: $(OBJS) #This is my attempt to create an executable called main.out from main.o install: $(CC) -o main.out main.o clean: rm -rf *o I am able to compile the 5 source files listed above. During the link and install phase, I get the following errors: ERROR: Function failed: do_install (see /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/temp/log.do_install.32310 for further information) ERROR: Logfile of failure stored in: /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/temp/log.do_install.32310 Log data follows: | DEBUG: Executing shell function do_install | NOTE: make -j 4 CC=arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 --sysroot=/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types install DESTDIR=/home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/image SBINDIR=/usr/sbin MANDIR=/usr/share/man INCLUDEDIR=/usr/include | arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 --sysroot=/home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite -o main.out main.o | main.o: In function `on_handoff1(_GstElement*, _GstBuffer*, _GstPad*)': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:216: undefined reference to `GSTVideoControl::GSTGetPadWidth(_GstPad*)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:217: undefined reference to `GSTVideoControl::GSTGetPadHeight(_GstPad*)' | main.o: In function `gst_buffer_ref': | /home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/gstreamer-0.10/gst/gstbuffer.h:349: undefined reference to `gst_mini_object_ref' | main.o: In function `gst_buffer_unref': | /home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/gstreamer-0.10/gst/gstbuffer.h:367: undefined reference to `gst_mini_object_unref' | main.o: In function `WrapFunction1(void*)': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:204: undefined reference to `GSTVideoControl::GSTLoopFunction()' | main.o: In function `BusCall1': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:185: undefined reference to `gst_message_parse_error' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:186: undefined reference to `g_free' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:188: undefined reference to `g_printerr' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:189: undefined reference to `g_error_free' | main.o: In function `BusCall1(_GstBus*, _GstMessage*, void*)': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:178: undefined reference to `g_print' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:179: undefined reference to `GSTVideoControl::GSTSeekAbsolute(unsigned long long)' | main.o: In function `Render()': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:235: undefined reference to `glClearColor' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:236: undefined reference to `glClear' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:248: undefined reference to `GLPlane::PlaneMove(int, float)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:249: undefined reference to `GLPlane::PlaneRotate(int, float)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:250: undefined reference to `GLPlane::PlaneRotate(int, float)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:251: undefined reference to `GLPlane::PlaneRotate(int, float)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:252: undefined reference to `GLPlane::PlaneSetTexBuf(char*, int, int)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:253: undefined reference to `GLPlane::PlaneDraw()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:257: undefined reference to `eglSwapBuffers' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:258: undefined reference to `eglGetError' | main.o: In function `main': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:118: undefined reference to `GLUtils::GLInit()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:119: undefined reference to `GLUtils::GenPerspectiveMatrix(float, float, float, float, float*)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:121: undefined reference to `gst_init' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:123: undefined reference to `GSTVideoControl::GSTInit()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:125: undefined reference to `GLPlane::PlaneCreateTex(int, int)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:126: undefined reference to `GLPlane::PlaneCreate(float, float)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:127: undefined reference to `GLPlane::PlaneSetProjMatrix(float*)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:130: undefined reference to `GSTVideoControl::GSTSetURI(char*)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:133: undefined reference to `GSTVideoControl::GSTBuildPipeline(char*, void (*)(), int (*)(_GstBus*, _GstMessage*, void*))' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:135: undefined reference to `GSTVideoControl::GSTThreadCreate(void* (*)(void*))' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:139: undefined reference to `GSTVideoControl::GSTPlay()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:143: undefined reference to `GLUtils::Kbhit()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:157: undefined reference to `GSTVideoControl::GSTStop()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:161: undefined reference to `GLUtils::GLEnd()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:163: undefined reference to `GLPlane::PlaneDestroy()' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:165: undefined reference to `GSTVideoControl::GSTDeInit()' | main.o: In function `__static_initialization_and_destruction_0': | /home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/c++/iostream:75: undefined reference to `std::ios_base::Init::Init()' | /home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/c++/iostream:75: undefined reference to `std::ios_base::Init::~Init()' | /home/ashwin/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/c++/iostream:75: undefined reference to `std::ios_base::Init::~Init()' | main.o: In function `__static_initialization_and_destruction_0': | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:44: undefined reference to `operator new(unsigned int)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:46: undefined reference to `operator new(unsigned int)' | /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/src/main.cpp:48: undefined reference to `operator new(unsigned int)' | collect2: error: ld returned 1 exit status | make: *** [install] Error 1 | ERROR: oe_runmake failed | ERROR: Function failed: do_install (see /home/ashwin/fsl-community-bsp/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/imx6texture-0.1-r0/temp/log.do_install.32310 for further information) ERROR: Task 2 (/home/ashwin/fsl-community-bsp/sources/meta-openembedded/meta-oe/recipes-support/imx6texture/ imx6texture_0.1.bb, do_install) failed with exit code '1' NOTE: Tasks Summary: Attempted 953 tasks of which 952 didn't need to be rerun and 1 failed. No currently running tasks (679 of 958) Questions: 1. So it seems that some basic linking is not being done (like glibc (operator new) as well as linking the GL symbols). Where do I specify these libraries in the recipe? 2.Also, if you note above, I had to manually include the -I include paths in the CXXFLAGS flags inside the makefile. Can this be done automatically in the recipe? Isn't that what the DEPENDS variable is for? 3. The above took a long time for me to figure out. I am still learning the ins and outs of writing recipes. If I want to compile a quick program natively on the imx6q running yocto, what recipes should I build to give me the native gcc toolchain on the imx6Q Thanks! ~A
_______________________________________________ meta-freescale mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-freescale
