[meta-freescale] Trying to compile shared library

soim maillist soimmaillist at gmail.com
Fri Oct 6 02:05:14 PDT 2017


Hello,

I'm trying to create a shared library for my board, but I can't resolve my
error.

here is my bb file :























*DESCRIPTION = "GPIO Drivers"#To prevent the LICENSE field not setLICENSE =
"CLOSED"PR = "r5"SRC_URI = "file://gpio.c \           file://gpio.h
\           file://README.txt"do_compile() {   ${CC} ${CFLAGS} ${LDFLAGS}
${WORKDIR}/gpio.c -o gpio   ${CC} -shared -o ${WORKDIR}/libgpio.so gpio
-lc}do_install() {   install -m 0755 -d ${D}${bindir} ${D}${libdir}
${D}${docdir}/gpio   install -m 0755 ${S}/gpio ${D}${bindir}   install -m
0755 ${WORKDIR}/README.txt ${D}${docdir}/gpio   install -m 0755
${WORKDIR}/libgpio.so ${D}${libdir}}*

Here is my error :


























*ERROR: gpio-0.0-r5 do_compile: Function failed: do_compile (log file is
located at
/home/BOB/var-fslc-yocto/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gpio/0.0-r5/temp/log.do_compile.6120)ERROR:
Logfile of failure stored in:
/home/BOB/var-fslc-yocto/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gpio/0.0-r5/temp/log.do_compile.6120Log
data follows:| DEBUG: Executing shell function do_compile| gpio: In
function `_fini':|
/usr/src/debug/glibc/2.24-r0/git/csu/../sysdeps/arm/crti.S:95: multiple
definition of `_fini'|
/home/BOB/var-fslc-yocto/build_fb/tmp/sysroots/imx7-var-som/usr/lib/crti.o:/usr/src/debug/glibc/2.24-r0/git/csu/../sysdeps/arm/crti.S:95:
first defined here| gpio: In function `__data_start':| :(.data+0x4):
multiple definition of `__dso_handle'|
/home/BOB/var-fslc-yocto/build_fb/tmp/sysroots/imx7-var-som/usr/lib/arm-fslc-linux-gnueabi/6.2.0/crtbeginS.o:(.data.rel.local+0x0):
first defined here| gpio: In function `_init':|
/usr/src/debug/glibc/2.24-r0/git/csu/../sysdeps/arm/crti.S:83: multiple
definition of `_init'|
/home/BOB/var-fslc-yocto/build_fb/tmp/sysroots/imx7-var-som/usr/lib/crti.o:/usr/src/debug/glibc/2.24-r0/git/csu/../sysdeps/arm/crti.S:64:
first defined here|
/home/BOB/var-fslc-yocto/build_fb/tmp/sysroots/imx7-var-som/usr/lib/arm-fslc-linux-gnueabi/6.2.0/crtendS.o:(.tm_clone_table+0x0):
multiple definition of `__TMC_END__'| gpio::(.data+0x10): first defined
here| collect2: error: ld returned 1 exit status| WARNING:
/home/BOB/var-fslc-yocto/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gpio/0.0-r5/temp/run.do_compile.6120:1
exit 1 from 'arm-fslc-linux-gnueabi-gcc -march=armv7-a -mthumb -mfpu=neon
-mfloat-abi=hard
--sysroot=/home/BOB/var-fslc-yocto/build_fb/tmp/sysroots/imx7-var-som
-shared -o
/home/BOB/var-fslc-yocto/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gpio/0.0-r5/libgpio.so
gpio -lc'| ERROR: Function failed: do_compile (log file is located at
/home/BOB/var-fslc-yocto/build_fb/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gpio/0.0-r5/temp/log.do_compile.6120)ERROR:
Task
(/home/BOB/var-fslc-yocto/sources/meta-BOB/recipes-selfpower/gpio/gpio_0.0.bb:do_compile)
failed with exit code '1'NOTE: Tasks Summary: Attempted 386 tasks of which
385 didn't need to be rerun and 1 failed.NOTE: Writing buildhistorySummary:
1 task failed:
/home/BOB/var-fslc-yocto/sources/meta-BOB/recipes-selfpower/gpio/gpio_0.0.bb:do_compileSummary:
There was 1 ERROR message shown, returning a non-zero exit code.*

Thank you for your help !

Soim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20171006/104da854/attachment.html>


More information about the meta-freescale mailing list