Skip to content

Commit

Permalink
libtinyxml: add -fPIC to CXXFLAGS to avoid compilation errors
Browse files Browse the repository at this point in the history
The following relocation error occurs for each compiled object:

ERROR: Function failed: do_compile (see
/home/morphis/data/oe/openwebos-ports/BUILD-tuna/work/armv7a-vfp-neon-palm-linux-gnueabi/libtinyxml-2.6.2-r3/temp/log.do_compile.9144
for further information)
ERROR: Logfile of failure stored in:
/home/morphis/data/oe/openwebos-ports/BUILD-tuna/work/armv7a-vfp-neon-palm-linux-gnueabi/libtinyxml-2.6.2-r3/temp/log.do_compile.9144
Log data follows:
| DEBUG: Executing shell function do_compile
|
/home/morphis/data/oe/openwebos-ports/BUILD-tuna/sysroots/x86_64-linux/usr/libexec/armv7a-vfp-neon-palm-linux-gnueabi/gcc/arm-palm-linux-gnueabi/4.7.2/ld:
/home/morphis/data/oe/openwebos-ports/BUILD-tuna/work/armv7a-vfp-neon-palm-linux-gnueabi/libtinyxml-2.6.2-r3/tinyxml/tinyxmlparser.o:
relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared
object; recompile with -fPIC
|
/home/morphis/data/oe/openwebos-ports/BUILD-tuna/work/armv7a-vfp-neon-palm-linux-gnueabi/libtinyxml-2.6.2-r3/tinyxml/tinyxmlparser.o:
could not read symbols: Bad value
| collect2: error: ld returned 1 exit status
| ERROR: Function failed: do_compile (see
/home/morphis/data/oe/openwebos-ports/BUILD-tuna/work/armv7a-vfp-neon-palm-linux-gnueabi/libtinyxml-2.6.2-r3/temp/log.do_compile.9144
for further information)
ERROR: Task 6
(/home/morphis/data/oe/openwebos-ports/meta-webos/recipes-toupstream/libtinyxml/libtinyxml_2.6.2.bb,
do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 821 tasks of which 815 didn't need to be rerun and 1
failed.

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>
  • Loading branch information
morphis authored and Keith Derrick committed Oct 4, 2012
1 parent 0b08b17 commit 7ee64d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipes-upstreamable/libtinyxml/libtinyxml_2.6.2.bb
Expand Up @@ -6,12 +6,14 @@ LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://readme.txt;md5=f8f366f3370dda889f60faa7db162cf4"
SECTION = "libs"

PR = "r3"
PR = "r4"

SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_2_6_2.tar.gz"

S = "${WORKDIR}/tinyxml"

CXXFLAGS += "-fPIC"

do_compile() {
${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxml.o ${S}/tinyxml.cpp
${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlerror.o ${S}/tinyxmlerror.cpp
Expand Down

0 comments on commit 7ee64d1

Please sign in to comment.