From: Marcus W <mwa...@ea...> - 2009-09-06 20:40:37
|
Slight update - but no resolution to my problems. I did "bitbake libgphoto2" and after a few minutes of text scrolling across the screen I now have a libgphoto2.pc in the following directory: ~/gumstix/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/pkgconfig After that I did "ldconfig" as su, but now that I "bitbake -c rebuild server" I still get errors saying it can't find libgphoto2.pc. I also tried: "export PKG_CONFIG_PATH="${PKG_CONFIG_DIR}:~/gumstix/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/pkgconfig" without success Here is an interesting note on pkg-config, but I don't know how it could help me. http://pkg-config.freedesktop.org/wiki/CrossCompileProposal PKG_CONFIG_PATH does ineed not look in /usr/lib/pkgconfig (and it should not) since there is a libgphoto2.pc file in there. However, it should look in ~/gumstix/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/pkgconfig where there is indeed a libgphoto2.pc for the gumstix (after doing bitbake libgphoto2). supposedly CXX is used instead of CC to compile C++ files. My Bitbake file: ========================================================================= DESCRIPTION = "gphoto cam server program" PR = "r0" DEPENDS = "" SRC_URI = " \ file://server.c \ file://myCamera.c \ file://net.c \ " S = "${WORKDIR}" CXXFLAGS += `pkg-config --cflags libgphoto2` LDFLAGS += `pkg-config --libs libgphoto2` do_compile () { ${CXX} ${CXXFLAGS} ${LDFLAGS} net.c -o net ${CXX} ${CXXFLAGS} ${LDFLAGS} myCamera.c -o myCamera ${CXX} ${CXXFLAGS} ${LDFLAGS} server.c -o server } do_install () { install -d ${D}${bindir}/ install -m 0755 ${S}/server ${D}${bindir}/ } FILES_${PN} = "${bindir}/server" ============================================================================ Here is the log output: ========================================================================== /home/marcus/gumstix/gumstix-oe/bitbake/lib/bb/COW.py:29: DeprecationWarning: the sets module is deprecated import types, sets NOTE: Handling BitBake files: / (4958/4958) [100 %] NOTE: Parsing finished. 4721 cached, 1 parsed, 236 skipped, 0 masked. NOTE: build 200909061605: started OE Build Configuration: BB_VERSION = "1.8.10" OE_REVISION = "<unknown>" TARGET_ARCH = "arm" TARGET_OS = "linux-gnueabi" MACHINE = "gumstix-custom-verdex" DISTRO = "angstrom" DISTRO_VERSION = "2007.9-test-20090906" TARGET_FPU = "soft" NOTE: Resolving any missing task queue dependencies NOTE: preferred version 2.5 of glibc not available (for item virtual/arm-angstrom-linux-gnueabi-libc-for-gcc) NOTE: Preparing runqueue NOTE: Executing runqueue NOTE: Running task 1 of 1 (ID: 0, /home/marcus/gumstix/gumstix-oe/user.collection/packages/server/server_1.0.0.bb, do_rebuild) NOTE: package server-1.0.0: started NOTE: package server-1.0.0-r0: task do_rebuild: started NOTE: package server-1.0.0-r0: task do_clean: started NOTE: removing /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0 NOTE: removing /home/marcus/gumstix/gumstix-oe/tmp/stamps/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0.* NOTE: package server-1.0.0-r0: task do_clean: completed NOTE: package server-1.0.0-r0: task do_fetch: started NOTE: package server-1.0.0-r0: task do_fetch: completed NOTE: package server-1.0.0-r0: task do_unpack: started NOTE: Unpacking /home/marcus/gumstix/gumstix-oe/user.collection/packages/server/files/server.c to /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/ NOTE: Unpacking /home/marcus/gumstix/gumstix-oe/user.collection/packages/server/files/myCamera.c to /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/ NOTE: Unpacking /home/marcus/gumstix/gumstix-oe/user.collection/packages/server/files/net.c to /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/ NOTE: package server-1.0.0-r0: task do_unpack: completed NOTE: package server-1.0.0-r0: task do_patch: started NOTE: package server-1.0.0-r0: task do_patch: completed NOTE: package server-1.0.0-r0: task do_configure: started NOTE: package server-1.0.0-r0: task do_configure: completed NOTE: package server-1.0.0-r0: task do_qa_configure: started NOTE: Checking sanity of the config.log file NOTE: package server-1.0.0-r0: task do_qa_configure: completed NOTE: package server-1.0.0-r0: task do_compile: started ERROR: function do_compile failed ERROR: log data follows (/home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/temp/log.do_compile.15873) | Package libgphoto2 was not found in the pkg-config search path. | Perhaps you should add the directory containing `libgphoto2.pc' | to the PKG_CONFIG_PATH environment variable | No package 'libgphoto2' found | Package libgphoto2 was not found in the pkg-config search path. | Perhaps you should add the directory containing `libgphoto2.pc' | to the PKG_CONFIG_PATH environment variable | No package 'libgphoto2' found | net.c:5:17: error: net.h: No such file or directory | net.c: In function 'int setupServer(int)': | net.c:15: error: 'error' was not declared in this scope | net.c:22: error: 'error' was not declared in this scope | net.c:30: warning: invalid conversion from 'int*' to 'socklen_t*' | net.c:30: warning: initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)' | net.c:32: error: 'error' was not declared in this scope | net.c: In function 'int sendImage(int, const char**, long unsigned int)': | net.c:48: error: 'write' was not declared in this scope | net.c:50: error: 'error' was not declared in this scope | net.c:58: error: 'error' was not declared in this scope NOTE: Task failed: /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/temp/log.do_compile.15873 NOTE: package server-1.0.0-r0: task do_compile: failed ERROR: Error in executing: ERROR: Exception:<class 'bb.build.EventException'> Message:('Function failed in task: /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/temp/log.do_compile.15873', <bb.build.TaskFailed instance at 0xdcd23ec>) ERROR: Printing the environment of the function ERROR: Error in executing: ERROR: Exception:<class 'bb.build.EventException'> Message:('Function failed in task: /home/marcus/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/server-1.0.0-r0/temp/log.do_compile.15873', <bb.build.TaskFailed instance at 0xdcd23ec>) ERROR: Printing the environment of the function ERROR: TaskFailed event exception, aborting NOTE: package server-1.0.0: failed ERROR: Build of /home/marcus/gumstix/gumstix-oe/user.collection/packages/server/server_1.0.0.bb do_rebuildfailed ERROR: Task 0 (/home/marcus/gumstix/gumstix-oe/user.collection/packages/server/server_1.0.0.bb, do_rebuild) failed NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and 1 failed. ERROR: '/home/marcus/gumstix/gumstix-oe/user.collection/packages/server/server_1.0.0.bb' failed ======================================================================== Marcus Marcus W wrote: > > Hi, > I have written a small little server program that makes use of libgphoto2 > to snap a picture and then transfer it via a socket to another computer. > It works just fine on my computer (ubuntu 9.04), but I am having some > trouble bitbaking/cross compiling it for the gumstix (verdex pro xm4). > > The program makes use of three c source files and some associated header > files. when I bitbake, I end up getting two problems (under the > "do_compile" part of bitbake): > 1,Package libgphoto2 was not found in the pkg-config search path. > 2, server.c:8:22: error: myCamera.h: No such file or directory. > > There are many errors, but they fall under either of the two categories > above. > > The first one seems to be a result of not successfully using the following > flags that are required to be in the makefile to compile for running it on > a regular computer. The flags are as follows: > CFLAGS += `pkg-config --cflags libgphoto2` > LDFLAGS += `pkg-config --libs libgphoto2` > > However, at the command prompt, I have set the path to find libgphoto2.pc, > which is in usr/lib/pkgconfig/ as follows: > PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/ > echo $PKG_CONFIG_PATH (and it shows up) > > However, I still get the set path errors. > > The second part about include files I don't understand either. I have > tried putting my .h files in both the > ~/gumstix/gumstix-oe/user.collection/packages/server/files directory, and > in the ~/gumstix/gumstix-oe/user.collection/packages/serve/ where the .bb > file is, but neither yields a result. > > My bitbake file looks like this: > ======================================================== > > DESCRIPTION = "gphoto cam server program" > > PR = "r0" > > DEPENDS = "" > > SRC_URI = " \ > file://server.c \ > file://myCamera.c \ > file://net.c \ > " > > S = "${WORKDIR}" > > CFLAGS += `pkg-config --cflags libgphoto2` > LDFLAGS += `pkg-config --libs libgphoto2` > > do_compile () { > ${CC} ${CFLAGS} ${LDFLAGS} -o server server.c myCamera.c net.c > } > > do_install () { > install -d ${D}${bindir}/ > install -m 0755 ${S}/server ${D}${bindir}/ > } > > FILES_${PN} = "${bindir}/server" > ========================================================= > > and the log that the bit bake spits out looks like this: > > ===================================================== > Package libgphoto2 was not found in the pkg-config search path. > Perhaps you should add the directory containing `libgphoto2.pc' > to the PKG_CONFIG_PATH environment variable > No package 'libgphoto2' found > Package libgphoto2 was not found in the pkg-config search path. > Perhaps you should add the directory containing `libgphoto2.pc' > to the PKG_CONFIG_PATH environment variable > No package 'libgphoto2' found > Package libgphoto2 was not found in the pkg-config search path. > Perhaps you should add the directory containing `libgphoto2.pc' > to the PKG_CONFIG_PATH environment variable > No package 'libgphoto2' found > Package libgphoto2 was not found in the pkg-config search path. > Perhaps you should add the directory containing `libgphoto2.pc' > to the PKG_CONFIG_PATH environment variable > No package 'libgphoto2' found > server.c:8:22: error: myCamera.h: No such file or directory > server.c:9:25: error: definitions.h: No such file or directory > server.c:10:17: error: net.h: No such file or directory > server.c:13:44: error: gphoto2/gphoto2-abilities-list.h: No such file or > directory > server.c:14:36: error: gphoto2/gphoto2-camera.h: No such file or directory > server.c:15:36: error: gphoto2/gphoto2-widget.h: No such file or directory > server.c: In function 'main': > server.c:31: error: 'Camera' undeclared (first use in this function) > server.c:31: error: (Each undeclared identifier is reported only once > server.c:31: error: for each function it appears in.) > server.c:31: error: 'camera' undeclared (first use in this function) > server.c:83: error: 'CAMERA_MODEL' undeclared (first use in this function) > myCamera.c:4:22: error: myCamera.h: No such file or directory > myCamera.c:7:44: error: gphoto2/gphoto2-abilities-list.h: No such file or > directory > myCamera.c:8:36: error: gphoto2/gphoto2-camera.h: No such file or > directory > myCamera.c:9:36: error: gphoto2/gphoto2-widget.h: No such file or > directory > myCamera.c:11: error: expected ')' before '*' token > myCamera.c:45: error: expected ')' before '*' token > myCamera.c:65: error: expected ')' before '*' token > net.c:5:17: error: net.h: No such file or directory > > ============================================================ > > Any suggestions would be greatly appreciated > > Thank You for reading, > Marcus > > > > -- View this message in context: http://www.nabble.com/bitbake-errors-%28libgphoto-and-setting-paths%29-tp25315161p25321727.html Sent from the Gumstix mailing list archive at Nabble.com. |